Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default 500 errors

    I get a 500 Internal server error when loading a site. I do have phpsuexec enabled, php5.

    Code:
    drwxr-xr-x  10 username username 4.0K Jan 20 17:13 ./
    drwx--x--x  42 root    root    4.0K Jan 20 00:46 ../
    -rw-r--r--   1 username username   24 Jan 19 17:56 .bash_logout
    -rw-r--r--   1 username username  191 Jan 19 17:56 .bash_profile
    -rw-r--r--   1 username username  124 Jan 19 17:56 .bashrc
    -rw-------   1 username username   22 Jan 20 06:04 .contactemail
    drwxr-xr-x   4 username username 4.0K Jan 20 17:13 cpanel3-skel/
    drwx------   2 username username 4.0K Jan 21 11:57 .cpanel-datastore/
    drwxr-xr-x   3 username username 4.0K Jan 20 11:31 etc/
    drwxr-xr-x   2 username username 4.0K Jan 20 17:06 .htpasswds/
    -rw-------   1 username username   12 Jan 21 11:57 .lastlogin
    drwxr-x---  10 username mail    4.0K Jan 20 15:58 mail/
    drwxr-x---   3 username username 4.0K Dec 22 11:58 public_ftp/
    drwxr-x---  13 username nobody  4.0K Jan 21 01:11 public_html/
    drwxr-xr-x   7 username username 4.0K Jan 20 18:19 tmp/
    lrwxrwxrwx   1 username username   11 Jan 19 17:56 www -> public_html/
    Code:
    drwxr-x---  13 username nobody  4.0K Jan 21 12:06 ./
    drwxr-xr-x  10 username username 4.0K Jan 20 17:13 ../
    drwxr-xr-x   2 username username 4.0K Jan 20 16:57 cgi-bin/
    drwxr-xr-x   2 username username 4.0K Jan 21 12:07 common/
    -rwxr-xr-x   1 username username  874 Jan 21 12:05 contact.php*
    -rwxr-xr-x   1 username username 1.3K Jan 21 12:05 copyright.php*
    drwxr-xr-x   2 username username 4.0K Jan 20 17:02 css/
    -rwxr-xr-x   1 username username 4.9K Jan 21 12:05 display_category.php*
    -rwxr-xr-x   1 username username 1.9K Jan 21 12:05 display_item.php*
    drwxr-xr-x   2 username username 4.0K Jan 20 16:57 drupal/
    drwxr-xr-x   3 username username 4.0K Jan 20 17:02 dtd/
    drwxr-xr-x   2 username username 4.0K Jan 20 17:02 files/
    -rwxr-xr-x   1 username username   21 Jan 21 12:05 .htaccess*
    drwxr-xr-x   5 username username 4.0K Jan 20 17:25 images/
    -rwxr-xr-x   1 username username 3.9K Jan 21 12:06 index.php*
    -rwxr-xr-x   1 username username 1.3K Jan 21 12:06 login.php*
    -rwxr-xr-x   1 username username 4.4K Jan 21 12:06 news_archive.php*
    -rwxr-xr-x   1 username username 2.6K Jan 21 12:06 news_current.php*
    drwxr-xr-x   3 username username 4.0K Jan 20 17:25 oldsites/
    drwxr-xr-x   5 username username 4.0K Jan 20 17:33 portfolio/
    drwxr-xr-x   3 username username 4.0K Jan 20 17:34 sites/
    drwxr-xr-x   2 username username 4.0K Jan 21 01:11 suspended.page/
    .htaccess file:

    Options All -Indexes


    What could be the problem? I am unable to find any details in the logs.

  2. #2
    Member
    Join Date
    May 2006
    Posts
    165

    Default

    Try setting public_html permissions to 755

  3. #3
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default

    I tried...same problem unfortunately

  4. #4
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default

    apache error logs:

    [Sun Jan 21 16:16:06 2007] [error] [client xxx.96.77.143] Premature end of script headers: /home/coopera/public_html/client/index.php
    [Sun Jan 21 16:16:06 2007] [error] [client xxx.96.77.143] File does not exist: /home/coopera/public_html/client/500.shtml
    [Sun Jan 21 16:17:59 2007] [error] [client xxx.96.77.143] File does not exist: /home/coopera/public_html/client/cpanl
    [Sun Jan 21 16:17:59 2007] [error] [client xxx.96.77.143] File does not exist: /home/coopera/public_html/client/404.shtml

  5. #5
    Member dafut's Avatar
    Join Date
    Dec 2005
    Posts
    75

    Default

    Not sure, not enough info, but have you checked your index.php page to make sure there are no leading or trailing spaces or lines before the opening "<?php "or closing "?>"(first or last) lines?

    Seems like I've seen this before (and it was actually a php include that caused the error due to spaces after the closing ">".

  6. #6
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default

    index.php file

    Code:
    <?php
    
    // Get session info.
    session_start();
    // Check that i'm logged in
    if (@!isset($_SESSION['authid'])) {
            // Not actually used. Though here for completeness
    }
    
    // Set up the database connection ready for use.
    require("common/ab.inc.php");
    $connection = mysql_connect($host, $user, $password) or die ("Could not connect to Server.");
    $db = mysql_select_db($database, $connection) or die ("Could not select database.");
    
    // Do queries necessary for page.
    // Query for items available to display. Only return 3 values in descending order.
    $sql = "SELECT tbl_items.*, tbl_categories.name FROM tbl_items, tbl_categories WHERE tbl_items.cat = tbl_categories.id AND tbl_categories.type = 'News' ORDER BY tbl_items.id DESC$
    $newsinbrief = mysql_query($sql) or die("Couldn't execute query.");
    
    ?>
    <?php include("common/head.php"); ?>
    
                            <h2 id="pageTitleStrip">Welcome</h2>
    
                            <div class="item trans95">
                                    <h3 class="date"></h3>
                                    <h3>The Portfolio web-site of SoSo</h3>
                                    <div class="text">
                                            <div class="divider">
                                                    <img class="icon left" src="images/icons/kdmconfig.png" alt="User Icon Icon" width="48" height="48" />
                                                    <p>I hold an BSc (hons) degree in Computer Science (2:1) and have a keen interest in website and
                                                    web-application design and development, focusing on graphical design. My technical skills are centred
                                                    around a thorough understanding of Object Orientated analysis, design and programming techniques.</p>
    
                                                    <p>I specialise in User Interface design and construction using HCI methodologies and am capable of producing
                                                    multi-threaded Java/Swing applications, Java Web Services using the Struts and Hibernate frameworks, and
                                                    JSR168 compliant portlets and portal systems.</p>
    
                                                    <p>I am a good team player and am able to work independently. I look forward to the prospect of working
                                                    in an industry where my current skill set can be put to good use and expanded upon.</p>
                                            </div>
                                    </div>
                                    <ul class="moreLinks">
                                            <li class="category"><a href="display_category.php?id=10" title="View CV">View/Download a CV</a></li>
                                            <li></li>
                                    </ul>
                            </div>
    
                            <?php
                                    if ($myrow = mysql_fetch_array($newsinbrief)) {
                                            do {
                            ?>
    
                            <div class="item trans95">
                                    <h3 class="date"><?php echo $myrow["date"] ?></h3>
                                    <h3><?php echo $myrow["title"] ?></h3>
                                    <div class="text">
                                            <div class="divider">
                                                    <img class="icon left" src="images/icons/<?php echo $myrow["icon"] ?>" alt="Item Icon" width="48" height="48" />
                                                    <?php echo $myrow["text"] ?>
                                            </div>
                                    </div>
                                    <ul class="moreLinks">
                                            <li class="category">
                                                    <a href="display_category.php?id=<?php echo $myrow["cat"] ?>" title="Display the items in this category"><?php echo $myrow["name"]$
                                            </li>
                                            <li>
                                                    <?php if ($myrow['file']!="") { ?>
                                                            <a href="display_item.php?id=<?php echo $myrow["id"] ?>" title="Display rest of item">More...</a>
                                                    <?php   } else { ?>
                                                            More...
                                                    <?php } ?>
                                            </li>
                                    </ul>
                            </div>
    
                            <?php
                                            } while ($myrow = mysql_fetch_array($newsinbrief));
                                    } else {
                            ?>
    
                            <div class="item trans95">
                                    <h3 class="date"><?php echo date("Y-m-d H:i:s"); ?></h3>
                                    <h3>No Results Returned</h3>
                                    <div class="text">
                                            <div class="divider">
                                                    <img class="icon left" src="images/icons/help_index.png" alt="Error Icon" width="48" height="48" />                               $
                                                    <p>I'm sorry but there were no results returned from the database for the category you searched for.
                                                    Perhaps no article/news items have been created. Please check back again later.</p>
                                            </div>
                                    </div>
                                    <ul class="moreLinks">
                                            <li class="category">Error</li>
                                            <li>More...</li>
                                    </ul>
                            </div>
    
                            <?php
                                    }
                            ?>
    
                            <div id="itemNav">
                                    <ul class="pagiation">
                                            <li><a href="news_current.php" title="View more news items">More News</a></li>
                                    </ul>
                            </div>
    
    <?php include("common/tail.php"); ?>

  7. #7
    Registered User
    Join Date
    Oct 2003
    Location
    Atlanta, GA
    Posts
    121

    Default

    did you ever find out what is causing the problem? i'm having the same issure

  8. #8
    Member
    Join Date
    Nov 2006
    Posts
    340

    Default

    after upgrading to php 4.4.5, it happened again (so far one mentioned domain reported)

    drwxr-x--- 11 user nobody 4.0K Sep 1 17:51 public_html/

    .htaccess is empty in public_html also

    I already ran chownpublichtmls also

    apache error log:

    [Thu Feb 22 17:04:50 2007] [error] [client xxx] Premature end of script headers: /home/user/public_html/index.php
    [Thu Feb 22 17:04:50 2007] [error] [client xxx] File does not exist: /home/user/public_html/500.shtml

    I also confirmed this is in httpd.conf

    AddHandler application/x-httpd-php .php .php4 .php3

    I ran as well;

    /scripts/fixsuexeccgiscripts
    /scripts/enablefileprotect
    service httpd restart
    Last edited by Zion Ahead; 02-22-2007 at 05:21 PM.

  9. #9
    Member
    Join Date
    Apr 2003
    Posts
    193

  10. #10
    Member jugo's Avatar
    Join Date
    Nov 2005
    Posts
    61

    Default

    Also...


    CHOWN public_html to username:username

Similar Threads & Tags
Similar threads

  1. 500 Errors?
    By chrisbuk in forum Enkompass Discussions
    Replies: 1
    Last Post: 08-15-2011, 03:59 AM
  2. 500 errors
    By hkewell in forum Enkompass Discussions
    Replies: 5
    Last Post: 07-08-2010, 08:32 AM
  3. 500 errors on WWWBoard
    By kcdworks in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-25-2003, 08:55 AM
  4. 500 Errors
    By Brett in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 06-09-2003, 09:54 PM
  5. 500 Server Errors
    By MacGawd in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-09-2003, 04:52 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube