Forum

Thread tagged as: Problem, Error, Hosting

Fatal Error / Can't login to view Settings in Perch Admin

Hi

I have an issue with site that I’m running Perch on.

"Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home1/whydidib/public_html/campbellreadbooks/admin/lib/PerchDB_MySQL.class.php:18 Stack trace: #0 /home1/whydidib/public_html/campbellreadbooks/admin/lib/PerchDB_MySQL.class.php(62): PerchDB_MySQL->open_link() #1 /home1/whydidib/public_html/campbellreadbooks/admin/lib/PerchDB_MySQL.class.php(237): PerchDB_MySQL->get_link() #2 /home1/whydidib/public_html/campbellreadbooks/admin/apps/content/PerchContent.class.php(360): PerchDB_MySQL->pdb('/index.php') #3 /home1/whydidib/public_html/campbellreadbooks/admin/apps/content/PerchContent.class.php(344): PerchContent->get_content() #4 /home1/whydidib/public_html/campbellreadbooks/admin/apps/content/PerchContent.class.php(27): PerchContent->populate_cache() #5 /home1/whydidib/public_html/campbellreadbooks/admin/apps/content/runtime.php(18): PerchContent->get('New Titles') #6 /home1/whydidib/public_html/campbellreadbooks/index.php(53): perch_content('New Titles') #7 {main} thrown in /home1/whydidib/public_html/campbellreadbooks/admin/lib/PerchDB_MySQL.class.php on line 18”

Website: https://www.campbellreadbooks.com/ Login: https://www.campbellreadbooks.com/admin/

Not sure what is causing this issue? I haven't updated Perch in a long time so not sure if there is a compatibility issue with the version I have?

Thanks Keith

Keith Logan

Keith Logan 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Has something changed on your hosting?

If you haven't updated Perch in a long time then updating is a good idea anyway.

Hi, I think php was updated.

For updating, is it just the case of replacing the existing perch directory with the files from the latest version of perch?

Thanks

Rachel Andrew

Rachel Andrew 394 points
Perch Support

replace /perch/core but check out the update notes first https://grabaperch.com/update

You'll also need to update any addons.

I don't see a /core directory

When I download the latest version from my account it looks like I only have the option of perch_v1.8.4 - I see that there is 2.8.32.

Will that be the issue?

sorry, really not sure what I need to do to get my clients website back up.

Can you help me please?

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like your hosting has updated to a version of PHP that no longer includes the MySQL library that Perch 1 uses to connect to the database (maybe PHP 7?).

There isn't an updated version of Perch 1 for that. Perch 1 is discontinued.

The first thing to do would be to check with your host if the site can be switched back to the previous version of PHP (sometimes it's a control panel switch) to get you back up and running.