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.

Apache Updated(1.3.29) but Safe Mode messed UP !

Discussion in 'EasyApache' started by donnie, Nov 13, 2003.

  1. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    Hello everybody,
    Recently I've update my cpanel from 7.x version to 8.5.4-R7 and also Update my Apache to 1.3.29 from 1.3.27.

    Problem is that on my server before updating safe mode is On and 2 of my domains are excluded from it and they were working fine but after updating cPanel and Apache both of my domains are not working but rest of the domain are working fine. In my php.ini Safe Mode is On and in httpd.conf both the Domain are excluded even right now.

    Please help me Right now I don't know what to do ?
     
  2. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    If you haven't already, install the Zend Optimizer

    /scripts/installzendopt

    Use default for everything.


    If or after you have installed it, then safe_mode is turned on using:

    /usr/local/Zend/etc/php.ini

    ; Safe Mode
    safe_mode = On

    Restart Apache for it to kick in.
     
  3. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    Thanks for replying.

    Safe Mode is already On in the following php.ini and also restarted the apache after making the changes. I've already done all this before making the post :

    /usr/local/Zend/etc/php.ini

    But it is not working

    In the following steps I installed all the things :

    1) Update cPanel
    2) Update Apache
    3) Install Zend Optimizer(but not using /scripts/installzendopt
    , I installed it manually)

    If my manual installation of Zend optimizer is the problem then please tell me how to uninstall it ?
     
  4. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    I wouldn't worry about uninstalling, just use the method above to install/re-install.
     
  5. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    As you suggested I re-install Zend Optimizer using following script :

    /scripts/installzendopt

    and when it asked for rebooting the webserver I selected yes and rebooted it and also checked in the following php.ini file for the safe mode option, it is On

    /usr/local/Zend/etc/php.ini

    My website keep on displaying the 500 Internal Server Error.

    Here, I'd also like to tell you that I've also checked that both of my domains which I want to exclude from Safe mode contains the following lines of code in follwing httpd.conf

    /usr/local/apache/conf/httpd.conf

    <IfModule mod_php4.c>
    php_admin_flag safe_mode off
    </IfModule>

    Please help me !
     
  6. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    You only need the one line:

    php_admin_flag safe_mode off

    which is placed in the individual Virtual Host directive. Something like:

    <VirtualHost xx.xx.xx.xx>
    BytesLog
    User
    Group
    ServerName
    ServerAdmin
    DocumentRoot
    CustomLog
    ScriptAlias
    php_admin_flag safe_mode Off
    </VirtualHost>
     
  7. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    No No !!!! Website Rob you may be mistaken in that. It must be like this

    <VirtualHost xx.xx.xx.xx>
    BytesLog
    User
    Group
    ServerName
    ServerAdmin
    DocumentRoot
    CustomLog
    ScriptAlias
    <IfModule mod_php4.c>
    php_admin_flag safe_mode off
    </IfModule>
    </VirtualHost>

    Otherwise Apache will not restart.
     
  8. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    Just a silly question:
    Are you running phpsuexec? if you are then the lines you are adding won't work.
     
  9. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    phpsuexec or no, I do not believe the Virtual Host directive allows other directives to be placed within.

    i.e, <IfModule mod_php4.c> is a no no.


    donnie, if you ask a question and will not accept the answer, at face value or even try it, then what is the point of asking the question?
     
  10. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    If he is running php in cgi mode (phpsuexec) then placing the directive as you suggest won't work - Apache will not start. However if he is running php in cgi mode then placing the code in the <ifmodule> directive is correct - because it will be ignored, because he ain't running php as an apache module.

    Lastly you are wrong to say "<IfModule mod_php4.c> is a no no", whether or not he is running in cgi or module - placing the safe mode directive in a <ifmodule> container is valid.
     
  11. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    I guess your experience is different than mine, not a problem.
     
  12. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    I'm extremely Sorry Website Rob if my words were wrong and Thank everybody here for helping me.

    I tried your solution first and after that my apache won't restart and after that I take my httpd.conf to the previous state and it was working with that. Only after that I post here.

    I'm running PHP as an apache module (updated via WHM) and phpsuexec enabled. I think that here is the problem lies 'phpsuexec enabled'

    I think I should re-update apache without phpsuexec then safemode may work again.

    Please tell me if it is correct ???
     
    #12 donnie, Nov 13, 2003
    Last edited: Nov 13, 2003
  13. rs-freddo

    rs-freddo Well-Known Member

    Joined:
    May 13, 2003
    Messages:
    832
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Australia
    cPanel Access Level:
    Root Administrator
    If you are running phpsuexec then you are NOT running php as a module. To turn safe mode off when running as cgi simply place a txt file called php.ini in the directory you want safe mode to be off. The php.ini file must contain the line
    safe_mode = off

    I am not sure if it is recursive but I think so. Problem solved.
     
  14. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    THANKS A Million to all of you and bcause of all your blessings now it's working absolutely fine with safemode ON on all domains excluding 2 of mine.

    I tried it 10 to 12 times to update apache but everytime some problem came up. 3-5 time is was the problem of sluggish cPlanel Server. You all would be wounder that cPanel is download that tar balls while updating Apache at the averae speed of 3 kbps (it is really frustrating for me). I've also checked my server and it is working fine with speed point of view. I know when Last time I updated Apache it goes at the average of 30-50 mbps.

    Finally, I didn't prefer to update it via WHM and update it via SSH(same slow process) without phpsuexec(because I need safe mode to work for me) which maybe the reason for it's working.

    BTW Thanks a lot to all of you. :)

    Donnie
     
  15. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Were you successful in compiling Apache with phpsuexec? Are you getting 500 error when running php, now?

    I tried to compile Apache with phpsuexec via SSH using /scripts/easyapache every thing went fine, but php scripts stopped working. Then I had no other choice but to re-compile Apache without phpsuexec to get php scripts to work.

    Now, can I compile Apache with phpsuexec and get php scripts to work? If yes, what should do exactly?

    Thank you!
     
Loading...

Share This Page