phpBB3 won't recognize my MySQL server

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
Eelke
QA Team
Posts: 2903
Joined: Thu Dec 20, 2001 8:00 am
Location: NL, Bussum
Name: Eelke Blok
Contact:

Re: phpBB3 won't recognize my MySQL server

Post by Eelke » Fri May 30, 2008 11:55 am

Check whether PHP has working extensions for the databases by creating a phpinfo file.

Code: Select all

<?php
phpinfo();
?>
Put this in a file you name phpinfo.php, place it somewhere where you can browse to it through your database, and check the output it generates.

gbr1918
Registered User
Posts: 31
Joined: Fri Jan 26, 2007 10:04 pm

Re: phpBB3 won't recognize my MySQL server

Post by gbr1918 » Fri May 30, 2008 12:36 pm

Sorry Liam Wi: I meant to reply to Fenag's post! This thread's got a bit confusing.
Dave

LiamWi
Registered User
Posts: 23
Joined: Tue Jan 29, 2008 12:52 pm

Re: phpBB3 won't recognize my MySQL server

Post by LiamWi » Fri May 30, 2008 1:38 pm

Yeah Fenag's post was in March, which is why I've bumped this, as nobody seems to have solved these problems yet. Personally I'm going to go through the ODBC route and set up sql server to use System DSN to set it up for the database - I realised that was how I did this last time it worked - I gave up basically :lol:

User avatar
Eelke
QA Team
Posts: 2903
Joined: Thu Dec 20, 2001 8:00 am
Location: NL, Bussum
Name: Eelke Blok
Contact:

Re: phpBB3 won't recognize my MySQL server

Post by Eelke » Fri May 30, 2008 1:45 pm

Have you verified whether the PHP extensions have been loaded properly?

LiamWi
Registered User
Posts: 23
Joined: Tue Jan 29, 2008 12:52 pm

Re: phpBB3 won't recognize my MySQL server

Post by LiamWi » Fri May 30, 2008 1:48 pm

Unfortunately I have, and they are working fine. phpinfo was filled with handy info suggesting I've set it all up perfectly.. which is qute irritating.

opconxps
Registered User
Posts: 18
Joined: Tue Jul 14, 2009 6:48 pm

Re: phpBB3 won't recognize my MySQL server

Post by opconxps » Wed Aug 05, 2009 8:18 pm

during the PHP5 installation, ensure that the extension is also loaded. There's a section that once you get to it it will list 'Extension' with an X mark next to it, click the dropdown and select "install all" or expand and select the extension you would like to enable. Your ini should look like this...

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.
extension = php_mysql.dll

; Windows Extensions

splat2011
Registered User
Posts: 2
Joined: Sat Sep 29, 2012 5:28 am

Re: phpBB3 won't recognize my MySQL server

Post by splat2011 » Thu Oct 04, 2012 3:19 am

OK, I had this same problem. I had phpinfo() display the correct information if run from a command line but if inside apache it wouldn't load the mysql drivers, even if the relevant parts were uncommented in php.ini.
I could see they weren't loading from within Apache's errors.log file:

Code: Select all

[Thu Oct 04 15:36:20 2012] [notice] Parent: Received restart signal -- Restarting the server.
[Thu Oct 04 15:36:20 2012] [notice] Child 5084: Exit event signaled. Child process is ending.
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mysqli.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
[Thu Oct 04 15:36:20 2012] [notice] Apache/2.2.22 (Win32) PHP/5.2.17 configured -- resuming normal operations

I simply put this inside the BODY section of an HTML file to see if my mysql drivers were loading from within apache:

Code: Select all

<?php
	echo phpinfo();
?>
To my surprise this proved to me that the mysql drivers were indeed not loading from within Apache.

The solution, after hours of frustration, was to add the following lines into my httpd.conf file:

Code: Select all

PHPIniDir "C:/PHP"
LoadFile "C:/PHP/libmysql.dll"
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
The difficult line that I couldn't find in any documentation was that I needed the Loadfile command as shown above. Now I am getting phpinfo() showing me that the mysql drivers were loading from within apache
and finally phpbb3 would install.

Hope this saves someone hours of frustration. Good luck.

Locked

Return to “[3.0.x] Support Forum”