Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
+ Reply to Thread
Results 1 to 5 of 5

This is a discussion on VPS: PHP only works in some directories in the VPS & Dedicated forum
PHP only works in some directories on my (Centos) VPS. When it doesn't work, it gives me the Apache "Internal Server Error" page. PHP 5.2.5 ...

  1. #1
    Loyal Client
    Join Date
    Jan 2005
    Posts
    159

    VPS: PHP only works in some directories

    PHP only works in some directories on my (Centos) VPS.

    When it doesn't work, it gives me the Apache "Internal Server Error" page.

    PHP 5.2.5
    Apache 1.3.41

    I have a test.php file that does echo "test". It has permissions 0755.

    It works in my public_html/map/ subdirectory (0755). But doesn't
    work in the main public_html directory (0755).

    Both directories have the same php.ini file.

    The server is not hitting any resource limits.

    The .htacces file isn't the problem (removing it didn't improve matters).

    What could the problem be?
    Last edited by akreider2; 07-08-2009 at 04:24 PM.

  2. #2
    Loyal Client
    Join Date
    Jan 2005
    Posts
    159
    Apache Errors

    [Wed Jul 8 17:30:39 2009] [error] [client 76.124.91.0] Premature end of script headers: /home/energy/public_html/map-test/phpinfo.php

    SoftException in Application.cpp:357: UID of script "/home/energy/public_html/map-test/phpinfo.php" is smaller than min_uid

  3. #3
    Loyal Client
    Join Date
    Jan 2005
    Posts
    159
    I think the problem is that I'm uploading files as "root". So root owns them. And then I run php using suphp.

    So I need to stop logging in to ftp with the root account. Yes, that works!
    Last edited by akreider2; 07-08-2009 at 04:38 PM.

  4. #4
    Ron
    Ron is online now
    Now with 46.3% more slack
    Join Date
    Aug 2002
    Posts
    7,014
    Glad we helped
    Good luck

  5. #5
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,985
    I assume that you are running suPHP (i.e. standard cPanel php chi install) and that that is I believe is running in "paranoid" mode. With that setup, suPHP will only allow a php script to run if the owner matches the the user id specified in the apache setup, which will be that of the "siteusr" owner. So if your site username is site and the php file is owned by root, siteusr != root, so the check fails, and no php for you!

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts