How does it increase security?
Files no longer need to be 666 and folders no longer need to be 777 to be writable. The new writable permissions are:
- Files: 644
- Unwritable Files: 444
- Folders: 755
Things to note.
PHP flags no longer work in the .htaccess file. If you need to enable things such as register globals you can follow the below guide (we will add most of these things for you):
In .htaccess under public_html, add the following:
suPHP_ConfigPath /home/user/public_html <Files php.ini> order allow,deny deny from all </Files>Note: You must change user to your account username.
Create a php.ini file under public_html and add any of the below settings that you need:
register_globals = On upload_max_filesize = 30M post_max_size = 30M memory_limit = 30M upload_tmp_dir = 30M max_execution_time = 180Using a php.ini file may cause issues if your scripts use Zend Optomizer or IonCube encoding. You then just need to add the following to your php.ini file to resolve the issue:
[Zend] zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.2.so zend_optimizer.optimization_level=15 zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.soMIMEtypes
If you added a Mimetype to the system in order to run HTML files as PHP scripts you will have to remove it. Then add an ApacheHandler instead. Log into cPanel and click on Apache Handlers, then add the following:
- Extension: .html
- Handler: application/x-httpd-php
If you get a 500 error when accessing your site, you either have code that doesn't belong in your .htaccess file or you changed the permissions on a file to 666 or a folder to 777.
Drupal and other Content Management Systems:
In older versions you may experience a few errors, such as "Call to undefined function: user_access()".
Add the following code to php.ini to fix it:
session.save_handler = files session.cache_limiter = nocache















