Page 1 of 3

configuration problem

Posted: Sun May 27, 2007 8:47 am
by bruceaj
I'm getting the following errror. Obviously I have a configuration problem. What is it?

Fatal error: Call to undefined function mysql_pconnect()

Thanks...

Posted: Sun May 27, 2007 9:32 am
by bdlang
The MySQL extension is not installed.

What platform are you working with? Windows or UNIX/Linux/MAC?

Posted: Sun May 27, 2007 10:25 am
by bruceaj
I'm on a Windows Vista Platform

Posted: Sun May 27, 2007 2:33 pm
by bdlang
Ah. Not familiar with Vista, are you working with IIS as well, or Apache?

Posted: Sun May 27, 2007 4:24 pm
by feyd
Either way (IIS vs Apache) MySQL would be enabled via php.ini if you're running PHP 5+. It was built-in previously.

Posted: Sun May 27, 2007 4:34 pm
by superdezign
Fun fact. :-p

Maybe try mysql_connect instead of mysql_pconnect. I'm not sure, but it may be an inconsistency among MySQL versions. (Unless you just haven't installed it.)

If you are working locally, you probably just don't have MySQL installed.

Posted: Sun May 27, 2007 8:27 pm
by bruceaj
Okay. I'm running Apache 2.2, MySQL 5 is installed, and I am using PHP 5. My operating system is Windows Vista Home premium..

Posted: Sun May 27, 2007 9:41 pm
by superdezign
And... MySQL is running?

Posted: Mon May 28, 2007 3:03 am
by bruceaj
Yes. Mysql is running. I can go to a command line and execute sql instructions.

Posted: Mon May 28, 2007 4:35 am
by jmut
superdezign wrote:And... MySQL is running?
Even if not running, this is no reason to get

Fatal error: Call to undefined function mysql_pconnect()


I suggest do phpinfo(). check if mysql extension is loaded.

check error logs as well.

Posted: Mon May 28, 2007 7:41 am
by bruceaj
I did a phpinfo() and then searched for mysql. The only place I found it was in my path information. So, perhaps, the extensions are not defined. Where and how do I add them?

Thank you

Posted: Mon May 28, 2007 7:48 am
by superdezign
Search Google for WAMP. (Windows-Apache-MySQL-PHP)

Posted: Mon May 28, 2007 7:54 am
by bruceaj
Thanks. I'll search.

But, I have "C:\php" in my Path, where my php.ini is located. Within php.ini, I have

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:/php/ext"

Shouldn't this do it?

Thanks....

Posted: Mon May 28, 2007 8:04 am
by superdezign
Right. Then you have to choose which extensions to enable.

There should be a whole list of them.

Posted: Mon May 28, 2007 8:20 am
by bruceaj
First, in response to an earlier suggestion, I change pconnect to just connect.. Same problem.

Now, the extensions I have "uncommented" are:

extension=php_gd2.dll
extension=php_imap.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdf.dll

Am I missing any??