Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
September 08, 2010, 05:10:49 PM

Pages: [1]   Go Down
  Print  
Author Topic: Happy Upgrade  (Read 461 times)
lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« on: July 28, 2010, 05:44:48 PM »

Happy was upgraded yesterday. Sort of. Mysql was upgraded but for some reason, the default version of PHP remains 4.4.9. It's not a big deal except I have a couple of crons which require php5 capabilities. I've been running PHP5 via an .htaccess change which is fine for browser calls but not so good for cron commands. Just need to know whether to explicitly call the path to PHP5 on the cron tab.
Logged
MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4806



« Reply #1 on: July 30, 2010, 08:19:26 AM »

cron runs "command line" and knows nothing about server settings, such as .htaccess. I'm surprised that the upgrade didn't take you to a default PHP 5 (on both server and cron), but if you look around I'm sure you'll find the instructions for using php5 with cron (or have you been running with them already?). Maybe the default PHP 5 is scheduled to come later? You could ask.
Logged

lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« Reply #2 on: August 01, 2010, 05:56:38 PM »

cron runs "command line" and knows nothing about server settings, such as .htaccess. I'm surprised that the upgrade didn't take you to a default PHP 5 (on both server and cron), but if you look around I'm sure you'll find the instructions for using php5 with cron (or have you been running with them already?). Maybe the default PHP 5 is scheduled to come later? You could ask.
I should show you the response on the ticket I submitted. Circle speak. I gave up.

I've been running all PHP 5 scripts via cURL on the cron tab. That does respect .htaccess.
Logged
lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« Reply #3 on: August 02, 2010, 08:07:17 AM »

What I should have done is write a little script that calls phpversion() and run it off the cron tab. That's what I did and it returned version 5.2.14.

Here's the cron command:
Code:
php -q /home/username/public_html/mydirectory/myscript.php

So it's running 5.2.14 in 'default' mode off the cron tab.

Here's what's really odd. I've been running with a modified .htaccess in the root to run PHP 5 as follows:
Code:
AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml

When I commented that out of the .htaccess, the system reverted back to PHP 4.4.9. I went into the cPanel to PHP Configuration, set the pulldown in the new theme to run *php in PHP 5 and the domain was running 5.2.14 as 'default' (with the commands in the .htaccess commented out).

What I learned about this is users on upgraded cPanel servers have to go into the cPanel PHP Configuration to change the default PHP version for their site, however, they don't need to take any action to use PHP 5 off the the cron tab. I think this is a good implementation by LP even though the way it was rolled out was a little vague. I had the opinion that I didn't need to do anything to run PHP 5 natively but that's not the case.
Logged
lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« Reply #4 on: August 03, 2010, 06:53:53 AM »

Now the only thing left on Happy is to upgrade Apache from version 1.3.x to a supported version. </hint>
Logged
MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4806



« Reply #5 on: August 03, 2010, 09:44:21 AM »

So if you use just php on the cron command line, you definitely get PHP 5, but if you run from the Web server without the AddHandler/AddType stuff, you definitely get PHP 4? Quite strange. Does your cPanel have a button to switch between PHP 4 and 5? Have you been informed that PHP 5 is supposed to be the default now for both Web and cron? Have you checked that all your .htaccess files don't have anything pertaining to PHP version (AddHandler and/or AddType entries)? Make sure you don't have anything forcing PHP back to version 4 for Web usage.
Logged

lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« Reply #6 on: August 03, 2010, 10:17:36 AM »

So if you use just php on the cron command line, you definitely get PHP 5, but if you run from the Web server without the AddHandler/AddType stuff, you definitely get PHP 4? Quite strange. Does your cPanel have a button to switch between PHP 4 and 5? Have you been informed that PHP 5 is supposed to be the default now for both Web and cron? Have you checked that all your .htaccess files don't have anything pertaining to PHP version (AddHandler and/or AddType entries)? Make sure you don't have anything forcing PHP back to version 4 for Web usage.
My cPanel still has the panel option to switch between 4 and 5. I had to go into cPanel and make the change in the PHP Configuration panel. I think it it rerouted the path of php.ini to the PHP 5 directory. I'm all set now.
« Last Edit: August 03, 2010, 11:04:42 AM by lexhair » Logged
MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4806



« Reply #7 on: August 03, 2010, 02:04:09 PM »

Report of PHP going back from 5.2 to 4.4 all by itself: http://www.lunarforums.com/web_hosting_help_and_troubleshooting/problem_with_bahalunarbreeze_customer_support_issue-t55534.0.html
Logged

lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« Reply #8 on: August 03, 2010, 06:14:19 PM »

That was one of the cPanel servers upgraded this month. A quick trip to the PHP Configuration panel would have probably fixed him up. It's not particularly clear to pull down the select field at the top left of the panel to change to PHP 5.
Logged
toprngr
Newbie
*
Offline Offline

Posts: 5


« Reply #9 on: August 04, 2010, 10:59:04 AM »

It is quite weird that you are experiencing this. in fact, if you have a upgrade, regardless of automatic upgrades or manual ones that you downloaded through the internet, it should be working fine and upgrade everyone of it as well, not only the core program. In fact, I recommend you downloading the files again manually and try it out see the results. See whether I will help on solving the problems or not. I bet it will as now there is a problem with compatibility.
Logged

lexhair
Galactic Royalty
*****
Offline Offline

Posts: 388


« Reply #10 on: August 04, 2010, 11:09:27 AM »

It is quite weird that you are experiencing this. in fact, if you have a upgrade, regardless of automatic upgrades or manual ones that you downloaded through the internet, it should be working fine and upgrade everyone of it as well, not only the core program. In fact, I recommend you downloading the files again manually and try it out see the results. See whether I will help on solving the problems or not. I bet it will as now there is a problem with compatibility.
Sorry, I have no idea what you're talking about.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: