The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RFC - Why did you hork my config files?

Discussion in 'General Discussion' started by Ben, Oct 24, 2004.

  1. Ben

    Ben Well-Known Member

    Joined:
    Aug 19, 2002
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    The purpose of this thread is to ask why cPanel felt the need to edit different variables in my php.ini and httpd.conf.

    The specific edit's I'm referring to in php.ini was the addition of the of the

    cgi.force_redirect

    directive and it initially being commented out and set to 0.

    This had the effect on my server of causing a PHP security warning to be displayed for ANY PHP page that was loaded on the server.

    However, cPanel also saw fit to edit my httpd.conf and comment out the following lines

    LoadModule php4_module libexec/libphp4.so
    AddModule mod_php4.c

    Which caused cPanel's old 4.1.2 cPanel installation to be loaded instead.

    Once those were uncommented and cgi.force_redirect was uncommented and set to 0, all was well again.

    Now, I realize I'm not terribly bright, as evidenced by the fact that it took me almost 6 hours to figure all of this out and correct it, but I'd still like to know exactly why cPanel felt the need to change the variables on my server in the first place.
     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    I also noticed on one of my test servers that the PHP module got commented out. not sure why..
     
  3. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I am having the same issue on one of my servers... did you have php 4.3.9 on that server?
     
  4. Ben

    Ben Well-Known Member

    Joined:
    Aug 19, 2002
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    I had 4.3.8 on one and 4.3.9 on another. In both cases uncommenting and setting

    cgi.force_redirect = 0

    in the php.ini and uncommenting the

    LoadModule php4_module libexec/libphp4.so
    AddModule mod_php4.c

    lines from the httpd.conf solved any trouble I was having.
     
  5. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I didn't have the cgi.force_redirect = 0 but the lines in httpd.conf where commented. It fixed the issue as well and thank you very much for the post.

    When I login as root and type php -v I get 4.1.2 and as a regular user I get 4.3.9. Do you have those same results?
     
  6. Ben

    Ben Well-Known Member

    Joined:
    Aug 19, 2002
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    # php -v
    PHP 4.3.9 (cli) (built: Oct 20 2004 00:09:30)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.0.1, Copyright (c) 2003, by Zend Technologies
    with Zend Optimizer v2.5.1, Copyright (c) 1998-2004, by Zend Technologies

    is the output from a server that was having the trouble I described earlier after I applied the fixes I talked about earlier.

    Myabe you should run easyapache again?
     
  7. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    All sites work and phpinfo shows 4.3.9, so I'm gonna leave it for now but a ticket has been opened with the noc/cpanel to find why. I aso disabled automatic package and security updates just now.
     
  8. cPanelBilly

    cPanelBilly Guest

    were these all servers taht have always used easyapache? Did you select PHPSuExec? I have tried to replicate on 5 servers and have been unable too.
     
  9. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I do always use easyapache. Also I do have phpsuExec installed on this server. I can send you my overnight upcp log if it'll help.
     
  10. cPanelBilly

    cPanelBilly Guest

    if you have phpSuExec then
    LoadModule php4_module libexec/libphp4.so
    should be commented out
     
  11. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Doesn't matter... I still had the issue. I removed the comments and it worked... my phpinfo() page showed it was no longer using PHPSuExec... when I logged in as a jail shell user I get 4.3.9 as my php version, when I login as root I get 4.1.2. When I uncommented the lines 4.3.9 was used for web visitors. When I comment them back I get 4.1.2.

    My NOC re-compiled the second copy of PHP to the correct version. What was the cause of this issue? It took php sites down for many hours.
     
  12. Ben

    Ben Well-Known Member

    Joined:
    Aug 19, 2002
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    cPanelBilly, the only common thread I could among the server's that had this issue was that they were all RedHat 7.3 servers. At least all of the server's that I experienced this trouble on were RedHat 7.3, I can't speak for anyone else.
     
  13. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    The same with me. I had the same issue but it only affected my servers that are using RedHat 7.3. My servers that are using RH Enterprise were fine. I also noticed that glibc was updated only on the RH 7.3 servers the same night that php failed. I am not sure if that had anything to do with it.

    Brian
     
  14. EdRooney

    EdRooney BANNED

    Joined:
    Oct 21, 2004
    Messages:
    166
    Likes Received:
    0
    Trophy Points:
    0
    I also have this problem. All sites that used php were down for hours. Who thinks cpanel should test the new version before releasing?
     
  15. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    11 boxes, 4 were RH7.3, only one running phpsuexec and guess what? that one had this problem which I fixed in 10 minutes but sure enough ..it's a 7.3 issue.
     
  16. Ben

    Ben Well-Known Member

    Joined:
    Aug 19, 2002
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    Ok, so to revise, it only happened on RH 7.3 machines with phpSuExec on. So I ask again, why?
     
  17. kmsd

    kmsd Well-Known Member

    Joined:
    May 21, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    My same scenario too.
     
  18. LucasVanzin

    LucasVanzin Well-Known Member

    Joined:
    Jan 21, 2004
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil
    Nope, I have RHE3 and same problem, tryed the uncomment thing and no results.
     
  19. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    Us too, 1 box was showing 4.1.2. I posted about it in another thread which went ignored.
     
Loading...

Share This Page