Hi all,
I designed a website 10 years ago and a friend built is using perch.
I've just had the client message me to say the site isn't working. Every element that uses perch isn't loading.
I've check the error log (snippet below attached, it's 100mbs in total).
Code
- [23-Feb-2021 11:18:59 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php:18
- Stack trace:
- #0 /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php(62): PerchDB_MySQL->open_link()
- #1 /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php(237): PerchDB_MySQL->get_link()
- #2 /home/ourdoctorsco/public_html/admin/apps/content/PerchContent.class.php(567): PerchDB_MySQL->pdb('/news/index.php')
- #3 /home/ourdoctorsco/public_html/admin/apps/content/PerchContent.class.php(549): PerchContent->get_content()
- #4 /home/ourdoctorsco/public_html/admin/apps/content/PerchContent.class.php(40): PerchContent->populate_cache()
- #5 /home/ourdoctorsco/public_html/admin/apps/content/runtime.php(15): PerchContent->get('News Article')
- #6 /home/ourdoctorsco/public_html/news/index.php(16): perch_content('News Article')
- #7 {main}
- thrown in /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php on line 18
- [23-Feb-2021 11:19:00 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php:18
- Stack trace:
- #0 /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php(62): PerchDB_MySQL->open_link()
- #1 /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php(237): PerchDB_MySQL->get_link()
- #2 /home/ourdoctorsco/public_html/admin/apps/content/PerchContent.class.php(631): PerchDB_MySQL->pdb('News Article')
- #3 /home/ourdoctorsco/public_html/admin/apps/content/PerchContent.class.php(60): PerchContent->get_content_raw('News Article', '/news/index.php')
- #4 /home/ourdoctorsco/public_html/admin/apps/content/runtime.php(41): PerchContent->get_custom('News Article', Array)
- #5 /home/ourdoctorsco/public_html/include/header.php(173): perch_content_custom('News Article', Array)
- #6 /home/ourdoctorsco/public_html/index.php(5): include('/home/ourdoctor...')
- #7 {main}
- thrown in /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php on line 18
- [23-Feb-2021 11:19:08 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php:18
- Stack trace:
- #0 /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php(62): PerchDB_MySQL->open_link()
- #1 /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php(100): PerchDB_MySQL->get_link()
- #2 /home/ourdoctorsco/public_html/admin/lib/PerchSettings.class.php(36): PerchDB_MySQL->get_rows('SELECT settingI...')
- #3 /home/ourdoctorsco/public_html/admin/lib/PerchLang.class.php(19): PerchSettings->get('lang')
- #4 /home/ourdoctorsco/public_html/admin/lib/PerchLang.class.php(39): PerchLang->__construct()
- #5 /home/ourdoctorsco/public_html/admin/lib/PerchLang.class.php(56): PerchLang::fetch()
- #6 /home/ourdoctorsco/public_html/admin/index.php(26): PerchLang::get('Log in')
- #7 {main}
- thrown in /home/ourdoctorsco/public_html/admin/lib/PerchDB_MySQL.class.php on line 18
My hosting company have been decommissioning anything PHP below 7.2 and I'm guessing this is an old Perch install as it was original created in 2011.
Does the above look like it's an issue with the PHP being upgraded automatically?
Any help would be greatly appreciated. Oh and the website is http://ourdoctors.co.uk/
Cheers
Adam