cPanel/Easy Apache Failing

#1
Greetings All,

We recently upgraded some cPanel servers to LSWS and everything has been going pretty well so far.

I am now having a problem regarding cPanel's EasyApache and a conflict that I am not too sure how to resolve.

We typically use EasyApache to recompile PHP and add/remove modules but it looks like there is one last problem with EasyApache and LSWS. Initially we compiled PHP through the LSWS Admin Console with the same CFLAGs that were found with php -i. The compiling went fine and we were able to add in --with-mbstring, but once we restarted the service IonCube, memcached and a few other things weren't working properly. To fix this we used "build matching PHP version" from within the admin console and all was corrected however we did not have mbstring.

The problem now is that we would like to compile with mbstring but EasyApache is failing at one particular step. To clarify, what we had intended to do was to compile PHP through EasyApache and then build matching php version via LSWS admin console but it is failing with, !! '/usr/sbin/lsof -n -iTCP:80 -iTCP:443' failed with exit code '256' !!.

The full failure output is provided below and if you notice in the section of "Ouput from '/bin/netstat -a -n --tcp | grep LISTEN':" neither ports 80 or 443 are listed.

Many thanks for reading all of that!

Code:
 End opt 'IonCube Loader for PHP' --

Updating Apache configuration
Distilled successfully
!! Executing '/scripts/initsslhttpd' !!
!! Restarting 'httpd' ... !!
!! Failed to restart Apache. !!
!! Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.

If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.

You should run /scripts/ssl_crt_status as part of your troubleshooting process. Pass it --help for more details.

Also be sure to examine apache's variouse log files.
Apache Restart Output:

Log:
2009-04-09 23:04:41.009 [NOTICE] [Child: 10006] Shut down successfully!
2009-04-09 23:04:41.009 [INFO] Stop listener 10.100.0.4:80.
2009-04-09 23:04:41.012 [NOTICE] [Child: 28806] Shut down successfully!
2009-04-09 23:04:41.018 [NOTICE] [Child: 10007] Start shutting down gracefully ...
2009-04-09 23:04:41.018 [NOTICE] [Child: 10007] Shut down successfully!
2009-04-09 23:04:41.018 [NOTICE] [Child: 10010] Start shutting down gracefully ...
2009-04-09 23:04:41.019 [NOTICE] [Child: 10009] Start shutting down gracefully ...
2009-04-09 23:04:41.022 [NOTICE] [Child: 10010] Shut down successfully!
2009-04-09 23:04:41.023 [NOTICE] [Child: 10009] Shut down successfully!
2009-04-09 23:04:41.063 [NOTICE] [Child: 10008] Start shutting down gracefully ...
2009-04-09 23:04:41.063 [NOTICE] [Child: 10008] Shut down successfully!  !!
!! '/usr/sbin/lsof -n -iTCP:80 -iTCP:443' failed with exit code '256' !!
!!
Ouput from '/bin/netstat -a -n --tcp | grep LISTEN':
tcp        0      0 a.b.c.d.226:5666         0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2082                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2083                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2084                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2086                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2087                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2095                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2096                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:465                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:819                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN
tcp        0      0 10.100.0.4:53               0.0.0.0:*                   LISTEN
tcp        0      0 a.b.c.d:53           0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:631                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2077                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2078                0.0.0.0:*                   LISTEN
tcp        0      0 :::993                      :::*                        LISTEN
tcp        0      0 :::995                      :::*                        LISTEN
tcp        0      0 :::110                      :::*                        LISTEN
tcp        0      0 :::143                      :::*                        LISTEN
tcp        0      0 :::21                       :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
!!
!! Archiving successful build so it can be restored via --restore-archive once the httpd.conf are resolved !!
!! '/usr/local/apache/conf/httpd.conf.1239336250' does not exist, using '/usr/local/apache/conf/httpd.conf' instead !!
!! Done Archiving successful build !!
!! Restoring original working apache !!
!! Executing '/scripts/initsslhttpd' !!
!! Restarting 'httpd' ... !!
!! Failed to restart Apache. !!
!! Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.
 
#2
After looking into this a bit more, it looks like you need to switch to Apache to run EasyApache through cPanel however doing this in the admin console (WHM plugin) displays:
Stopped LSWS
Apache is not up within 30 secs, please try again

LiteSpeed is still running! Failed to switch to Apache. Please try again!
Thoughts?
 

Tony

Well-Known Member
#3
The way easyapache works is it does upgrades in stages and then does the checks. If it gets to the checks with Apache then it will leave PHP upgraded. So since you do not care about the Apache portion you should be safe to build the matching PHP and it'll build against the configuration you attempted through cPanel's easyapache.

I would also advise to keep things simple is when you build PHP through easyapache your Apache version is 2.0 with prefork or no mpm specified. Otherwise it builds a thread safe PHP which can cause issues with extensions. This will cause problems if you want to use cPanel/WHM built in Pecl feature to build other extensions. It will build a thread safe version because of the system PHP installed but the version LSWS uses via build matching PHP will not be thread safe. As a result extensions will not work on the LSWS version.
 
#4
If it gets to the checks with Apache then it will leave PHP upgraded. So since you do not care about the Apache portion you should be safe to build the matching PHP and it'll build against the configuration you attempted through cPanel's easyapache.
Greetings Tony and thanks for the response. I would have thought that PHP would have been upgraded as well but even after EasyApache fails, if you run php -i and check the CFLAGs there is no --enable-mbstring so it wouldn't be build into the matching PHP version.

I am working on simply compiling PHP from /home/cpeasyapache/src/php-5.2.5 with the necessary CFLAGs and seeing if LiteSpeed will build matching from that. In the mean time, if you have any suggestions please feel free to let me know.
 

Tony

Well-Known Member
#5
When is it showing the system php was compiled? If it was newer then previously then the issues lies with getting mbstring in with easyapache. As to why it's an issue not sure. From my experience though upgrading PHP even if easyapache fails the checks if it built PHP then it will have the new version with whatever settings. So I assume that's the case for you and it's something wrong with easyapache causing the problem. Might want to try a newer version of PHP rather than 5.2.5.
 
#6
When is it showing the system php was compiled? If it was newer then previously then the issues lies with getting mbstring in with easyapache. As to why it's an issue not sure. From my experience though upgrading PHP even if easyapache fails the checks if it built PHP then it will have the new version with whatever settings. So I assume that's the case for you and it's something wrong with easyapache causing the problem. Might want to try a newer version of PHP rather than 5.2.5.
I managed to get it worked out. Compiling from /home/cpeasyapache/src/php-5.2.5 and then building the matching PHP version through LiteSpeed looks to have done the trick. Thanks!
 
Top