user3791650
user3791650

Reputation: 25

New php files not working on cPanel

So I have a website where I have many files all of them are written in php and works perfectly fine, except the new files, whenever I create a new php file and run it from the browser it show 500 Internal server error. I have tried removing all the content from php file and echoed a single line but I got the same error. I created a local php.ini file for that particular domain and tried to turn the errors on but nothing really changed. Don't know what to do to find what is wrong.

Upvotes: 1

Views: 12449

Answers (1)

meda
meda

Reputation: 45490

This is due to permission, php files need to be executable:

  • Directories and folders should be set to 755.
  • Executable scripts within the cgi-bin folder must be set to 755.
  • Images, media, and text files like HTML should be set to 644.

You can use command chmod to set the proper permission.

Upvotes: 6

Related Questions