7 Replies - 1701 Views - Last Post: 15 July 2011 - 11:30 AM

#1 thephpdev  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 59
  • Joined: 01-July 11

500 Internal Server Error

Posted 14 July 2011 - 06:12 PM

Hello, I've been setting up my server with php 5.3.6, mysql, pgsql, and apache 2.2.19. While I did that, I was able to get everything downloaded and installed with apache started. What really got me was when I created a simple php file and placed it on my localhost directory and it gave me a 500 Internal Server Error. I checked the apache logs and this is what it said:

[Thu Jul 14 20:10:16 2011] [error] [client ::1] suexec policy violation: see suexec log for more details
[Thu Jul 14 20:10:16 2011] [error] [client ::1] Premature end of script headers: index.php


and here's the suexec log:

[2011-07-14 20:10:16]: uid: (501/joshua) gid: (501/joshua) cmd: index.php
[2011-07-14 20:10:16]: file is writable by others: (/home/joshua/public_html/index.php)


any help would be very appreciated here.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: 500 Internal Server Error

#2 thephpdev  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 59
  • Joined: 01-July 11

Re: 500 Internal Server Error

Posted 14 July 2011 - 08:50 PM

Forgot to mention, my operating system is Linux - Fedora release 12
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5069
  • View blog
  • Posts: 26,453
  • Joined: 10-May 07

Re: 500 Internal Server Error

Posted 14 July 2011 - 08:51 PM

Issue chmod 444 index.php
Was This Post Helpful? 0
  • +
  • -

#4 thephpdev  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 59
  • Joined: 01-July 11

Re: 500 Internal Server Error

Posted 14 July 2011 - 08:56 PM

Doing that, I got the same apache errors and the following suexec errors:

[2011-07-14 22:54:07]: uid: (501/joshua) gid: (501/joshua) cmd: index.php
[2011-07-14 22:54:07]: file has no execute permission: (/home/joshua/public_html/Syfer/index.php)

Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5069
  • View blog
  • Posts: 26,453
  • Joined: 10-May 07

Re: 500 Internal Server Error

Posted 14 July 2011 - 09:22 PM

Issue chmod 555 index.html
Was This Post Helpful? 0
  • +
  • -

#6 thephpdev  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 59
  • Joined: 01-July 11

Re: 500 Internal Server Error

Posted 14 July 2011 - 09:54 PM

Current Apache Errors:
[Thu Jul 14 23:51:08 2011] [error] [client ::1] suexec failure: could not open log file
[Thu Jul 14 23:51:08 2011] [error] [client ::1] fopen: Permission denied
[Thu Jul 14 23:51:08 2011] [error] [client ::1] Premature end of script headers: index.php



I have no idea where the fopen is, i've searched the code and the include files

Current suexec Errors:
[2011-07-14 23:51:08]: uid: (501/joshua) gid: (501/joshua) cmd: index.php


Was This Post Helpful? 0
  • +
  • -

#7 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5069
  • View blog
  • Posts: 26,453
  • Joined: 10-May 07

Re: 500 Internal Server Error

Posted 14 July 2011 - 10:07 PM

Two questions :

1.) What user is the server running under?
2.) What walk-through/directions did you follow when setting this up? It seems like the files/directories have a permission issue with the web server user permissions.
Was This Post Helpful? 0
  • +
  • -

#8 thephpdev  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 59
  • Joined: 01-July 11

Re: 500 Internal Server Error

Posted 15 July 2011 - 11:30 AM

1) User is joshua
2) Setting this up all automatic, I made a shell script that installed all of the files like apache and php so they're default.

(Directory where it's set up)
public_html/
drwxr-xr-x 10 joshua joshua     4096 2011-07-14 20:10 public_html


Directory_containing_index/
drwxr-xr-x  2 joshua joshua 4096 2011-07-14 19:58 Directory_containing_index


index.php
-r-xr-xr-x  1 joshua joshua 1760 2011-07-14 19:58 index.php


All the other files under the directory look similar to this:
-rwxrwxrwx  1 joshua joshua 3786 2011-07-14 18:48 functions.php


Thank you so much for helping me by the way, been trying to work this out for a long time.

This post has been edited by thephpdev: 15 July 2011 - 11:32 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1