Can"t get MySQL extensions to load
Can"t get MySQL extensions to load
am 09.12.2007 06:11:58 von Patrick Farley
------=_NextPart_000_0010_01C839F8.1D827260
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Evening.
I've installed the latest PHP using the zip files (not the installer) to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying to
connect to the site was greeted with an error about being unable to connect
to the database. I rechecked my connection string and all seemed well.
Figuring I'd come back to it later, I went to install Joomla and during the
install process was told that Joomla is unable to connect to MySQL.
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several times
I've even redownloaded the php zip files and compared the md5 to make sure
it was not corrupt.
MySQL is active and working on localhost for an email server without any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
Is this something with PHP or my MySQL install? I'm out of ideas.
Patrick
------=_NextPart_000_0010_01C839F8.1D827260--
Re: Can"t get MySQL extensions to load
am 10.12.2007 14:07:32 von James Crow
Run phpinfo again and see if the mysql extension shows as loaded. You
should see a section in the output from phpinfo about mysql. If you do
not see that section than the mysql extension is not loaded.
If the mysql extension shows that it is loading then it may be something
with the mysql server. Try to connect to the mysql server from the
windows command prompt:
mysql -h 127.0.0.1 -u username -ppassword
If you can connect with that string try the same string in php:
$db_link = mysql_connect('127.0.0.1', 'username', 'password');
if (!$db_link) {
// connection failed
print "MySQL connection failed. Error was: " . mysql_error();
} else {
print "Connection successful!";
mysql_close ($db_link);
}
?>
That code could have a bug in it because it is all from memory and
untested, but you should get the idea.
If the mysql extension is loading but the php connection won't work post
the response (the mysql_error above) that should help determine the
problem.
I have never worked with Win 2003, but it could be that the default
firewall is blocking the mysql connection. Maybe try turning it off or
creating an exception for the mysql server (TCP port 3306).
Thanks,
James
Since you said that you were using the newest PHP
On Sun, 2007-12-09 at 00:11 -0500, Patrick Farley wrote:
> Evening.
>
>
>
> I've installed the latest PHP using the zip files (not the installer) to my
> Windows 2003 machine with IIS. I have tested the installation with a
> phpinfo() and was successful. I installed Roundcube and when trying to
> connect to the site was greeted with an error about being unable to connect
> to the database. I rechecked my connection string and all seemed well.
> Figuring I'd come back to it later, I went to install Joomla and during the
> install process was told that Joomla is unable to connect to MySQL.
>
>
>
> I have checked and rechecked my php.ini file (though I may be missing
> something not obvious)
>
> PHP in general works.
>
> My system PATH is configured for C:\php and I have restarted several times
>
> I've even redownloaded the php zip files and compared the md5 to make sure
> it was not corrupt.
>
> MySQL is active and working on localhost for an email server without any
> issue.
>
> Have tried both mysql.dll and mysqli.dll
>
> I have searched Google with out any success.
>
>
>
> Is this something with PHP or my MySQL install? I'm out of ideas.
>
>
>
>
>
>
>
> Patrick
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Can"t get MySQL extensions to load
am 10.12.2007 14:28:19 von Patrick Farley
I figured this one out late last night. For as many times as I've set up
PHP on IIS I've never seen this or had to go through these.
I noticed on the phpinfo page that the loaded php.ini file was from
C:\Windows. Confused I did a search of that directory to see why there
would be a file there. There was not any file there, but from what I had
read that was a default configuration. Taking that into consideration I was
armed with some new keywords to use in Google. Sure enough I found a post
recommending to set up the PHPRC in the System Variables. Immediately after
that and a restart the proper C:\php\php.ini file was loading, and the mysql
dll's loaded up without issue, and Joomla and Roundcube connected without
any issue.
Strange to me. I've never had to set that up before, but maybe something
changed since I last did it this way. I've been playing with the FastCGI
from Microsoft.
Thanks for the help though. Hopefully someone else finds all of this
information useful.
-----Original Message-----
From: James Crow [mailto:james@ultratans.com]
Sent: Monday, December 10, 2007 8:08 AM
To: Patrick Farley
Cc: php-windows
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
Run phpinfo again and see if the mysql extension shows as loaded. You should
see a section in the output from phpinfo about mysql. If you do not see that
section than the mysql extension is not loaded.
If the mysql extension shows that it is loading then it may be something
with the mysql server. Try to connect to the mysql server from the windows
command prompt:
mysql -h 127.0.0.1 -u username -ppassword
If you can connect with that string try the same string in php:
$db_link = mysql_connect('127.0.0.1', 'username', 'password'); if
(!$db_link) {
// connection failed
print "MySQL connection failed. Error was: " . mysql_error(); } else
{
print "Connection successful!";
mysql_close ($db_link);
}
?>
That code could have a bug in it because it is all from memory and untested,
but you should get the idea.
If the mysql extension is loading but the php connection won't work post the
response (the mysql_error above) that should help determine the problem.
I have never worked with Win 2003, but it could be that the default firewall
is blocking the mysql connection. Maybe try turning it off or creating an
exception for the mysql server (TCP port 3306).
Thanks,
James
Since you said that you were using the newest PHP On Sun, 2007-12-09 at
00:11 -0500, Patrick Farley wrote:
> Evening.
>
>
>
> I've installed the latest PHP using the zip files (not the installer)
> to my Windows 2003 machine with IIS. I have tested the installation
> with a
> phpinfo() and was successful. I installed Roundcube and when trying
> to connect to the site was greeted with an error about being unable to
> connect to the database. I rechecked my connection string and all seemed
well.
> Figuring I'd come back to it later, I went to install Joomla and
> during the install process was told that Joomla is unable to connect to
MySQL.
>
>
>
> I have checked and rechecked my php.ini file (though I may be missing
> something not obvious)
>
> PHP in general works.
>
> My system PATH is configured for C:\php and I have restarted several
> times
>
> I've even redownloaded the php zip files and compared the md5 to make
> sure it was not corrupt.
>
> MySQL is active and working on localhost for an email server without
> any issue.
>
> Have tried both mysql.dll and mysqli.dll
>
> I have searched Google with out any success.
>
>
>
> Is this something with PHP or my MySQL install? I'm out of ideas.
>
>
>
>
>
>
>
> Patrick
>
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Can"t get MySQL extensions to load
am 16.01.2008 02:39:37 von Bruce Cowin
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
..ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" 9/12/2007 6:11:58 p.m. >>>
Evening.
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
Is this something with PHP or my MySQL install? I'm out of ideas.
Patrick
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Can"t get MySQL extensions to load
am 16.01.2008 08:29:00 von Gustav Wiberg
Hi!
If phpinfo points at c:\windows - that's where the php searches for setting=
s in first place. Try to copy php.ini from c:\php to c:\windows and see the=
result.
Vänligen/Regards
Gustav Wiberg
Developing Engineer
==================== =====3D=
============
DET SKA VARA LÄTT ATT TA RÄTT BETALT!
Har du r=E5d att inte prova Timeweb.se?
==================== =====3D=
=============A0
-----Original Message-----
From: Bruce Cowin [mailto:bdc@topenergy.co.nz]=20
Sent: Wednesday, January 16, 2008 2:40 AM
To: Patrick Farley; php-windows@lists.php.net
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
...ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" 9/12/2007 6:11:58 p.m. >>>
Evening.
=20
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
=20
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
=20
Is this something with PHP or my MySQL install? I'm out of ideas.
=20
=20
=20
Patrick
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Can"t get MySQL extensions to load
am 16.01.2008 20:53:58 von Bruce Cowin
That was a good idea, but unfortunately it doesn't work. It still doesn't =
load any of the extensions.
Regards,
Bruce
>>> Gustav Wiberg 16/01/2008 8:29:00 p.m. =
>>>
Hi!
If phpinfo points at c:\windows - that's where the php searches for =
settings in first place. Try to copy php.ini from c:\php to c:\windows and =
see the result.
Vänligen/Regards
Gustav Wiberg
Developing Engineer
==================== =====3D=
============
DET SKA VARA LÄTT ATT TA RÄTT BETALT!
Har du r=E5d att inte prova Timeweb.se?
==================== =====3D=
=============20
-----Original Message-----
From: Bruce Cowin [mailto:bdc@topenergy.co.nz]=20
Sent: Wednesday, January 16, 2008 2:40 AM
To: Patrick Farley; php-windows@lists.php.net=20
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
..ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" 9/12/2007 6:11:58 p.m. >>>
Evening.
=20
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
=20
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
=20
Is this something with PHP or my MySQL install? I'm out of ideas.
=20
=20
=20
Patrick
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php=20
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Can"t get MySQL extensions to load
am 16.01.2008 21:53:55 von Bruce Cowin
I got it to work. It turns out you need a registry entry in HKLM\Software=
\PHP call IniFilePath set to where your ini file is. Now that it's using =
the right ini file, it's loading the extensions.
Regards,
Bruce
>>> "Bruce Cowin" 17/01/2008 8:53:58 a.m. >>>
That was a good idea, but unfortunately it doesn't work. It still doesn't =
load any of the extensions.
Regards,
Bruce
>>> Gustav Wiberg 16/01/2008 8:29:00 p.m. =
>>>
Hi!
If phpinfo points at c:\windows - that's where the php searches for =
settings in first place. Try to copy php.ini from c:\php to c:\windows and =
see the result.
Vänligen/Regards
Gustav Wiberg
Developing Engineer
==================== =====3D=
============
DET SKA VARA LÄTT ATT TA RÄTT BETALT!
Har du r=E5d att inte prova Timeweb.se?
==================== =====3D=
=============20
-----Original Message-----
From: Bruce Cowin [mailto:bdc@topenergy.co.nz]=20
Sent: Wednesday, January 16, 2008 2:40 AM
To: Patrick Farley; php-windows@lists.php.net=20
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
..ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" 9/12/2007 6:11:58 p.m. >>>
Evening.
=20
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
=20
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
=20
Is this something with PHP or my MySQL install? I'm out of ideas.
=20
=20
=20
Patrick
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php=20
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php=20
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Can"t get MySQL extensions to load
am 17.01.2008 08:31:00 von Gustav Wiberg
Hi!
Strange. Never heard but Ok - good that you worked it out!
Vänligen/Regards
Gustav Wiberg
Developing Engineer
-----Original Message-----
From: Bruce Cowin [mailto:bdc@topenergy.co.nz]=20
Sent: Wednesday, January 16, 2008 9:54 PM
To: Gustav Wiberg; 'Patrick Farley'; 'php-windows@lists.php.net'; Bruce Cow=
in
Subject: RE: [PHP-WIN] Can't get MySQL extensions to load
I got it to work. It turns out you need a registry entry in HKLM\Software=
\PHP call IniFilePath set to where your ini file is. Now that it's using t=
he right ini file, it's loading the extensions.
Regards,
Bruce
>>> "Bruce Cowin" 17/01/2008 8:53:58 a.m. >>>
That was a good idea, but unfortunately it doesn't work. It still doesn't =
load any of the extensions.
Regards,
Bruce
>>> Gustav Wiberg 16/01/2008 8:29:00 p.m. >>>
Hi!
If phpinfo points at c:\windows - that's where the php searches for setting=
s in first place. Try to copy php.ini from c:\php to c:\windows and see the=
result.
Vänligen/Regards
Gustav Wiberg
Developing Engineer
==================== =====3D=
============
DET SKA VARA LÄTT ATT TA RÄTT BETALT!
Har du r=E5d att inte prova Timeweb.se?
==================== =====3D=
=============20
-----Original Message-----
From: Bruce Cowin [mailto:bdc@topenergy.co.nz]=20
Sent: Wednesday, January 16, 2008 2:40 AM
To: Patrick Farley; php-windows@lists.php.net=20
Subject: Re: [PHP-WIN] Can't get MySQL extensions to load
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
...ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" 9/12/2007 6:11:58 p.m. >>>
Evening.
=20
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
=20
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
=20
Is this something with PHP or my MySQL install? I'm out of ideas.
=20
=20
=20
Patrick
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php=20
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php=20
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php