I have been working on an app for a couple weeks now, using GoDaddy, Windows Server (I know it sucks) everything seemed ok, I have been a PHP programmer for about a year now and have never come across something like this, I have been connecting to a mysql db all day and all of a sudden I’m getting this error:
Call to undefined function mysql_connect() on Line 6
Could some type of a syntax error be causing this?
I was coding a curl that pulled an XML Feed because I couldn’t use file_get_contents due to allow_url_fopen = off which seems to be impossible to change on godaddy with a windows server, and all of a sudden I got this error.
What could be causing this?
Here’s the Code in question:
session_start();
$hostname = “test.com”;
$user = “root”;
$pw = “passwd”;
$connection = mysql_connect($hostname,$user,$pw)
or die(“couldnt connect to db”);
$db = mysql_select_db (‘mydb’,$connection)
or die(“couldnt find db”);
I created a PHP5.ini to try to fix the allow_url_fopen and just found this question which could be related: Updating PHP.ini on a GoDaddy Hosted site
I have deleted the PHP5.ini file from the server, but the error still hasn’t gone away, maybe it needs some time?
This was the problem god window sucks
Updating PHP.ini on a GoDaddy Hosted site