Php script fails to execute when placed under cron in Openshift application

Solution Verified - Updated -

Issue

  • When a php script is placed under cron of Openshift application below errors are seen:
/var/lib/openshift/<GEAR_UUID>/app-root/runtime/repo//.openshift/cron/minutely/automation:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/ldap.so' - /usr/lib64/php/modules/ldap.so: cannot open shared object file: No such file or directory in Un$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqlnd.so' - /usr/lib64/php/modules/mysqlnd.so: cannot open shared object file: No such file or directory$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqlnd_mysql.so' - /usr/lib64/php/modules/mysqlnd_mysql.so: cannot open shared object file: No such file $
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqlnd_mysqli.so' - /usr/lib64/php/modules/mysqlnd_mysqli.so: cannot open shared object file: No such fil$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysqlnd.so' - /usr/lib64/php/modules/pdo_mysqlnd.so: cannot open shared object file: No such file or d$
PHP Fatal error:  Class 'mysqli' not found in /var/lib/openshift/<GEAR_UUID>/app-root/runtime/repo/config.php on line 21
  • Can a php script execute when placed under cron in Openshift application?

Environment

  • Openshift Enterprise
    • 2.0
  • Openshift Online

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.