Error with mysql on windows

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

Post Reply
rileychilds
Forum Newbie
Posts: 14
Joined: Mon Feb 06, 2012 5:43 pm

Error with mysql on windows

Post by rileychilds »

So im having a problem and I know it is not the code since the code runs fine on other servers. here is the error:

[syntax]
Fatal error: Call to undefined function mysql_connect() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\OLMS\connect.php on line 11
[/syntax]

I have gone though all the usual troubleshooting deals with checking the php.ini and system PATH vereiable etc.

System Specs:
Windows Server 2008 R2 64-bit
Mysql
Apache 2.2
PHP 5.2
1 GB RAM

any help would be appreciated, I have never had this problem before!
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Error with mysql on windows

Post by Celauran »

You shouldn't really be using mysql_connect anyway. That aside, check your phpinfo() to ensure support was compiled in. You may just need add a .dll reference to your php.ini.
rileychilds
Forum Newbie
Posts: 14
Joined: Mon Feb 06, 2012 5:43 pm

Re: Error with mysql on windows

Post by rileychilds »

You shouldn't really be using mysql_connect anyway. That aside, check your phpinfo() to ensure support was compiled in. You may just need add a .dll reference to your php.ini.
I did that before! What should I be using if not mysql_connect() :banghead: :?:
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Error with mysql on windows

Post by Celauran »

MySQLi or PDO. This is a separate point, though, and won't solve the problem at hand. You've confirmed that the necessary dll references exist in your php.ini? Restarted Apache since?
Post Reply