Problem to connect to MYSQL from PHP
am 02.08.2005 23:18:57 von Mauro Vezzoli
2/8/2005
Hello everybody,
I have a problem.
I can't connect to server MYSQL version 4.1 from PHP 5.0.
I write this simple instruction:
$link_id=mysql_connect("strlocalhost","strusername","strpass word");
?>
I run and PHP says "Fatal error: Call to undefined function mysql_connect()
in c:\Inetpub\wwwroot\php\db.php on line 2".
I've modified php.ini-dist, taking off comment at line
extension=php_mysql.dll and putting extension_dir =".\ext\" at the part Path
and Directories of that file.
I've copied libmysql.dll from MYSQL to PHP's root.
Which is the problem?
I don't know.
MYSQL seems to work fine from command line.
Thank you in advance for your help.
Mauro Vezzoli
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Problem to connect to MYSQL from PHP
am 02.08.2005 23:31:03 von Juan Pedro Reyes Molina
search google for mysqli_connect.
You will also need to activate mysqli library for php.
Mauro Vezzoli wrote:
>2/8/2005
>Hello everybody,
>I have a problem.
>I can't connect to server MYSQL version 4.1 from PHP 5.0.
>I write this simple instruction:
>
>$link_id=mysql_connect("strlocalhost","strusername","strpas sword");
>?>
>
>I run and PHP says "Fatal error: Call to undefined function mysql_connect()
>in c:\Inetpub\wwwroot\php\db.php on line 2".
>
>I've modified php.ini-dist, taking off comment at line
>extension=php_mysql.dll and putting extension_dir =".\ext\" at the part Path
>and Directories of that file.
>I've copied libmysql.dll from MYSQL to PHP's root.
>Which is the problem?
>I don't know.
>
>MYSQL seems to work fine from command line.
>Thank you in advance for your help.
>Mauro Vezzoli
>
>
>
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Problem to connect to MYSQL from PHP
am 17.08.2005 15:33:13 von dr.hetrick
I was having a similar problem to Mauro. MySQL was working fine in
command mode.
My configuration is:
Developer mod running a non-transactional database, i.e., I don't want
Inno-DB involved, so I uncommented the php_mysql.dll line in the
php.ini file.
What I wound up trying was copying the libmySQL.dll into the php\ext
directory (unsuccessful). Then, I copied libmySQL.dll into my
Apache2\bin directory. Everything then worked fine.
The really irritating part was that ALL of the error messages made it
appear that the problem is with the php_mysql.dll file and, from those
error messages, it appeared that Apache couldn't find the
php_mysql.dll file. In all the error messages I received, NONE of
them referred to the libmySQL.dll which turned out to be unavailable
to Apache.
HTH.
virginia
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org