How to solve problems with creating files from PHP-scripts

From ISPWiki

Jump to: navigation, search

Sites' scripts cannot record files to the disk

PHP-scripts are normally run with privileges that are used to start Apache, such as www or apache, depending on the operating system.

Files and directories in the user's home directory do not have record privileges.

Thus, you need to change the owner (for example, into www) of the directory where the record will be made, or specify privileges to access this directory enabling other users to log files there (e.g. 777).

Alternatively, you can change PHP-script operating modes (go to ISPmanager -> the WWW domains module) into PHP as CGI or PHP as FastCGI to allow recording files on the disk.

Also, there is a MPM-ITK patch for Apache that enables to run scripts in the mode PHP as Apache module. You need to configure ISPmanager to run this mode.

Was this helpful? Yes | No
Personal tools