configuration problem

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

configuration problem

Post 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...
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

Post by bdlang »

The MySQL extension is not installed.

What platform are you working with? Windows or UNIX/Linux/MAC?
bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

Post by bruceaj »

I'm on a Windows Vista Platform
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

Post by bdlang »

Ah. Not familiar with Vista, are you working with IIS as well, or Apache?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post 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.
bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

Post 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..
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

And... MySQL is running?
bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

Post by bruceaj »

Yes. Mysql is running. I can go to a command line and execute sql instructions.
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post 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.
bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

Post 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
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Search Google for WAMP. (Windows-Apache-MySQL-PHP)
bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

Post 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....
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Right. Then you have to choose which extensions to enable.

There should be a whole list of them.
bruceaj
Forum Newbie
Posts: 16
Joined: Sun May 27, 2007 8:43 am

Post 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??
Post Reply