Author Topic: Apache brokes after PHP Selector  (Read 19500 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Apache brokes after PHP Selector
« on: March 28, 2016, 09:22:02 AM »
Hi all!

It's the second time I get stuck with the same error. I did a fresh installation on Centos 6.7 and then I installed from the PHP Selector the 5.6 and 7 versions. At the end of each compiling process the only error I saw is that httpd can't be stopped and when tries to start httpd the port is in use. Then I go to the dashboard and httpd appears to be stopped but it doesn't, default apache page for Centos still loading. Then I rebooted the vps.

Once rebooted httpd shows started at dashboard but after creating a user, or previously created accounts, and upload files to his public_html folder it still showing the default apache page for Centos, not the CWP page.

If I try to go to Apache Settings->Apache Status I get this message:

Code: [Select]
Not Found

   The requested URL /server-status was not found on this server.

   --------------------------------------------------------------------------

    Apache/2.2.15 (CentOS) Server at localhost Port 80

Even if I try a non existent url version 2.2.15 it's reported when it must be 2.2.27, the default installed by CWP and the shown at dashboard.

When I try PHP Settings->PHP Version the version shown is 5.4.45, that's ok but instead of showing the standard phpinfo() result I see this:

Code: [Select]
Warning: file_get_contents(http://xxx.xxx.157.176/phpinfo.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /usr/local/cwpsrv/htdocs/resources/admin/modules/php_info.php(1) : eval()'d code(1) : eval()'d code on line 3
Followed of the phpinfo() unformatted.

So, I guess there's some problem with Apache after compiling 5.6 and 7 versions of PHP but I can't figure out what's going on. It seems like is not loading the right httpd.conf file. Note that before compiling new php versions all was working right.

Please, some help will be apreciated!
« Last Edit: March 28, 2016, 04:29:38 PM by raulpa »

Offline
*****
Re: Apache brokes after PHP Selector
« Reply #1 on: March 28, 2016, 09:34:53 AM »
do a fresh install of os and cwp

Offline
*
Re: Apache brokes after PHP Selector
« Reply #2 on: March 28, 2016, 09:38:34 AM »
It's a fresh install. The first time I compiled 5.6 and 7 versions of PHP in a "non-fresh" installation but now it is. It's a fresh Centos, fresh CWP and I did nothing more than compiling PHP versions.

Offline
*****
Re: Apache brokes after PHP Selector
« Reply #3 on: March 28, 2016, 09:43:41 AM »
let me check through team viewer or contact cwp support

Offline
*
Re: Apache brokes after PHP Selector
« Reply #4 on: March 28, 2016, 10:19:31 AM »
For "contact CWP support" you mean the paid one?

http://centos-webpanel.com/support-services

I'm not sure if I would pay for something isn't working from the start.

The first time I've installed CWP, upload and configured a dozen sites with 5.6 PHP version compiled from PHP Version Switcher and at this point all was working. Then I've tried to compile 5.4 version from the PHP Selector to avoid compatibilities issues with an old site. The result of this process was the same I got now with a fresh install and trying another approach using only the PHP Selector instead of using the Switcher first.

So, I'm a little bit frustrated to pay for support, I'm feeling I've sent to trash some hours of work.

« Last Edit: March 29, 2016, 06:57:26 PM by raulpa »

Offline
*
Re: Apache brokes after PHP Selector
« Reply #5 on: March 28, 2016, 10:48:26 AM »
I don't know if this would help but running the sinfo.sh script gives this info:

Code: [Select]
===============================================
Kernel:
Linux xxx.xxx.net 2.6.32-042stab113.17 #1 SMP Wed Feb 10 18:31:00 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux

CPU info:
model name : AMD Opteron(tm) Processor 4280                 

Release:
CentOS release 6.7 (Final)

Arch:
x86_64

Virtualization Type:
openvz

Memory:
             total       used       free     shared    buffers     cached
Mem:          2048        246       1801          3          0        109
-/+ buffers/cache:        137       1910
Swap:          256          0        256

MySQL info:
mysql  Ver 15.1 Distrib 10.1.13-MariaDB, for Linux (x86_64) using readline 5.1

Disk Info:
Filesystem      Size  Used Avail Use% Mounted on
/dev/simfs      100G  3.3G   97G   4% /
none            1.0G  4.0K  1.0G   1% /dev
none            1.0G     0  1.0G   0% /dev/shm

none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0

Apache PHP info
PHP 5.4.45 (cli) (built: Mar 28 2016 03:28:07)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.2, Copyright (c) 2002-2016, by ionCube Ltd.

Apache start script check
httpd=${HTTPD-/usr/sbin/httpd}

CWP Admin check
/usr/local/cwpsrv/htdocs/admin
===============================================

Offline
*
Re: Apache brokes after PHP Selector
« Reply #6 on: March 28, 2016, 12:39:32 PM »
At some point between CWP was installed and PHP 5.6 and 7 went compiled httpd 2.2.15 was installed from Centos repository  ???

I don't know when exactly but I'm sure apache wasn't there, maybe got installed as a dependency?

Well, I stopped the 2.2.15 installed from the repository and modified the init script to start the CWP httpd and now is working fine. Just tested PHP 5.4, 5.6 and 7 and seems they got installed correctly.

Take a look at Selector compiling process, I'm almost sure it installed the httpd from the repository.

Offline
*
Re: Apache brokes after PHP Selector
« Reply #7 on: March 28, 2016, 01:37:17 PM »
Here you can see which packages were installed at the same time as httpd did. I'm not 100% sure but I think it was compiling PHP 5.6 from the selector.

Code: [Select]
Mar 28 03:56:56 Installed: libICE-1.0.6-1.el6.x86_64
Mar 28 03:56:56 Installed: libXau-1.0.6-4.el6.x86_64
Mar 28 03:56:56 Installed: libxcb-1.9.1-3.el6.x86_64
Mar 28 03:56:56 Installed: xorg-x11-proto-devel-7.7-9.el6.noarch
Mar 28 03:56:56 Installed: libXau-devel-1.0.6-4.el6.x86_64
Mar 28 03:56:57 Installed: libxcb-devel-1.9.1-3.el6.x86_64
Mar 28 03:56:57 Installed: libSM-1.2.1-2.el6.x86_64
Mar 28 03:56:58 Installed: libicu-4.2.1-12.el6.x86_64
Mar 28 03:56:58 Installed: libX11-common-1.6.0-6.el6.noarch
Mar 28 03:56:58 Installed: libX11-1.6.0-6.el6.x86_64
Mar 28 03:56:58 Installed: libX11-devel-1.6.0-6.el6.x86_64
Mar 28 03:56:58 Installed: libXpm-3.5.10-2.el6.x86_64
Mar 28 03:56:58 Installed: libXext-1.3.2-2.1.el6.x86_64
Mar 28 03:56:58 Installed: libXt-1.1.4-6.1.el6.x86_64
Mar 28 03:56:59 Installed: recode-3.6-28.1.el6.x86_64
Mar 28 03:56:59 Installed: httpd-2.2.15-47.el6.centos.4.x86_64
Mar 28 03:56:59 Installed: httpd-devel-2.2.15-47.el6.centos.4.x86_64
Mar 28 03:56:59 Installed: recode-devel-3.6-28.1.el6.x86_64
Mar 28 03:56:59 Installed: libXpm-devel-3.5.10-2.el6.x86_64
Mar 28 03:56:59 Installed: libicu-devel-4.2.1-12.el6.x86_64
Mar 28 03:56:59 Installed: 12:aspell-devel-0.60.6-12.el6.x86_64
Mar 28 03:56:59 Installed: gmp-devel-4.3.1-7.el6_2.2.x86_64

Offline
*
Re: Apache brokes after PHP Selector
« Reply #8 on: March 29, 2016, 08:56:43 AM »
your issue is that you are using apache from default centos repository, so to fix that you need to logout and then login back into cwp "NO FAST LOGIN" and then CWP should fix that issue.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Apache brokes after PHP Selector
« Reply #9 on: March 29, 2016, 03:35:58 PM »
your issue is that you are using apache from default centos repository
???
Yes! I figured it out 30 hours ago, after 2 installations and some time lost so it IS not, it WAS my issue.

The question now is how apache was installed from Centos repository... Looking at yum.log I see httpd was installed 2 times during PHP compilation from the selector featured in CWP, the first time CWP has removed it and restored his own apache but the second time CWP didn't removed the apache installed as dependency from the Centos repository during the compilation process. As result I ended with an unusable CWP.

Quote
to fix that you need to logout and then login back into cwp "NO FAST LOGIN" and then CWP should fix that issue

 :o
I don't know if I did a logout and login, I don't know if doing it this way apache would have been fixed... I've explained already how I got it fixed.

As I said in a previous post you should take a look to the compiling process and avoid this to happen. In my town and in any town around me this is a bug, a not very desirable bug for new users trying to setup CWP. I know CWP is freeware but no one would be very confident getting stuck at this configuring CWP for the first time or even less if something like this happens with a production server and getting a response 24 hours later.
« Last Edit: March 29, 2016, 05:52:13 PM by raulpa »

Offline
*****
Re: Apache brokes after PHP Selector
« Reply #10 on: March 29, 2016, 06:23:14 PM »
Quote
The question now is how apache was installed from Centos repository... Looking at yum.log I see httpd was installed 2 times during PHP compilation from the selector featured in CWP, the first time CWP has removed it and restored his own apache but the second time CWP didn't removed the apache installed as dependency from the Centos repository during the compilation process. As result I ended with an unusable CWP.

apache recompile after php installation it is a normal operation

Offline
*
Re: Apache brokes after PHP Selector
« Reply #11 on: March 29, 2016, 06:24:38 PM »
Code: [Select]
Mar 28 03:56:59 Installed: httpd-2.2.15-47.el6.centos.4.x86_64
Mar 28 03:56:59 Installed: httpd-devel-2.2.15-47.el6.centos.4.x86_64

And got installed from Centos repo too... I guess CWP is supossed to remove the apache installed from the centos repo but as you can see not always it does. That was the problem, I've ended with the compiled apache (2.2.27) and the centos repo apache (2.2.15) both installed and the repo one configured to run at bootup.
« Last Edit: March 29, 2016, 06:34:49 PM by raulpa »

Offline
*
Re: Apache brokes after PHP Selector
« Reply #12 on: March 29, 2016, 08:14:39 PM »
nice report, we will test it and integrate a fix into the new release.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services