freaky
Jun 1 2005, 08:00 PM
I recently upgraded PHP to 4.3.11 on my FreeBSD box and am now having problems with the path to PHP on the server. All regular PHP scripts run without any problems. I updated PHP through the ports collection after updating everything. I had '--prefix=/usr/local' set in the config when compiling and now my scripts are having problems that require the path to the PHP binary on the server. I checked php_info(); and it said include_path .: then when I run which php in SSH it says php: command not found.
Can someone tell me what I did wrong and what I need to do to fix this? I really need to get this working!!! Thanks!
gloomy
Jun 2 2005, 02:32 AM
Php can be installed in few modes, as binary, as an apache module...
When you try to run 'php' in a command shell it cant find the binary. So it is not installed or it cant be found in PATH locations. Default location for php is /usr/local/bin/php. If you have changed installation config to place it to a different place - you should check if that folder is searched by the shell when looking for the binary (PATH variable; also try running the full default php command: "/usr/local/bin/php").
The include_path variable in phpinfo() has nothing to do with this. It tells php where to look for php/html/other files for inclusion in php scripts (include/require commands).
freaky
Jun 2 2005, 08:27 AM
I ran the commands below and have included what came up. Do you know what to do now since it's not being found in either place?
# /usr/local/bin/php info.php
/usr/local/bin/php: Command not found.
# /usr/local/php info.php
/usr/local/php: Command not found.
gloomy
Jun 2 2005, 01:29 PM
i would do:
#/usr/libexec/locate.updatedb
this updates location database
then:
#locate php | more
and see if you can find php anywhere
if you dont find it - probably you dont have it
goto ports (/usr/ports/lang/php4 or 5) and installs it
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.