LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2007, 07:42 PM   #1
Libertes
Member
 
Registered: Jan 2007
Posts: 86

Rep: Reputation: 16
use commands without ./


Hi,
i have installed a program to Fedora Core 4.
i have to use it with ./filename
how can i use it without "./" ?

its owner is root on a webserver, how to change its owner to a PHP script that runs for a web application.
Thanks
 
Old 01-22-2007, 07:54 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
The ./ is necessary for applying scripts. When I installed Firefox 2, I installed the folder in /usr/local, then I created a desktop icon and in the properties of the icon I put /usr/local/firefox/./firefox in the command path box. Now all I do is click on the icon to open firefox 2.

I'm not into on-line chat lingo. What is PHP?
 
Old 01-22-2007, 08:01 PM   #3
Jerre Cope
Member
 
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
If you type:

echo $PATH

you will see all the places Linux expects your programs to be. If you installed your program somewhere else, then you'll need to let the shell know where you placed the program. Something like /home/libertes/filename, or if in the current directory ./filename

You can change the PATH variable at login in various places, depending on your distribution and what shell you log into. Try "man bash" and have a look around.
 
Old 01-22-2007, 09:02 PM   #4
sumguy231
Member
 
Registered: Apr 2004
Location: North America
Distribution: Kubuntu 7.04 - Feisty Fawn
Posts: 296

Rep: Reputation: 30
What is PHP?
Wikipedia sez:
Quote:
PHP (PHP: Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic Web pages.
 
Old 01-22-2007, 09:11 PM   #5
User Name.
Member
 
Registered: Aug 2006
Distribution: Ubuntu 8.04
Posts: 178

Rep: Reputation: 30
Put the executable in /usr/bin . Then type:
whereis [executable name]

if you see /usr/bin, type the executable name, and it should execute.
 
Old 01-22-2007, 09:44 PM   #6
Libertes
Member
 
Registered: Jan 2007
Posts: 86

Original Poster
Rep: Reputation: 16
Hey boyz
these arenot hte solutions cuz
my installed directory cannot be taken to /usr/.... because restrictions on teh virtual server
i had put my files under a directory under public_html

by the way all i needed is changing the PATH
here is the solution

export PATH=/home/mydirectoryname/public_html/myprogramdirectory:$PATH

this included my program directory to $PATH

thanks for kind answers
 
Old 01-22-2007, 10:08 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Thanks sumguy

Up here in the great Canadian Oil Sands, they've adopted this Acronym style of making signs to help one find there way in these large industrial settings. They also preach "SAFETY FIRST". The acronym signage is confusing to people not accustomed to the site to the point it is dangerous. So for that reason, I have a problem with acronyms.

Clarity is always better.

Last edited by Junior Hacker; 01-22-2007 at 10:10 PM.
 
Old 01-22-2007, 11:37 PM   #8
Libertes
Member
 
Registered: Jan 2007
Posts: 86

Original Poster
Rep: Reputation: 16
What s wrong here

under my /usr/local/bin
my files are like this for imagemagick

-rwxr-xr-x 1 s5df3gf8743adg root 20696 Jan 22 21:51 composite
-rwxr-xr-x 1 s5df3gf8743adg root 20684 Jan 22 21:51 conjure
-rwxr-xr-x 1 s5df3gf8743adg root 20684 Jan 22 21:51 convert
-rwxr-xr-x 1 s5df3gf8743adg root 20684 Jan 22 21:51 display

my php cannot executes these files

what is wrong with them?
how can i make them wexecutable by php?
chmod 777 * did not worked
 
Old 01-23-2007, 12:05 AM   #9
Hendronicus
Member
 
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176

Rep: Reputation: 50
Ok, I'm not totally sure what the question really is, but have you tried appending a . to the beginning of the path in /etc/profile? It's really bad for security but will allow for local execution of scripts in any directory.
 
Old 01-23-2007, 12:59 AM   #10
asimba
Member
 
Registered: Mar 2005
Location: 127.0.0.0
Distribution: Red Hat / Fedora
Posts: 355

Rep: Reputation: 42
try adding directory path in your profile init
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Commands joseph7 Fedora 2 09-01-2006 05:42 PM
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 12:45 AM
Commands Instantly Linux - Newbie 3 01-12-2005 01:18 PM
commands merchtemeagle Linux - Newbie 6 10-12-2004 10:38 AM
Where are my commands ......? CloudBuilder Linux - Newbie 3 10-12-2003 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration