Jump to content

mysqli_connect


indiana06

Recommended Posts

Hi there i am new to this.My problem is that I get a message saying that the mysql_connect function is undefined.I have found that mysql is not connected to windows but I can use the command line prompt.When I try to reconfigure the instance it tells me that I can't connect to windows. It suggests a firewall but when I drop the firewall it still won't connect.It also suggests opening the port 3306 which I did but I still cant' get it to connect.I have been trying for seven days now with still no joy. I have got php talking to apache but I'm afraid this one's got me beat. Can anyone help please. :)

Link to comment
Share on other sites

Did you compile your version of PHP with MySQL support?

In order to have [the MySQL] functions available, you must compile PHP with MySQL support.
Try creating a new page with this code:
<?phpecho php_info();?>

And see whether it says anything about MySQL.

Link to comment
Share on other sites

Did you compile your version of PHP with MySQL support?Try creating a new page with this code:
<?phpecho php_info();?>

And see whether it says anything about MySQL.

Thanks synook i tried what you said and it still says fatal error call to undefined functionI have also found when trying to reconfigure the instance in mysql that I get a warning saying that it cannot connect to windows It says there might be a firewall problem so I Went into the windows firewall and opened up a port 3306 to let mysql run on windows but it still gives me the same answer I'm now sure that this is the reason but I still cant get it to work.i would be gratefull for any help as I am now getting really fed up with it. it's stopping me from getting any further and I am now learning nothing from this experience.
Link to comment
Share on other sites

Hang on are you trying to use mysqli_connect() (as per your title) or mysql_connect() (as per your post text)?

Link to comment
Share on other sites

Make sure you have the extensions enabled. If you downloaded the version of PHP that includes an installer that you run, that version does not include most of the extensions you'll want to use. You will want to download the regular zip package containing everything and go through the installation steps in the manual to get it installed and configured. Once it's installed you can go through php.ini and enable whatever extensions you want to use.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...