deepak_k_rana

Member
Nov 7, 2004
8
0
151
Hello Cpanel,

I am facing a wiered problem on my server, recently i upgraded my cpanel version. And also upgraded the PHP ver to 5.0 .

Ever since after the upgrade, my php files on the server has stoped working..

For example... www.abc-site.com/index.php

if that is the link, instead of opening index.php the files starts downloading.
Eventually the problem is arrising on all the sites i am hosting.

Please help in looking to matter..

Regards
Deepak
 

deepak_k_rana

Member
Nov 7, 2004
8
0
151
Path to PERL /usr/bin/perl
Perl modules Click to view
Path to sendmail /usr/sbin/sendmail
Apache version 1.3.36 (Unix)
MySQL version 5.0.18-standard
PHP version
PHP info Click to view
PERL version 5.8.7
Operating system Linux
Kernel version 2.4.21-47.0.1.ELsmp
Machine Type i686
cPanel version 10.9.0-STABLE-96
 

rhenderson

Well-Known Member
Apr 21, 2005
785
2
168
Oklahoma
cPanel Access Level
Root Administrator
Hello Cpanel,

I am facing a wiered problem on my server, recently i upgraded my cpanel version. And also upgraded the PHP ver to 5.0 .

Ever since after the upgrade, my php files on the server has stoped working..

For example... www.abc-site.com/index.php

if that is the link, instead of opening index.php the files starts downloading.
Eventually the problem is arrising on all the sites i am hosting.

Please help in looking to matter..

Regards
Deepak
Rebuild Apache - Trust me on this, been there done that error more than once.
 

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
try rebuilding apache, and uncheck the box which says to skip apache build if apache is up to date
 

deepak_k_rana

Member
Nov 7, 2004
8
0
151
Hello rhenderson & katmai

Thanks very much for the suggestions.. Very much appreciated.

Actually i had been trying to Rebuild Apache from WHM, Eventually it wasn't happening.

Later on i tried through SSH

Code:
/scripts/easyapache
Which worked finally for me.. and eventualy i am on Ver PHP 4.4.3 .

Path to PERL /usr/bin/perl
Perl modules Click to view
Path to sendmail /usr/sbin/sendmail
Apache version 1.3.36 (Unix)
MySQL version 5.0.18-standard
PHP version 4.4.3
PHP info Click to view
PERL version 5.8.7
Operating system Linux
Kernel version 2.4.21-47.0.1.ELsmp
Machine Type i686
cPanel version 10.9.0-STABLE-96
Although Apache is still on Ver 1.3.36 . i was trying to upgrade it 1.3.37.

But Unless my PHP is working I am happy. :)

Regards
Deepak
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
It's not uncommon for the PHP compile portion of EasyApache to fail and either
leave you with a non-working PHP binary or make the mistake of commenting
out required configuration commands in your httpd.conf file.

Per the former, I usually prefer to compile PHP manually for that exact reason
and is very easy to do and is no more difficult than using Easy Apache and
gives you a lot more control over your PHP installation.

I actually wrote a simple PHP upgrade script that will upgrade your PHP all totally
automatically using your current PHP options that you have installed now if
anyone is particularly interested.

Now regarding the latter, that's just a matter of opening up your httpd.conf file
and making sure you still have the required "LoadModule" and related lines.
 

Silver_2000

Well-Known Member
Mar 31, 2002
337
1
318
It's not uncommon for the PHP compile portion of EasyApache to fail and either
leave you with a non-working PHP binary or make the mistake of commenting
out required configuration commands in your httpd.conf file.

Per the former, I usually prefer to compile PHP manually for that exact reason
and is very easy to do and is no more difficult than using Easy Apache and
gives you a lot more control over your PHP installation.

I actually wrote a simple PHP upgrade script that will upgrade your PHP all totally
automatically using your current PHP options that you have installed now if
anyone is particularly interested.

Now regarding the latter, that's just a matter of opening up your httpd.conf file
and making sure you still have the required "LoadModule" and related lines.
Id love to see your script

The WHM apache rebuild screwed up my server too ..
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
Yeah not much point recompiling apache when all you need is PHP
and comping and installing PHP is really simple.

Will have to talk more later though ---

I just got back from dinner a few minutes ago and am going downhill
very fast with a pretty nasty allergy reaction and debating whether to
go to bed or the hospital at this moment. Just thought I'd try to
keep myself awake though checking for messages but I think I better
stop now and go lay down.
 

katmai

Well-Known Member
Mar 13, 2006
564
3
168
Brno, Czech Republic
i never use whm buildapache. used like 4 times, failed each time. anyway this might depend on the options each and everyone of us selects, nevertheless, there is the possibility that your net crashes and you might miss all the action.

/scripts/easyapache always works like a charm. no need for any other scripts. i mean ... what's to be ? if rebuilding apache and select option to load previous config then press enter ... seems pretty straightforward to me.
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
Morning ...

If you want to compile PHP manually, this should help ....

The first thing you want to do is login to your server by SSH as root
and change to the /usr/local/src directory (IE: cd /usr/local/src)

Next, you will want to download the source for PHP and the following
command will download PHP v5.2.0 as an example:
Code:
wget http://us3.php.net/get/php-5.2.0.tar.gz/from/us2.php.net/mirror
Unpack the archive you just downloaded and then change to the
directory of the source folder you unpacked ...
Code:
tar zcvf php-5.2.0.tar.gz
cd php-5.2.0
Now, to build PHP, you will generally just run the following commands:

./configure <<< with whatever options you want >>>
make
make test
make install

(Don't forget to restart Apache afterwards!)

When only upgrading, you will probably want to use the same './configure' line
as your original PHP that is currently installed. That line is displayed any
time you view the output of any page using phpinfo() and you can
cut and paste the ./configure line from that page.

(OR) You can use the script below which basically does the same thing ...
Code:
#!/bin/bash
IFS="$"

/bin/bash <<EOF
make clean
$(php -i | grep "configure" | replace "'" "" | replace "Configure Command =>" "")
make
make test
EOF

echo "If build was successful, you can type 'make install' now to install ..."