Forum

Thread tagged as: Problem, Twitter

Twitter Cron Job: PHP Fatal error

Hi

I built a Perch website last November, it used Perch Twitter app with a cron job - it all worked fine until this weekend, when I received an error message email every time the cron job tried to run.

     PHP Fatal error:  Class 'mysqli' not found in /nfs/c11/h02/mnt/197405/domains/domain-name.co.uk/html/perch/core/lib/PerchDB_MySQLi.class.php on line 27

I've upgraded everything today hoping it would fix the issue, but I'm still receiving the error messages.

The strangest part of this is the Twitter feed on my clients website is still working, any ideas what's going on?

  • Perch is up to date
  • PHP 5.5.18 is up to date
  • MySQL 5.1.72-rel14.10 is up to date
  • Image processing available
  • File upload size is low. You can only upload files up to 2M.

Diagnostic Information

  • Perch: 2.7.10, PHP: 5.5.18, MySQL: 5.1.73, with PDO
  • Server OS: Linux, cgi-fcgi
  • Installed apps: content (2.7.10), assets (2.7.10), categories (2.7.10), perch_forms (1.7), perch_twitter (3.5.1)
  • App runtimes: <?php $apps_list = array( 'content', 'perch_forms', 'perch_twitter', );
  • PERCH_LOGINPATH: /perch
  • PERCH_PATH: /nfs/c11/h02/mnt/197405/domains/domain-name.co.uk/html/perch
  • PERCH_CORE: /nfs/c11/h02/mnt/197405/domains/domain-name.co.uk/html/perch/core
  • PERCH_RESFILEPATH: /nfs/c11/h02/mnt/197405/domains/domain-name.co.uk/html/perch/resources
  • Image manipulation: GD
  • PHP limits: Max upload 2M, Max POST 8M, Memory: 99M, Total max file upload: 2M
  • Resource folder writeable: Yes
  • HTTP_HOST: domain-name.co.uk
  • DOCUMENT_ROOT: /home/197405/domains/domain-name.co.uk/html
  • REQUEST_URI: /perch/core/settings/diagnostics/
  • SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Stephen Meehan

Stephen Meehan 4 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

PHP on the command line (CLI) can have a different configuration and a different php.ini file from the version your web server runs.

In this case it looks like your command line PHP doesn't have one of the two libraries Perch uses to connect to the database. It needs either mysqli or PDO.

That probably means speaking to your host.

Ok, thanks Drew.