My PHP scripts produce Internal Server Errors (500 error)

Some of our servers run PHP scripts as your own user instead of the global web server user. PHP scripts should always be set to the permissions of 644 (user = read and write, group = read only, and world/other = read only).

Directories should be set at 711 or 755 (user = read, write and execute, group = execute or read and execute, world/other = execute or read and execute, respectively).

Also, be sure that you don't have any directives for PHP settings in your .htaccess file that might be causing errors, and that the scripts themselves don't suffer from any syntax errors.

Servers running PHP as your own user allow you to upload or create your own php.ini file, which you can store in your account's public_html web root directory itself, rather than using directives in the .htaccess file.

For servers running PHP as module to run the script as the global web server user, you can get away with more open settings (and use .htaccess settings for PHP variables, if needed), though you should not set a file or directory to world write permission unless you absolutely need to.

  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

PHP Sample Form mailer

Question: Where can I get sample php-form-mail script (form to email) script ? <!-- /*...

How can I view my client's web site before the domain propagates?

Since the client's account is sharing an IP with other sites, you have to use the ~account method...

How to use Entropy Search

This script enables a nice, quick search engine that can help your visitors find information that...

How to check server status?

http://www.trafficpullz.com/serverstatus/This will indicate to you whether a server or service,...

How do I move an existing website/domain to my Trafficpullz?

HI It’s actually quite easy, The first thing you will need is a hosting account, which you can...