[PHP] PHP 5.2.2 - Undefined Function mysql_connect()
I use this setup locally for testing/playing. I recently installed the latest and greatest of the AMP collection. Apache 2.2.4 PHP 5.2.2 MySQL 5.0.37 Apache and PHP work fine together, but I wanted to hook it up to a local test database, so I installed MySQL. In php.ini, i have: ; Directory in which the loadable extensions (modules) reside. extension_dir = C:\PHP i made sure that i moved the dll to that folder, just like i did with the gd dll. And then i uncommented this line: extension=php_mysql.dll I restarted Apache, and ran a simple test script: ?php ini_set(display_errors,1); $cn = mysql_connect(localhost,root,password); ? and I get the error: *Fatal error*: Call to undefined function mysql_connect() any ideas? thanks in advance, jason
Re: [PHP] PHP 5.2.2 - Undefined Function mysql_connect()
Em Segunda 07 Maio 2007 08:12, Jason Paschal escreveu: I use this setup locally for testing/playing. I recently installed the latest and greatest of the AMP collection. Apache 2.2.4 PHP 5.2.2 MySQL 5.0.37 Apache and PHP work fine together, but I wanted to hook it up to a local test database, so I installed MySQL. In php.ini, i have: ; Directory in which the loadable extensions (modules) reside. extension_dir = C:\PHP i made sure that i moved the dll to that folder, just like i did with the gd dll. And then i uncommented this line: extension=php_mysql.dll I restarted Apache, and ran a simple test script: ?php ini_set(display_errors,1); $cn = mysql_connect(localhost,root,password); ? and I get the error: *Fatal error*: Call to undefined function mysql_connect() any ideas? First: have you tried mysql-cli? Second: have you take a look at phpinfo()? HTH -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] -- Religion, ideology, resources, land, spite, love or just because... No matter how pathetic the reason, it's enough to start a war. pgpqTKyP488jG.pgp Description: PGP signature
Re: [PHP] PHP 5.2.2 - Undefined Function mysql_connect()
Em Segunda 07 Maio 2007 09:03, Jason Paschal escreveu: thank you for responding. phpinfo shows that it is finding the correct file: Loaded Configuration File: C:\PHP\php.ini that is the correct file with the correct settings. i renamed it and phpinfo showed (none). i set it back to the correct name, php.ini, and now phpinfo shows C:\PHP\php.ini so i know it's finding the right file. still the same problem, though. Yeah... But you must look at mysql section in phpinfo()... If it's there, all must work fine... Otherwise, you must check your php.ini... -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] -- Religion, ideology, resources, land, spite, love or just because... No matter how pathetic the reason, it's enough to start a war. pgpD6oFhyNR4X.pgp Description: PGP signature
Re: [PHP] PHP 5.2.2 - Undefined Function mysql_connect()
Em Segunda 07 Maio 2007 09:37, vocĂȘ escreveu: I FOUND THE SOLUTION: i copied libmysql.dll and php_mysql.dll to my c:\windows\ folder suddenly my script connects. that's all it took. thank you for taking the time to help. maybe this info can help you or someone you know. Sure! =] But... Consider reply to list next time... =] -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] -- Religion, ideology, resources, land, spite, love or just because... No matter how pathetic the reason, it's enough to start a war. pgplrhIY4ZYw1.pgp Description: PGP signature
Re: [PHP] PHP 5.2.2 - Undefined Function mysql_connect()
Compare what ?php phpinfo();? says is REALLY your extension dir with what you think is your extension dir... On Mon, May 7, 2007 6:12 am, Jason Paschal wrote: I use this setup locally for testing/playing. I recently installed the latest and greatest of the AMP collection. Apache 2.2.4 PHP 5.2.2 MySQL 5.0.37 Apache and PHP work fine together, but I wanted to hook it up to a local test database, so I installed MySQL. In php.ini, i have: ; Directory in which the loadable extensions (modules) reside. extension_dir = C:\PHP i made sure that i moved the dll to that folder, just like i did with the gd dll. And then i uncommented this line: extension=php_mysql.dll I restarted Apache, and ran a simple test script: ?php ini_set(display_errors,1); $cn = mysql_connect(localhost,root,password); ? and I get the error: *Fatal error*: Call to undefined function mysql_connect() any ideas? thanks in advance, jason -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php