Jump to content

Php Doesn't Recognize Mysql Within Phpbb Setup


kiwiheretic

Recommended Posts

I'm using Apache 2.2 on windows 7.

 

As far as I can tell both Apache, PHP 5.2.17 have installed successfully.

I am running an older version of MySQL 5.1 which I have had installed for a long time.

 

When I run C:\> php -m I get the following output:

 

 

C:\Users\Glenn>php -m

bcmath

calendar

com_dotnet

ctype

date

dom

filter

ftp

hash

iconv

json

libxml

mysql

mysqli

odbc

pcre

Reflection

session

SimpleXML

sockets

SPL

standard

tokenizer

wddx

xml

xmlreader

xmlwriter

zlib

 

[Zend Modules]

 

So I am presuming this means that mysql is enabled in my php install. However when I try to create a fresh installation of phpbb3 it will show the installation screens but it says that mysql is not an available option. I get the same problem when looking at the output for phpinfo(); It seems as though mysql is not listed by phpinfo() when invoked from apache.

 

Is it possible that the precompiled binaries for windows have somehow disabled mysql support???

 

This is part of the output from phpinfo when run from the command line:

 

 

Directive => Local Value => Master Value

mysql.allow_persistent => On => On

mysql.connect_timeout => 60 => 60

mysql.default_host => no value => no value

mysql.default_password => no value => no value

mysql.default_port => no value => no value

mysql.default_socket => no value => no value

mysql.default_user => no value => no value

mysql.max_links => Unlimited => Unlimited

mysql.max_persistent => Unlimited => Unlimited

mysql.trace_mode => Off => Off

 

mysqli

 

MysqlI Support => enabled

Client API library version => 5.0.51a

Client API header version => 5.0.51a

MYSQLI_SOCKET => /tmp/mysql.sock

 

Directive => Local Value => Master Value

mysqli.default_host => no value => no value

mysqli.default_port => 3306 => 3306

mysqli.default_pw => no value => no value

mysqli.default_socket => no value => no value

mysqli.default_user => no value => no value

mysqli.max_links => Unlimited => Unlimited

mysqli.reconnect => Off => Off

 

The whole output can be seen here: [color=#181818][font=Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif][size=3][background=rgb(255, 255, 239)]http://pastebin.com/embed_iframe.php?i=sBADc4CV[/background][/size][/font][/color]

 

 

[color=#181818][font=Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif][size=3][background=rgb(255, 255, 239)]Any ideas why this should work from the command line but not from inside Apache?[/background][/size][/font][/color]

 

[color=#181818][font=Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif][size=3][background=rgb(255, 255, 239)]Thanks in advance[/background][/size][/font][/color]

[color=#181818][font=Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif][size=3][background=rgb(255, 255, 239)]KiwiHeretic[/background][/size][/font][/color]

Link to comment
Share on other sites

Ok, I think I figured it out myself. It seems as long as you put this line in httpd.conf

 

 

PHPIniDir "C:/PHP"

LoadFile "C:/PHP/libmysql.dll"

LoadModule php5_module "C:/PHP/php5apache2_2.dll"

 

The line that was preventing it from recognising and loading MySQL from Apache was

 

 

LoadFile "C:/PHP/libmysql.dll"

 

which I added in. This after hours of frustration. I found it because there was a similar example with postgresql and I adapted it for MySQL.

 

This should really go in the phpbb3 FAQ for windows installs if I can ever find out where they keep it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.