-   Linux - Newbie (
-   -   use commands without ./ (

Libertes 01-22-2007 07:42 PM

use commands without ./
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.

Junior Hacker 01-22-2007 07:54 PM

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?

Jerre Cope 01-22-2007 08:01 PM

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.

sumguy231 01-22-2007 09:02 PM

What is PHP?
Wikipedia sez:

PHP (PHP: Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic Web pages.

User Name. 01-22-2007 09:11 PM

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

if you see /usr/bin, type the executable name, and it should execute.

Libertes 01-22-2007 09:44 PM

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

Junior Hacker 01-22-2007 10:08 PM

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.

Libertes 01-22-2007 11:37 PM

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

Hendronicus 01-23-2007 12:05 AM

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.

asimba 01-23-2007 12:59 AM

try adding directory path in your profile init

All times are GMT -5. The time now is 01:03 PM.