Page 4 of 4
Posted: Mon Nov 20, 2006 6:33 pm
by ivj
When I try to do this:
Code: Select all
echo "Configuration file: <b>".get_cfg_var("cfg_file_path")."</b><br>";
I get an empty string.
http://us2.php.net/function.get_cfg_var Suggests that IF I am using a configuration file, then this will return it's value. So I can only assume that it's not using a configuration file. Now how can I find out why the hell not? Also, can I force PHP to use a specified config file during runtime?
Posted: Mon Nov 20, 2006 6:39 pm
by feyd
Maybe you should set the PHPIniDir directive in httpd.conf.
Posted: Mon Nov 20, 2006 6:41 pm
by ivj
I thought ini location was hardcoded when you compile? Let me give that a try.
Posted: Mon Nov 20, 2006 6:44 pm
by ivj
Holy crap that actually worked!
http://thailandhaven.com/test.php
Check it out now!
You guys are the best! I told you you were super mods. I guess I should add this to a list of another "extremely simple thing that caused a lot of time to be wasted".
Now I just gotta figure out that PHPMailer thing but that's for another thread.
Thanks fellas!
Posted: Mon Nov 20, 2006 6:45 pm
by volka
ivj wrote:I thought ini location was hardcoded when you compile?
That's only the last resort
http://de2.php.net/ini wrote: php.ini is searched in these locations (in order):
* SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)
* The PHPRC environment variable. Before PHP 5.2.0 this was checked after the registry key mentioned below.
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)
* Current working directory (except CLI)
* The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows)
* Windows directory (C:\windows or C:\winnt) (for Windows),
or --with-config-file-path compile time option
Posted: Mon Nov 20, 2006 6:54 pm
by RobertGonzalez
Glad you got it working man.