WebmasterForums.NET - Webmaster Forums & Directory
 

Go Back   WebmasterForums.NET - Webmaster Forums & Directory > Design and Development > Site Programming and Coding
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Site Programming and Coding Have a problem with some code on your site? Ask our other members for advice and help.

Reply
 
Thread Tools Display Modes
Old 07-31-2006, 02:15 PM   #1
Shoshana
Senior Member
 
Shoshana's Avatar
 
Join Date: Jul 2006
Location: NY
Posts: 104
Shoshana is on a distinguished road
Send a message via AIM to Shoshana
Default PHP Warning: PHP Startup: mysql: Unable to initialize module

Hi All;
I just solved a very vexing problem (for me) has that
appeared in hundreds of web sites and newsgroups over the
years.

I'm using Apache/PHP/Mysql on a win32 system.

To enable Mysql (according to the PHP manual), there are 3
things necessary

1) enable the php_mysql.dll library by uncommenting the line
below (remove the semi-colon) in the file 'php.ini'

extension=php_mysql.dll

2) add C:\PHP (or wherever the PHP installation resides)
to the PATH environment variable.

3) make sure there is a libmysql.dll is in the PATH
specified in step 2

Even after doing all this, I was getting the warning
shown the subject line. It was appearing in the error logs
and even on the DOS command line with "php -v".

The message pointed to incompatibilities between the 2 .dll
files.

The problem turned out to be with PHP version 5.1.4, which
I downloaded from the PHP website as a Microsoft install
file (.msi).

I removed 5.1.4 (and 5.1.2 which was also installed) using
the Control Add/Remove tool and then installed a recent
5.2.x build that I downloaded from

http://snaps.php.net.

The downloaded 5.2.x file was a zip archive of the PHP
directory tree. I simply extracted the files into
the existing PHP directory, overwriting the files that
were there (Control Panel Remove did not erase these files).

Everything worked beautifully after that.

I have to assume here that some builds of PHP do not handle
the dependencies of the shared libraries found in the ext
directory.

The .msi install of PHP 5.1.4 seems to be one of them.

Cheers
Shoshana is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 02:22 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
WebmasterForums.NET - Webmaster Forums & Directory