Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18
  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default Can I turn off suPHP for just one domain?

    Is it possible?

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    This is not possible at this time. Any kludge to make this possible for one domain (typically a concurrent PHP setup, one version with SuPHP, the other without) would likely allow your other users to turn off suPHP as well.

    May I ask why you would do this for a particular domain? Virtually all PHP scripts will work within a suPHP environment, though some may require tweaking to prevent them from settings things to be globally writable.

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    After transfering all my domains to my new cpanel installed server, all but one domain is working properly. The domain has a content management system installed which works perfectly. It also has a script installed that allows it to interface with google calendar, which is causing 500 errors. Once I disable this script, the site works fine.

    I was hoping to disable suphp on this one domain (although i really don't want to) until I could come up with a fix, but it doesn't look like that is possible.

    I don't know enough about the script to modify it myself. Is there any type of resource that would at least point me in the right direction as to why the script wont work?

    I did some more troubleshooting at it appears to be the SimplePie integration it has.
    Last edited by betoranaldi; 01-09-2008 at 11:19 AM. Reason: added

  4. #4
    Member
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    237

    Default

    More than likely this is a simple permissions error. Have you looked in the error logs for more detail as to what is causing the 500 error?

    SimplePie caches database results and the cache directory needs to be server-writable. If this is causing the error you may want to check permissions of this directory as it may have been different if suPHP was not used under the prior account.

  5. #5
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    Quote Originally Posted by RickG View Post
    More than likely this is a simple permissions error. Have you looked in the error logs for more detail as to what is causing the 500 error?

    SimplePie caches database results and the cache directory needs to be server-writable. If this is causing the error you may want to check permissions of this directory as it may have been different if suPHP was not used under the prior account.

    I'm afraid permissions are correct, I am going to try to update to the latest version of simplepie and see if it corrects the problem.


    When I run the simplepie test packaged with the script I am trying to run, I get a 500 but I just downloaded the latest simplepie package from their website and ran the test script included in that package and it runs correctly.

    Thank you both for your help, I will let you know how I make out.
    Last edited by betoranaldi; 01-09-2008 at 12:26 PM.

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    What does the apache error log show when you get this 500 error?

    The apache error log should be located at /usr/local/apache/logs/error_log

  7. #7
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    ...premature end of header...

  8. #8
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    on what file? (You don't have to post the path and file).

    What are the permissions on that file?

    Make sure the permissions are set to 644:

    chmod 644 /path/to/file

  9. #9
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    Also make sure you don't have any folders that are set to 777 on your account.

    With the PHP file that is reporting premature end of headers make sure that the parent folder is not set to 777 or, rather that is set to 755.

    You can reset the permissions for all of your folders with:

    find /home/username/public_html -mindepth 1 -type d -not -perm 0755 -not -name _vti\* -exec chmod 755 {} \;

    This will find all folders under /home/username/public_html that are not set to 755 and will change them to 755. I exclude any folders that begin with _vti* because I think they have something to do with Frontpage extensions, and I'm not sure if it is wise to play with those permissions.

  10. #10
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    I ran the above command, it didn't change anything.

    After a few hours of troubleshooting I have determined it is indeed SimplePie. I tried to just SimplePie alone...

    So I run the SimplePie system test and it indicates that it can run on my system.

    It doesn't matter what feed I try to use. I get an internal server error every time.

    I loaded the demo on my site and I can load the demo page provided but once i try to read a url I get an internal server error. All permissions are correct.

    http://burningtwig.com/SimplePie1.1/demo/

    Looking at apache error logs I get

    Premature end of script headers: index.php, referrer: http://burningtwig.com/SimplePie1.1/demo/

    So that is were i stand thus far...

  11. #11
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    Can't say as if I have ever seen an issue like this before.

    Try running this command from the shell:

    Code:
    /usr/bin/php /home/user/public_html/SimplePie1.1/demo/index.php feed=http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
    Does that give any clues?

  12. #12
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    it spit out...

    Segmentation fault (core dumped)

  13. #13
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    There's the problem, though I don't have any idea on how to really go about resolving it.

    Are you running PHP4 or PHP5?

    /usr/bin/php -v

    I do seem to recall one instance where I had a user that was experiencing a segmentation fault, this was back when I was running PHP4 by default on all of our servers. I switched that account over to PHP5 and that resolved this issue. That doesn't really offer a solution as to what the specific problem was, but it did seem to fix it.

    If you are running PHP4, you might consider upgrading to PHP5 and see if that resolves this issue for you.

  14. #14
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    I am running the latest version of php 5 and apache 2 so I cant upgrade

    Thank you for you help in trying to narrow down the problem.

  15. #15
    Member
    Join Date
    Dec 2007
    Posts
    104

    Default

    I think i narrowed it down to curl.

    If i create a script

    Code:
    <?php
    
    var_dump(curl_version());
    
    ?>
    and run it from shell...

    Code:
    # /usr/bin/php /home/user/public_html/SimplePie1.1/curl.php
    Segmentation fault (core dumped)
    So now to figure out why curl is crapping out.

Similar Threads & Tags
Similar threads

  1. Turn on register_globals for one account in suphp?
    By zigzam in forum cPanel and WHM Discussions
    Replies: 19
    Last Post: 08-27-2009, 02:30 PM
  2. Turn off domain.com/cpanel
    By logikstudios in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-21-2008, 01:46 PM
  3. mod_mono: how to turn on for a domain?
    By nat in forum cPanel Developers
    Replies: 1
    Last Post: 02-09-2008, 01:20 PM
  4. how to turn off mail for a domain, nothing in, nothing out
    By matt621 in forum cPanel and WHM Discussions
    Replies: 24
    Last Post: 07-08-2004, 08:15 PM
  5. Turn my domain in to Nameserver
    By priyan in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-21-2004, 03:49 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube