1

I use EnterpriseDB ApachePHP on Windows XP (32 bit). I tried to enable some extensions in php.ini in the directory with ApachePHP, but nothing changed. Then I found that phpinfo() not just doesn't show the extensions I uncommented in php.ini, but it also shows others that I didn't uncomment. I have several other php.ini files on my computer, but phpinfo() shows the correct path to the php.ini file as "Loaded Configuration File" (D:\Programy\EDB_Apache\php\php.ini - that the path to the php.ini file I use; plus it shows its copy in C:\WINDOWS in "Configuration File (php.ini) Path").

The configuration must be overriden by something in ApachePHP - pgsql and pdo_pgsql are among the commented but shown libraries, while all my other php.ini instances have only MySQL and SQLite enabled. On the other hand, even the extensions contained in D:\Programy\EDB_Apache\php\Sdk\include\ext (D:\Programy\EDB_Apache is ApachePHP root) don't match those shown in phpinfo(), so it might be even more difficult.

So how to find and edit the configuration that is shown in my phpinfo(), or how to solve the bug causing it not to correspond to the loaded php.ini file? Please don't tell me to restart Apache or my computer (I configure localhost), I did this many times, even just before asking this question.

EDIT: Once again, I'm absolutely sure the path shown in phpinfo() as "Loaded Configuration File" matches to the path of the php.ini file I use. Even if the path shown there was not correct (which would be a matter of a question - how is it possible, and how to correct it?), no one of php.ini files on my computer matches the configuration shown by phpinfo. I have searched for any instance of php.ini, so I'm sure I didn't miss any of them, even if it was a hidden/system file.

EDIT2: reinstall of EDB ApachePHP didn't help. I changed the paths slightly during the reinstall, so I updated paths here. "Loaded Configuration File" path still matches the right configuration file, and I keep restarting Apache after every change.

I looked closer to phpinfo(), especially to "Configure Command":

cscript /nologo configure.js "--enable-cli" "--enable-cgi" "--with-openssl" "--enable-pdo" "--with-extra-includes=C:\pgBuild32\include;D:\pginstaller_2.auto-repo\output\include;D:\pginstaller_2.auto-repo\apache.staging\include" "--with-extra-libs=C:\pgBuild32\lib;D:\pginstaller_2.auto-repo\output\lib;D:\pginstaller_2.auto-repo\apache.staging\lib" "--enable-apache2filter" "--enable-apache2-2filter" "--enable-apache2handler" "--enable-apache2-4handler" "--with-apache-hooks" "--with-pgsql" "--with-pdo-pgsql" "--with-prefix=D:\pginstaller_2.auto-repo\php.staging" "--enable-one-shot" "--enable-cli-win32" "--enable-embed" "--enable-isapi" "--enable-ftp" "--without-mysqlnd" "--with-xsl=SHARED" "--enable-mbstring" "--enable-mbregex" "--enable-shmop" "--enable-exif" "--enable-soap" "--enable-sockets" "--with-gd=SHARED" "--without-mysql" "--without-mysqli" "--without-sqlite3" "--without-pdo-mysql" "--without-pdo-sqlite"

Paths listed there (C:\\pgBuild32\include, D:\\pginstaller_2.auto-repo\output\lib etc.) don't exist on my computer. Their existence seems to confirm my assumption that parts of the setting are overwritten by some EnterpriseDB default (or that configuration in php.ini somehow doesn't work, so the defaults are applied). I don't know where are these settings saved - that's the point of this question, if I knew, I would change them and celebrate.

There is another possible cause of the problem: lack of dll's. Most php distributions have them in ./ext. In EnterpriseDB "php" directory has only one subdirectory, and it is named "Sdk"; the extensions are (or should be; there are no dll files in that dir) in D:\Programy\EDB_Apache\php\Sdk\include\ext directory. This directory contains only .h files (in directories named after the extensions), no dll. If this is not the ordinary architecture for EnterpriseDB bundle, please tell me; I might have a bad installer file.

So I first copied the dll's from another php installation (I didn't manage to get exactly those for PHP 5.4.23, but they are 5.4 too) into the extension folder, but nothing changed. Then I even copied whole ext folder to php directory in the ApachePHP bundle location and changed the extension path to it - again, no change.

For testing reasons, I tried to run php.exe. It returned a warning:

PHP Warning:  PHP Startup: gd: Unable to initialize module
Module compiled with build ID=API2010025,TS,VC9
PHP    compiled with build ID=API2010025,TS,VC10
These options need to match
in Unknown on line 0

So if I want to substitute dll's, I need to find either VC9 ApachePHP (will it still support PostgreSQL 9.3? My main reason for all this is to be able to created forms for my database), or VC10 PHP 5.4. I didn't find any .msi installer for PHP 5.4 (even less VC10 one) and after some bad experiences with software installation through command line on Windows I don't want to try non-msi version without being sure that this is the only choice.

Any advice now?

Pavel V.
  • 2,653
  • 10
  • 43
  • 74
  • 2
    check that you're comparing the right ini file, phpinfo() should tell you which ini file is being used – Mark Baker Mar 10 '14 at 09:12
  • @MarkBaker: see my edit. I checked before asking this question, and it should have been apparent from how I worded my question in the first place (I just emphasized it by the edit). – Pavel V. Mar 10 '14 at 09:34
  • I've seen this problem numerous times before, but every time it was due to either editing the wrong ini (usually the one in c:\Windows is the right one), or someone forgot to restart Apache. Since you're very certain that you did both, I think I cannot help you. – GolezTrol Mar 10 '14 at 09:40

0 Answers0