Support

Site Restoration

#18510 Installer requires php 5.3 which I have.

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

PeterAnthony
 Did a couple restores that worked well, but on another restore, the process completed as it should but led to blank pages on front and back end.

I thought this may have been because the backup files were of the site when it was hacked, so I did a fresh backup and now when I get to run the installer, it says that "Akeeba Next Generation Installer for Joomla! requires PHP 5.3 or later

http://screencast.com/t/R8U987B07t

The site says I'm running 5.3.27

Can you help me understand what's wrong?

dlb
Are you forcing PHP 5.3.27 through and AddHandler in your .htaccess file? The extraction process would extract an .htaccess file without the AddHandler and that would put your PHP version back to your host's default.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
Thanks Dale, but I'm not technical and I have no idea you are talking about. (Smile). it worked one moment and then stopped and I have no idea why. I have tried several times since and still it doesn't work. Unfortunately, I have to turn in now so I won't be able to continue this.

Hopefully you'll have a magic on off switch that youcan point me to in the morning. Thanks for your help.

PeterAnthony
Would anyone be willing to offer any insight? Would appreciate it.

dlb
Tone down the tech speak - got it! :-)

Old Hostgator accounts (like mine) still default to PHP 5.2. You have to use a special command in your .htaccess file to make it use 5.3.27. If you had the command in an .htaccess file to begin with, when you extracted your backup archive, that file would have been overwritten by the one in the archive and your PHP version would go back to 5.2. That would explain why the installer doesn't like the PHP version.

Using FTP or the Cpanel file editor provided by Hostgator, edit the .htaccess file in the root of your site and add these three lines near the top of the file:
# Use PHP 5.3
AddHandler application/x-httpd-php53 .php
suPHP_ConfigPath /opt/php53/lib
Now just call up your site like you were trying to get to the front page and you will be redirected to the installer and you can pick up from there. Let me know how you make out.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
Thanks much Dale. Have been out all day and now coming back to this. Couple things: When you say in the site root, do you mean just the root for my domain or the root of my account at hostgator, from which I have several other sites.

Sorry, I'm not technical.

Also, why is this happening now. I've restored many times successfully. Why do I have to make this change now?

My main site is being attacked so I need to upgrade joomla but I'm afraid to do that before I make sure the backups are working. Thanks for a quick response.

Peter

dlb
Hostgator uses public_html or www for the root of your site, I meant one of them. They are actually the same place, the www folder is an alias for public_html.

There have not been any changes in PHP version requirements lately. Backup has required 5.3 or higher for some time. If you are using different accounts at Hostgator, my understanding is that older accounts still default to 5.2, if you open a new account, it defaults to 5.3. That could be the difference.

Kudos for being paranoid enough to test your backup before doing something wild and crazy with your site!


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
Hi,
Hope you had a great weekend. Tried including the lines in the root .htaccess file, but it made no difference. I get the same error message that started this thread.

dlb
  1. Are you trying to restore the site in the root (public_html) of this account or in a subdirectory?
  2. We have been making changes to the .htaccess file, that is the exact name of the file, htaccess.txt may also be there, but that is a different file.
  3. Are there any other lines in the .htaccess file that start with AddHandler?


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
Hi Dale,
1.Nicolas advised me how to set up the restore directory as a
test_html directory that's on the same level as the public_html
This had been working like a charm until recently.
2. Not sure what the question is here.
3. This is what's in the .htaccess file at the root level, below I'm also copying and pasting the contents of the .htaccess file at level of the domain I'm trying to restore. That one is quite a bit longer.

RewriteOptions inherit
AddType application/x-httpd-php53 .php

# Use PHP 5.3
AddHandler application/x-httpd-php53 .php
suPHP_ConfigPath /opt/php53/lib

RewriteEngine on

RewriteCond %{HTTP_HOST} ^morevida.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.morevida.com$
RewriteRule ^/?$ "http\:\/\/morevidareviews\.com" [R=301,L]

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/morevida/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>


HERE'S THE CONTENTS OF THE .HTACCESS FILE AT LEVEL OF THE DOMAIN I'M TRYING TO RESTORE.

##
# @package Joomla
# @copyright Copyright (C) 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 <script> 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]
#
## End - Joomla! core SEF Section.

dlb
The question on #2 was "Are you editing the right file?" You have warned me that you're a non-techie, that was something that I needed to make sure of. :-)

I think I may see the problem. The first part of your post with the "AddHandler" command is in public_html, but the last part, the contents of the .htaccess file is in test_html, which is on the same level as public_html. Is that correct? If so, the site you are restoring is not inheriting the AddHandler command from public_html because they are on the same level. We need to add the AddHander to the .htaccess file in test_html.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
You are a giant Sir. Made the addition and was able to complete the process.

For some reason I thought the command was in the local .htaccess file already (the site I was trying to backup and restore). Just re-checked and it wasn't so I added it there as well.

Thanks much.

PeterAnthony
Unfortunately my backups are not working. Am getting a white page on front end and back end.
see
http://test.goodtalktnt.com

Will open another ticket for this as I think the restoration problem is solved. This I think is a separate problem.

PeterAnthony
scratch that. Just did a new backup and restore and it worked fine. Only issue is that it seems I have to create a new .htaccess file every time I do the restore.

Seems during the restoration or installation, it removes the .htaccess file and even though the .htaccess file on the live site has the handler it doesn't seem to work.

dlb
If the AddHandler is in the backed up site, it should work. If you are backing up on one host and restoring to another, that's another story. There are a couple of commands in the .htaccess that you posted earlier that appear to be site specific, but those regular expressions are over my head. I can't explain exactly why the .htaccess file won't work.

It is not unusual to have to make changes to an .htaccess file when restoring. The trick is figuring out what changes are necessary, then the rest is easy.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
Ok. Thanks man. I'll just put that in my notes as something I have to do when restoring. I'll have to have three files minimum when restoring on the backup site 1) kickstart.php 2) the backup file(s) 3).htaccess

I'll run with that for now.

Thanks again for your patience.

dlb
Wait! If you upload the .htaccess file first, when you extract the archive the .htaccess file that it contains will overwrite it. You need to extract, then upload or modify the .htaccess file. The Devil's in the details! :-)


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

PeterAnthony
Thanks man.

dlb
You are welcome!


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!

Summer vacations: Our support will be closed for replies and new tickets from August 6th to August 21st, 2022 due to summer vacations.