Select Page

PHP Security


How to fix Fatal error: Class ‘PDO’ not found in PHP apps like Drupal, Prestashop, Joomla, etc

How to fix Fatal error: Class ‘PDO’ not found in PHP apps like Drupal, Prestashop, Joomla, etc

Fatal error: Class ‘PDO’ not found is an error seen in websites running PHP applications such as Drupal, Prestashop, WordPress, etc. It’ll look something like this:

Fatal error: Class 'PDO' not found in /home/romrac/public_html/drupal/includes/database/database.inc on line 187

This error reports that the web server was unable to locate a PHP module called “PDO” in the server. Web applications require this PHP module to establish a database connection. (more…)

PHP permission : For PHP files under suPHP – solved

While discussing PHP permissions in the last blog, we concluded that SuPHP servers ideally needed PHP file permissions of just 600.

Out of many means to set the permission/ownership, the quickest is to set the permissions, using a script. You may set this script as a cron that runs daily or weekly, to take care of the the permissions. The script is now written for a server that has cPanel installed. Slight modifications to it, would make it work with other control panels, or even on servers that do not have any control panels.

The script also allows certain accounts to have custom PHP permissions, so that any custom application that needs specific permissions can be run, and such accounts would not be affected by the script.

 

Hire Bobcares Linux Server Administrators
Get super reliable servers and delighted customers

See how we do it!

 

(more…)

Disable PHP open_basedir protection in cPanel/WHM

PHP open_basedir directive is used to limit the files that can be opened by PHP to a specific directory-tree. What does that mean? With the open_basedir directive, you can tell the PHP scripts on a domain, which folders they have access to. Once specified, the PHP scripts will not be able to access files outside those folders.

 

(more…)

Secure Your PHP Scripts

Secure Your PHP Scripts

PHP security is very important, as insecure php code can trigger in intrusion to your server. This article explains few such vulnerabilities, so that you can avoid them in your scripts. I will also explain methods to tweak PHP config files(php.ini) for maximum security.

(more…)