Apache 2.4.2; PHP 5.4.0; MySQL 5.5.21: Configuration Troubles

Hello Again.

I’ve recently tried to upgrade my server configuration to the latest I possibly could, and everything seems to be running ok until I try to use the login scripts I have.

“Call to undefined function mysql_connect() […]”

This usually points to something not configured correctly in the php.ini directory, but I have the extension_dir set to the correct location where the extensions are.

Here are some specifics:

Using Apache 2.4.2 (Zip Installation) from ApacheLounge.com
Using PHP 5.4.0 VC9 Threaded from php.net; Zip Installation;
PHP runs as a module using: php_5apache2.4.dll; From ApacheLounge.com, under the same page as the Apache2.4.2 zip.

MySQL shouldn’t be the problem here, it was installed using the MySQL installer for Windows.

httpd.conf

#The Section of the httpd.config file that concerns PHP

#
# PHP Module
#
PHPIniDir "C:\HADELWEB\PHP 5.4.0\"
LoadModule php5_module "C:\HADELWEB\PHP 5.4.0\php5apache2_4.dll"

php.ini

~
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "C:\HADELWEB\PHP 5.4.0\ext"
~
#Note: Tried this without the aboslute directory as well, with just the file name of the .dll
extension=C:\HADELWEB\PHP 5.4.0\ext\php_mysql.dll
~

I found the root cause of why the dll extensions aren’t loading, but don’t know exactly how to fix it.

PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_bz2.dll' - The specified module could not be found.\r\n in Unknown on line 0

I’m no expert, but I’m pretty sure there aren’t double slashes separating directories. How do I fix such a thing?

Did you reinstall MySQL AFTER Apache and PHP? Normally, you install Apache first, then PHP, then MySQL.
I would first just try to reinstall MySQL over the rest. (Assuming PHP is working correctly.)

Let us know if that works…

I ended up dropping the PHP version back to 5.3.10 using the PHP installer. It must have been something with how I was editing PHP’s config file, because 5.4.0 was working at the core, but it wasn’t loading any extensions at all. Additionally, I did not do any changes or reinstalls concerning Apache or MySQL (save for editing httpd.conf to reflect changes with the PHP versions) when I removed 5.4.0 and installed 5.3.10.

Well, looking at PHP home site, it seems that 5.4 is still unstable. They mention not using it for production sites.
Not sure if that is still in effect, but, perhaps it might be best to wait a bit on that version.

Sponsor our Newsletter | Privacy Policy | Terms of Service