Forum Moderators: coopster
I tried including the path in the php.ini as the include_path, but it doesn't seem to work. The error I'm getting is :
Fatal error: Call to undefined function
I'm running this on Win32 (Windows XP), with this PHP build :
PHP 5.0.5 (cli) (built: Sep 5 2005 15:54:44)
Any ideas as to what I'm doing wrong?
FWIW, I can't alter the php.ini file on my web server. But I can still alter the path with ini_set.
ini_set("include_path", "/home/domain/public_html/path/php/include");
Then in the php scripts that I run in the path/php directory I have altered the include statements to read
include ("include/include_file.inc");
Works a charm. Be aware that changing the path in this manner (using ini_set) only works for the script in which the change is made. In other words, I had to make this change to every script in the path/php directory.
When I put the include function manually into the script, it works fine. When I add the function to the script, the function works just fine.
I've done this on my old Windows box, but I can't remember what I did , and that machine is long gone.
Check your system path for php.ini first.
Start->Run->cmd
then type path
Chances are good that a Windows directory will appear before a PHP directory, and that there is a php.ini lurking in that Windows directory.
[php.net...]