php not connecting with mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
arshadmilad
Forum Newbie
Posts: 1
Joined: Mon Dec 22, 2008 7:17 am

php not connecting with mysql

Post by arshadmilad »

hi, everyone. is there anyone who can fix my problem? i am new to php and mysql. i am having problem to connect php with mysql. i am using php 5 and mysql 5. but when i want to connect error message generated. "fatal error undefined function phpmysqli_connect()" or "fatal error undefined function phpmysql_connect()". plz help why? :banghead:
User avatar
The_Anomaly
Forum Contributor
Posts: 196
Joined: Fri Aug 08, 2008 4:56 pm
Location: Tirana, Albania

Re: php not connecting with mysql

Post by The_Anomaly »

As unfortunate as it might seem, we're not omniscient. Please post your code and information about your setup if you want any meaningful response.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: php not connecting with mysql

Post by John Cartwright »

Mysql is not enabled by default for php version greater than 5.0. Open up your php.ini and enable the extension (don't forget to restart apache to have the changes take effect).
Post Reply