Magic quotes gpc off joomla 3.0 cpanel hosting

This will solve the problem of getting "Class 'PDO' not found" when you create a local php.ini file.

If you can't turn off magic quotes using the htaccess file (for reasons already given by Pete Bailey) just:

  1. Create a text file
  2. Rename it to 'php.ini'

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
extension=pdo.so
extension=pdo_mysql.so

Save it to the directory/ies in which your scripts are executing.

Magic quotes gpc off joomla 3.0 cpanel hosting for reasons

Update: if you want to have just one copy of the new php.ini file then add this line to your root .htaccess file:

Obviously you need to move the ini file to this location of it's not there already.

Hope that saves someone the 2 hours it's just taken me!

The php_flag and php_value inside a .htaccess file are technically correct - but for PHP installed as an Apache module only. On a shared host you'll almost never find such a setup; PHP is run as a CGI instead, for reasons related to security (keeping your server neighbours out of your files) and the way phpsuexec runs scripts as 'you' instead of the apache user.

Apache is thus correct giving you a server error: it doesn't know about the meaning of php_flag unless the PHP module is loaded. A CGI binary is to Apache an external program instead, and you can't configure it from within Apache.

Now for the good news: you can set up per-directory configuration putting there a file named 'php.ini ' and setting there your instructions using the same syntax as in the system's main php.ini. The PHP manual lists all settable directives: you can set those marked with PHP_INI_PERDIR or PHP_INI_ALL, while only the system administrator can set those marked PHP_INI_SYSTEM in the server-wide php.ini.

Note that such php.ini directives are not inherited by subdirectories, you'll have to give them their own php.ini.

I know I'm late to answer this, but I read most of the answers and while many were great, only djn actually explained why you were getting this 500 Internal Server Error.

While his explanation was 100% correct, this is a perfect example of why you should always wrap those in an . While this won't fix the actual problem of not being able to set those flags in your .htaccess. it will at least prevent the 500 error .

Or for older versions it would be etc.

I try to make a habit out of always doing this so as to avoid any such 500 errors. After that, just apply what Peter Bailey said .

Related articles

Hosting magic quotes gpc off joomlaGo to MAMP application >> Preferences (button) >> PHP (tab) >> Choose 5.3.1 or greater >> choose OK. Go to the MAMP folder >> bin >> php >> php5.3.26 >> conf >> edit php.ini >> add...
Teamspeak 3 viewer joomla hostingI wrote a simple TeamSpeak 3 viewer module for Joomla 1.6. I'd like to hear your opinion, before I submit my extension to extensions.joomla.org, if that's ok for you. It has some basic options,...
Cookieless domain joomla hostingAsked: 2015-03-09 3:06 pm EST Per YSlow and Page Speed, I am attempting to set up a separate subdomain hosting the cookieless content for me site. There are many articles on the web about...
Magic quotes gpc off wordpress hostingAsked: 2013-05-04 11:24 am EST Hello, I started using Joomla 3 and now have problems and was told magic quotes need to be off for it to function correctly. Using live chat they said I could...
Flashmatic module for joomla hostingRSFlashMatic is a Joomla Module works natively in Joomla environment. This is a highly customizable XML Image Rotator with more than 35 XML options, including the masking size and speed. You...