Joomla 3 upgrade rerquiring PHP 5.3


#1

I recently updated Joomla at one of my websites from 2.5 to 3 and now when I goto my website get the following error:

“Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!”

I went to my Dreamhost CP and verified that my domain is indeed running “PHP 5.3.x FastCGI”

The problematic website is:

http://gracehomesystems.com/jupgrade/

Any advice?


#2

Two things that I can think of to eliminate:

First did you check the correct user for the domain. ( I would assume so, since you just upgraded, but it never hurts to double check.) From the manage domains page in the panel, look at what user is listed in the web hosting column for that domain. Then go check the php version for that user on manage domains.

Second, while you are on manage users, just save the user again. When you look at control panel settings you are seeing what was last set in the panel, the panel then has a robot that changes the server. It possible that the change was made previously in the panel, and that change never made it to the server for whatever reason.


#3

You have used a script to customize your PHP settings, and that script has forced you back onto PHP 5.2. Remove these lines from the bottom of your site’s .htaccess to reinstate the standard settings, and PHP 5.3:

Options +ExecCGI AddHandler php5-cgi .php Action php-cgi /cgi-bin/php-wrapper.fcgi Action php5-cgi /cgi-bin/php-wrapper.fcgi

Once you have done that, please refer to http://wiki.dreamhost.com/PHP.ini for information on how to customize your site’s PHP settings under PHP 5.3 or later.


#4

Appreciate your responses! I contacted Dreamhost support and was told “it means that Joomla is checking in the wrong place for the PHP version” and that I needed to troubleshoot from there.

Thx Lake Rat! I got as far as your “Then go check the php version for that user on manage domains.” but was not quite sure what you meant?

I did this and no change.

[quote]You have used a script to customize your PHP settings, and that script has forced you back onto PHP 5.2. Remove these lines from the bottom of your site’s .htaccess to reinstate the standard settings, and PHP 5.3:

Code:
Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi

Once you have done that, please refer to http://wiki.dreamhost.com/PHP.ini for information on how to customize your site’s PHP settings under PHP 5.3 or later. [/quote]

Thx Andrew however I could not locate the code you are referring to in the .htaccess file, maybe I am looking in the wrong place? I am trying to upgrade Joomla on my website from 1.5.26 to 3 and to be safe created a copy of my live site into a directory called “jupgrade” and upgraded that to Joomla 3 (leaving my live site alone until I have successfully recreated it in Joomla 3 in the jupgrade dir). I updated the domain to PHP 5.3 at first site of the error message. My live site running 1.5.26 was unaffected by the update. Here is a copy of the .htaccess file from the jupgrade directory of my website:

[php]##

@package Joomla

@copyright Copyright © 2005 - 2013 Open Source Matters. All rights reserved.

@license GNU General Public License version 2 or later; see LICENSE.txt

READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!

The line just below this section: ‘Options +FollowSymLinks’ may cause problems

with some server configurations. It is required for use of mod_rewrite, but may already

be set by your server administrator in a way that dissallows changing it in

your .htaccess file. If using it causes your server to error out, comment it out (add # to

beginning of line), reload your site in your browser and test your sef url’s. If they work,

it has been set by your server administrator and you do not need it set here.

Can be commented out if causes errors, see notes above.

Options +FollowSymLinks

Mod_rewrite in use.

RewriteEngine On

Begin - Rewrite rules to block out some common exploits.

If you experience problems on your site block out the operations listed below

This attempts to block the most common type of exploit attempts to Joomla!

Block out any script trying to base64_encode data within the URL.

RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]

Block out any script that includes a tag in URL.

RewriteCond %{QUERY_STRING} (<|%3C)([^s]s)+cript.(>|%3E) [NC,OR]

Block out any script trying to set a PHP GLOBALS variable via URL.

RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]

Block out any script trying to modify a _REQUEST variable via URL.

RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})

Return 403 Forbidden header and show the content of the root homepage

RewriteRule .* index.php [F]

End - Rewrite rules to block out some common exploits.

Begin - Custom redirects

If you need to redirect some pages, or set a canonical non-www to

www redirect (or vice versa), place that code here. Ensure those

redirects use the correct RewriteRule syntax and the [R=301,L] flags.

End - Custom redirects

Uncomment following line if your webserver’s URL

is not directly related to physical file paths.

Update Your Joomla! Directory (just / for root).

RewriteBase /

Begin - Joomla! core SEF Section.

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

