Page 1 of 1

Error with mysql on windows

Posted: Tue Apr 10, 2012 11:13 am
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!

Re: Error with mysql on windows

Posted: Tue Apr 10, 2012 11:29 am
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.

Re: Error with mysql on windows

Posted: Tue Apr 10, 2012 1:42 pm
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: :?:

Re: Error with mysql on windows

Posted: Tue Apr 10, 2012 1:53 pm
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?