PHP Errors

From Hostek.com Wiki
Revision as of 17:17, 29 July 2013 by Maxm (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page covers some PHP errors and resolutions to them

PHP Warning: PHP Startup: Unable to load dynamic library ...

This error usually occurs if you have a custom php.ini file abled for your site but it is trying to use a module that PHP cannot load. It could be that the path to the module on this server is different, or PHP has been upgraded and this module is no longer compatible the current version of PHP. The best way to resolve this issue is to use the current system php.ini file. The easiest way to do this:

  1. Login to cPanel
  2. Go to Software/Services > php.ini Settings
  3. Uncheck the "Enable custom php.ini" checkbox and click on Save
  4. Check that checkbox and click on Save. This will copy over the latest version of the php.ini for your site
  5. If you need to refer to your previous copy, it got renamed to something like php.ini.1375117710 (the last part of the file name is the timestamp)

If you're a VPS customer, you could do this through the command line interface:

  1. SSH into your VPS
  2. Backup the your current custom php.ini:
    cp /home/username/public_html/php.ini /home/username/public_html/php.ini.bak
  3. Copy the current system php.ini file:
    cp /usr/local/lib/php.ini /home/username/public_html/
  4. Change the user/owner for the custom php.ini file:
    chown username.username /home/username/public_html/php.ini

Replace username with the real username of the site