Jump to content

Archived

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

flandercan

Where am i going wrong??

Recommended Posts

Hello folks,

 

I have installed apache and sql server, when i use an sql command from the php script i get an error

 

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/sqltest/sql.php on line 5

 

line five reads

 

$link = mysql_connect( \"localhost\", $user, $pass);

 

I am using RH8 and have installed all parts from the cd for apache and sql but it still seems as though mysql_connect is an undefined function,

 

what have i missed out??

 

thanks

Paul

Share this post


Link to post
Share on other sites

php needs to be compiled with the --with-mysql=/path/to/mysql option.

Share this post


Link to post
Share on other sites

thanks i understand but im still not sure ? i have installed the RPM from the package list in RH8 should i remove the php and download source, compile it and then install it??

 

it seems long winded for somthing that should really be there as standard?

 

 

 

thanks

Share this post


Link to post
Share on other sites

Its been a while since i solved this so ill jot it down if someone else has the same problem,

 

I installed red hat 8 and the sql and php from the package manager. What i needed to do to get them talking was install the phpsql bit but had to boot from the cd and perform an upgrade, then find the module in the detailed software list and install that. Then it worked perfect.

 

Paul

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.