Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Broken Again!


mrcoffee182

Recommended Posts

Ok, so I have no idea why but my site just keep breaking from time to time. I would love to tell you i'd changed something or wiped a file, but I haven't touched a thing and am now getting the following error message when attempting to load any page on my site...

 

Fatal error: Call to undefined function: mysql_pconnect() in /home/httpd/vhosts/cyclesportuk.co.uk/httpdocs/includes/functions/database.php on line 17

 

and when trying to get into admin, the ver similar...

 

Fatal error: Call to undefined function: mysql_pconnect() in /home/httpd/vhosts/cyclesportuk.co.uk/httpdocs/admin/includes/functions/database.php on line 17

 

 

This refers to this part of code:

 

16 if (USE_PCONNECT == 'true') {

17 $$link = mysql_pconnect($server, $username, $password);

18 } else {

19 $$link = mysql_connect($server, $username, $password);

20 }

 

 

 

I have tried changing the PCONNECT to false in both configue files, but the error message then changes to read 'line 19'.

 

 

I have searched the forum and seen others with a similar problem but no consistent fix. Anyone got any idea?

 

Thanks in advance.

Link to comment
Share on other sites

Try this, but I can't guarantee it will work. At least it didn't throw up any problems when I tested it out:

 

if (USE_PCONNECT == 'true') {
  $$link = mysql_pconnect($server, $username, $password);
} elseif (USE_PCONNECT == 'false'){
  $$link = mysql_connect($server, $username, $password);
}

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...