Jump to content


- - - - -

Servers being converted to suPHP.


  • You cannot reply to this topic
No replies to this topic

#1 DS-Dennis

    System Administrator

  • Administrators
  • 517 posts
  • Gender:Male
  • Location:Netherlands

Posted Sep. 13, 2008 - 23:37 pm

The days of not being able to edit or delete a file or folder owned by nobody are over! DS-Hosting Solutions will be converting all servers to suPHP which greatly increases server security and fixes the issue of scripts creating files owned by nobody (which makes them impossible to delete by the user).

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
This greatly increases security by not allowing outside users to edit files with writable permissions. We will change all your current files and folders to the new permissions.

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 = 180
Using 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.so
MIMEtypes
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
Errors you may encounter
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







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users