Page 1 of 1

HELP PHP doesn't find dll extensions

Posted: Fri May 18, 2007 4:52 am
by alfatau
hello,
I installed php 5.2.2 on my windows machine and apache 2.2.4. after a first configuration apache worked with php. then i installed mysql 5.0 to be able to run a cms on my machine. after some configuration tries php stopped working. apache log (the same of php.exe output) says:

Code: Select all

[Fri May 18 11:15:00 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.2 configured -- resuming normal operations
[Fri May 18 11:15:00 2007] [notice] Server built: Jan  9 2007 23:17:20
[Fri May 18 11:15:00 2007] [notice] Parent: Created child process 2516
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_fdf.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_interbase.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ldap.dll' - The operating system cannot run %1.\are\n in Unknown on line 0
PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mcrypt.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mhash.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_msql.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mssql.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mysql.dll' - Invalid access to memory location.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mysqli.dll' - Invalid access to memory location.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_oci8.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_openssl.dll' - The operating system cannot run %1.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_firebird.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_mssql.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_mysql.dll' - Invalid access to memory location.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_oci.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_oci8.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_sqlite_external.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pspell.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_sybase_ct.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_fribidi.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ibm_db2.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ifx.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ingres.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_maxdb.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_mcrypt_filter.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_netools.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_oracle.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_ibm.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_pdo_informix.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_ssh2.dll' - The operating system cannot run %1.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_svn.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_swish.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_yaz.dll' - The specified module could not be found.\are\n in Unknown on line 0
PHP Notice:  Constant XML_ELEMENT_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_TEXT_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_CDATA_SECTION_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_ENTITY_REF_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_ENTITY_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_PI_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_COMMENT_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_DOCUMENT_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_DOCUMENT_TYPE_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_DOCUMENT_FRAG_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_NOTATION_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_HTML_DOCUMENT_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_DTD_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_ELEMENT_DECL_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_DECL_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_ENTITY_DECL_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_NAMESPACE_DECL_NODE already defined in Unknown on line 0
PHP Notice:  Constant XML_LOCAL_NAMESPACE already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_CDATA already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_ID already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_IDREF already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_IDREFS already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_ENTITY already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_NMTOKEN already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_NMTOKENS already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_ENUMERATION already defined in Unknown on line 0
PHP Notice:  Constant XML_ATTRIBUTE_NOTATION already defined in Unknown on line 0
[Fri May 18 11:15:01 2007] [notice] Child 2516: Child process is running
[Fri May 18 11:15:01 2007] [notice] Child 2516: Acquired the start mutex.
[Fri May 18 11:15:01 2007] [notice] Child 2516: Starting 250 worker threads.
[Fri May 18 11:15:01 2007] [notice] Child 2516: Starting thread to listen on port 80.
i really don't know what i could have done to create this problem, because i didn't modified configuration files.
the error messages also says "re-installing the application may fix this problem", so i first reinstalled the application and the problem wasn't solved,then i uninstalled-deleted any php files and directories-rebooted-and-installed,then i tried uninstalling and installing in a new-named directory, then i tried to check environment variables add-and-remove them, and i tried so many times i don't remember all tries i did (always rebooting), but the problems is still unsolved.

my php.ini extension_dir is:

Code: Select all

extension_dir ="C:\Program Files\PHP\ext"
and all windows extensions directives are disabled.
Any idea to solve my problem??
Thank you very much!
Regards
Alessandro

Posted: Fri May 18, 2007 12:36 pm
by volka
This kind of "tried this, tried that" usually leaves the computer in a mess and makes it hard to solve the problem "remotely".
Can you ask someone to actually look at the computer?
You might also try to uninstall the webserver completely (really everything that is related to apache, php and mysql) and then use something like http://www.apachefriends.org/en/xampp-windows.html

Posted: Fri May 18, 2007 1:16 pm
by RobertGonzalez
I found out recently that on some XP installs, in order to parse the extension DLL, the support DLL needs to be in the WINDOWS directory. Look at the manual page for each extension you are trying to load. It will almost invariable tell you about another DLL that needs to be included, which then needs to be copied into the WINDOWS directory.

NOTE: Adding c:\php to the system path DID NOT make it work (like the manual said). I actually had to copy dll files into the WINDOWS directory.

Posted: Fri May 18, 2007 1:58 pm
by volka
This might work but it's not necessary. Windows must "only" be able to find the dll according to the rules described in http://msdn2.microsoft.com/en-us/library/ms682586.aspx
You probably forgot
http://de3.php.net/manual/en/install.windows.extensions.php wrote:If you are installing PHP 4, copy the bundled DLLs from C:\php\dlls folder to the main C:\php folder. Don't forget to include C:\php in the system PATH (this process is explained in a separate FAQ entry).

Posted: Fri May 18, 2007 2:59 pm
by RobertGonzalez
I know from my recent experience (about a week ago) that just adding the PHP folder to the path and leaving the bundled DLL's there did not work. I literally had to put the supplemental DLL's for the extensions I wanted to load in the WINDOWS folder.

Posted: Fri May 18, 2007 3:31 pm
by volka
I just tried it with php-4.4.7-Win32.zip on a "clean" notebook image. And for all bundled dlls (not all required dlls are part of the zip archive) it worked without copying a single file to c:\windows (in fact I also tried it with copying the php.ini to c:\windows and calling the php binary with an absolute path).

Posted: Fri May 18, 2007 4:28 pm
by RobertGonzalez
I installed PHP 5 (latest) first with the installer, then uninstalled, the unpacked the zip. This was on an XP Pro SP2 machine after installing Apache 2 (after uninstalling Apache 2.2).
This was also after adding c:\php to the path.

When I uncommented the extension=php_mysqli.dll file, it puked because there is a supplemental dll file that was required by that extension, and the supplemental dll needed to be in WINDOWS.

Posted: Fri May 18, 2007 4:52 pm
by volka
Ok, I restored the same "clean" image again.
Downloaded php-5.2.2-Win32.zip.
Extracted the contents to D:\php5
copied php.ini-recommended to c:\windows and renamend it to php.ini (which I usually don't)
set extension_dir = d:/php5/ext
removed the ; from ;extension = php_mysqli.dll
appended d:/php5/ to my system's PATH
and ran d:\php5\php -m
the mysqli extension was in the list, but no error.
no dll copied to %SYSTEM%

---
it's an image of windows xp home with updates until dec 2006 but no other software installed.