If the requested path and file is not /index.php and the request

has not already been internally rewritten to the index.php script

RewriteCond %{REQUEST_URI} !^/index.php

and the request is for something within the component folder,

or for the site root, or for an extensionless URL, or the

requested URL ends with one of the listed extensions

RewriteCond %{REQUEST_URI} /component/|(/[^.]*|.(php|html?|feed|pdf|vcf|raw))$ [NC]

and the requested path and file doesn’t directly match a physical file

RewriteCond %{REQUEST_FILENAME} !-f

and the requested path and file doesn’t directly match a physical folder

RewriteCond %{REQUEST_FILENAME} !-d

internally rewrite the request to the index.php script

RewriteRule .* index.php [L]

Use PHP5 Single php.ini as default

AddHandler application/x-httpd-php53s .php

End - Joomla! core SEF Section.

[/php]


#5

The code I was looking at was in the .htaccess file at the root of your web site. The settings made there also affect the subdirectory that you’re trying to do the upgrade in.


#6

roger that, however I still could not find the code you are referring to in that root directory .htaccess file:

[php]##

@version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $

@package Joomla

@copyright Copyright © 2005 - 2010 Open Source Matters. All rights reserved.

@license http://www.gnu.org/copyleft/gpl.html GNU/GPL

Joomla! is Free Software

#####################################################

READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE

The line just below this section: ‘Options +FollowSymLinks’ may cause problems

with some server configurations. It is required for use of mod_rewrite, but may already

be set by your server administrator in a way that dissallows changing it in

your .htaccess file. If using it causes your server to error out, comment it out (add # to

beginning of line), reload your site in your browser and test your sef url’s. If they work,

it has been set by your server administrator and you do not need it set here.

#####################################################

Can be commented out if causes errors, see notes above.

Options +FollowSymLinks

mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits

If you experience problems on your site block out the operations listed below

This attempts to block the most common type of exploit attempts to Joomla!

Deny access to extension xml files (uncomment out to activate)

#<Files ~ “.xml$”>
#Order allow,deny
#Deny from all
#Satisfy all
#

End of deny access to extension xml files

Block out any script trying to set a mosConfig value through the URL

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [OR]

Block out any script trying to base64_encode data within the URL

RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]

Block out any script that includes a tag in URL

RewriteCond %{QUERY_STRING} (<|%3C)([^s]s)+cript.(>|%3E) [NC,OR]

Block out any script trying to set a PHP GLOBALS variable via URL

RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]

Block out any script trying to modify a _REQUEST variable via URL

RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})

Return 403 Forbidden header and show the content of the root homepage

RewriteRule .* index.php [F]

########## End - Rewrite rules to block out some common exploits

########## Begin - Custom redirects

If you need to redirect some pages, or set a canonical non-www to

www redirect (or vice versa), place that code here. Ensure those

redirects use the correct RewriteRule syntax and the [R=301,L] flags.

########## End - Custom redirects

Uncomment following line if your webserver’s URL

is not directly related to physical file paths.

Update Your Joomla! Directory (just / for root)

RewriteBase /

########## Begin - Joomla! core SEF Section

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

If the requested path and file is not /index.php and the request

has not already been internally rewritten to the index.php script

RewriteCond %{REQUEST_URI} !^/index.php

and the request is for root, or for an extensionless URL, or the

requested URL ends with one of the listed extensions

RewriteCond %{REQUEST_URI} (/[^.]*|.(php|html?|feed|pdf|raw))$ [NC]

and the requested path and file doesn’t directly match a physical file

RewriteCond %{REQUEST_FILENAME} !-f

and the requested path and file doesn’t directly match a physical folder

RewriteCond %{REQUEST_FILENAME} !-d

internally rewrite the request to the index.php script

RewriteRule .* index.php [L]

########## End - Joomla! core SEF Section
[/php]


#7

I am having this issue on a domain, and when I go to change the users php version it only offers me a 5.2 option, not the 5.3+ option that is needed.What to do???


#8

if you haven’t already, I would definitely open a support ticket on that, for some reason the panel doesn’t think it’s available to that user. Without knowing more i would guess you have a VPS or DS with a very old image?


#9

Thanks for your reply. Trying stuff all night and into this morning. Pain :slight_smile: Yes believe it is VPS from back in the day.
[hr]
… and the answer is.
If you are trying to make https work on a page for Joomla and getting this error, set the user to “mirror the settings of non-secure settings.”