Guest_imported
New member
- Jan 1, 1970
- 0
I have Apache and MySQL running on this machine. I can create and view PHP pages correctly. I can also use MySQL with no problems. But when I tried to connect to MySQL by using the mysql_connect() function I recieved this error:
Parse error: parse error in /var/ on line 3
my code looks like this:
<?php
// Connecting, selecting a database
$link = mysql_connect("localhost","user","password" or die($php_errormsg|;
print "connected successfully";
mysql_select_db("itcsrdb" or die("could not select database"
// Closing connection
mysql_close($link);
?>
the username and password are correct. I then went to look at my phpinfo.php page that I was told to create when I installed PHP on Apache and in the Configuration Command I found this '--without-mysql'. I then proceeded to go to the php.ini file and could not figure out where to set mysql to 'with' i saw that the mysql.so was commented out (;mysql.so). I uncommented it and still no dice. Can someone please help. Thank You
Parse error: parse error in /var/ on line 3
my code looks like this:
<?php
// Connecting, selecting a database
$link = mysql_connect("localhost","user","password" or die($php_errormsg|;
print "connected successfully";
mysql_select_db("itcsrdb" or die("could not select database"
// Closing connection
mysql_close($link);
?>
the username and password are correct. I then went to look at my phpinfo.php page that I was told to create when I installed PHP on Apache and in the Configuration Command I found this '--without-mysql'. I then proceeded to go to the php.ini file and could not figure out where to set mysql to 'with' i saw that the mysql.so was commented out (;mysql.so). I uncommented it and still no dice. Can someone please help. Thank You