Hi. I'm using PHP 4.4.7 under Windows (php-4.4.7-Win32) with Apache 1.3.29. I have been using this just fine for quite a while doing basic PHP stuff including forms, templates, sessions etc. Now I need to use domxml so need to load the php_domxml.dll extension. The problem is, I just can't get it working. If I call phpinfo() against my local server the 'PHP Core' section reports that "extension_dir" is "c:\php4". I have no idea where it is getting this. My directory is C:\php-4.4.7-Win32 and this is written correctly in php.ini and httpd.conf under Apache. I've searched everywhere, including the registry, so where is this coming from? Obviously it's never going to load domxml if it thinks the extension directory is in the wrong place. Everything else works fine though so far as I can see. Any ideas? Thanks in advance.
Cheers for that - spot on. "Configuration File (php.ini) Path" is reporting "C:\WINDOWS". Don't know why I didn't see it - thanks for putting me back on track. The next question of course is where is it getting it from? I've checked httpd.conf but where else should I look? I don't really want php.ini in the Windows directory if possible because it's neater to have everything in the one place.
That's the default location, set during compiling php. You can force it by adding PHPIniDir "C:/php-4.4.7-Win32" to httpd.conf, then restart Apache.
Thanks for that - now I understand. Tried it but now the server won't start. Am I correct in thinking that 'PHPIniDir' is for Apache 2 only? I'm using 1.3.29 (because it matches what my hosting company has). Curiously, if I change all my paths to comply with the default (i.e. set everything to actually be c:\php4) then it still doesn't help; domxml, gd etc. still won't load. Tried copying the php.ini to \Windows and now everything works. So, I have a workaround but not a solution. It does allow me to get work done however, so maybe I should just be pragmatic...? Don't like to surrender though Thanks again for your help.
Yes, it's Apache 2 only. If you're using Apache 1.3 in CGI mode then you can use SetEnv PHPRC C:/php-4.4.7-Win32 but I doubt you're using CGI mode.
Well, my advice is switch to PHP 5.2.3 and Apache 2.2.4 . I use this as my setup even if my webhost has other ones. I just like keeping stuff up-to-date I guess. ~ Thomas