Support

Admin Tools

#10114 Failed upgrade in Admin Tools - AJAX Loading Error

Posted in ‘Admin Tools for Joomla! 4 & 5’
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

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 07 December 2011 03:38 CST

MikeEllis
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the forum before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 1.7.0
PHP version: 5.2.17
MySQL version: 5.0.77
Host: Easily.co.uk
Admin Tools version: 2.1.12 (but 2.1.13 subscribed to)


Description of my issue:
Yesterday I took out the ATPRO subscription to Admin Tools. I wanted to use Admin Tools to upgrade my site from Joomla 1.7.0 to 1.7.3.

On accessing Admin Tools last night, it correctly highlighted that the upgrade was available so I clicked on the option to upgrade. This quickly returned the message :
"ERROR : AJAX Loading Error : Internal Server Error"

So no upgrade took place?.

In the forum I read that "Fixing permissions" might resolve matters so I tried this but got the error message :
"Internal Server Error"

Then on trying to access the website (at www.tasteincorporated.co.uk), no site was available ..... just
"500 Internal Server Error"

I spoke to my host this morning and they said there is a problem over file permissions being set to 644 when they should be 750. They also made a change to the .htaccess file which made the website available (they commented out Options +FollowSymLinks).

However I have no access to my "admin" site (www.tasteincorporated.co.uk/administrator). Also permissions are still set incorrectly according to my host.

What would your advice be?.

Should I just restore to original site at 1.7.0? (and then do the upgrade manually?)

Do you know why the Admin Tools upgrade process is returning an AJAX error?

Thanks

Mike

nicholas
Akeeba Staff
Manager
Can you try renaming the .htaccess to something else, e.g. htaccess.bak while trying to update Joomla! on your site using Admin Tools?

If this still doesn't help, I would like to take a look at the PHP error log at the time the Internal Server Error message is displayed on your browser.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Thanks Nicholas.

First I will restore the site as at present I have no access to any of the site Admin functions (500 Internal Server Error).

I will then try upgrading again but including your suggestion to rename the .htaccess file.

If the upgrade works, do I then restore the .htaccess file?

Will let you know how I get on.

Rgds

Mike

nicholas
Akeeba Staff
Manager
Yes, you should restore the .htaccess file afterwards. Please let me know if that worked.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,
I have now hit a problem that I need your guidance. In summary, I tried to use Akeeba Admin to upgrade from 1.7.0 to 1.7.3. This did not work given the setup of the shared hosting environment (cannot be specific). In a forum I saw that "fixing permissions" might resolve matters but this seemed to introduce another problem (could not access the main "administrator" site as "Internal Server Error" was returned).

So today I decided to try restore the site from a recent backup. I had a full backup taken using Akeeba backup. I tried to restore using Akeeba kickstart 3.3.2. Again this would not run given the shared hosting environment set-up.

So I extracted the site backup from the jpa file using the extract utility. I then loaded the joomla files to the site using FTP. I have renamed the .htaccess file to htaccess.txt (I have not renamed php.ini to php.ini.bak as I do not have access to this in the shared environment). If I try launch the restoration process by going to http://www.tasteincorporated.co.uk/installation/index.php
I get a 500 Internal Server Error.

I am not sure what else I can do?.

I have emailed my hosting company and they have indicated :
- CHMOD command is disabled
- PHP memory_limit = 32 Mb
- PHP function opendir is not available
- cURL PHP module is available
- PHP mod_zlib is available
- PHP Safe Mode is turned off
- phpinfo.php is blocked

What would you suggest?

nicholas
Akeeba Staff
Manager
The server is too restrictive to be practical. You can try the emergency manual restoration procedure described in our user's guide, but you will have a dysfunctional site which you can not back up. I mean, come on, opendir not available? The host admits that they have no idea what they're doing by disabling this function. Instead of using mod_itk or suPHP with sane ownership and permissions to isolate users on that shared server they decided to cripple PHP instead? Ugh! It's like removing the engine from a car in order to make sure it can't be stolen. Sure thing, it can't be stolen, but it can't be used to drive you around either!

My suggestion: please move your site to a decent host, with engineers who actually know how to properly set up a server. I strongly recommend iRedHost, Rochen or CloudAccess.net. They are fast, secure, optimised for Joomla! and reasonably priced.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Hi Nicholas,

I’m now in a difficult situation. You will recall that I tried to upgrade my site (www.tasteincorporated.co.uk) from 1.7.0 to 1.7.3 using the Admin Tools software. This failed because of incompatibilities with the PHP configuration of my shared hosting environment.

In trying to do the upgrade, it upset my website such that I could not access any of the “Administrator” functions (“Internal Server Error” returned).

So yesterday I decided to try restore the website using a jpa backup I took using Akeeba Backup 3.3.6 prior to the attempt to upgrade. I was unable to use the Akeeba Kickstart route as again I encountered conflicts with the hosting partner PHP configuration. So I extracted the jpa file (having downloaded it using Filezila in Binary mode) and applied the joomla files using FTP. This has not worked and if you go to the site (www.tasteincorporated.co.uk) you will see it returns a message “500 JHtmlContent :: Prepare not found in file”. I have searched the forums but I can find no explanation of this error message.

I know longer term the answer will be to consider a different hosting partner.

But in the short term, I need to restore my website. Can you offer any explanation as to what might be the problem?. How can I restore this site?.

I also tried to implement the restore locally (Localhost) but this did not work.

Any suggestions or insights very welcome!.

Regards

Mike

nicholas
Akeeba Staff
Manager
Hello Mike,

Let's try the following.

Extract the backup archive on your local PC using either Akeeba eXtract Wizard (it's a native desktop tool) or Kickstart (running inside XAMPP or a similar local web server).

Take the extracted files and upload them to your site, by FTP.

Access your site's restoration URL, e.g. http://www.example.com/installation/index.php and go on with the restoration. At the end of the restoration, you can simply remove the installation directory.

IMPORTANT If this doesn't work, you have to follow our emergency restoration procedure.

It's simple. It's a bit longer than the Kickstart route, but shouldn't give you any woes. The most important thing to remember is this: Don't Panic. Nobody dies if you do a mistake. You will be able to correct it or try again. That's the good thing about fixing sites versus, for example, treating patients in a hospital :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Thanks Nicholas.

There's no panic honest......just frustration because I don't have enough PHP knowledge/experience.

I will try the restore once more following the procedure you suggest. I will do this this afternoon and let you know.

Although I'm a "newbie", I like Joomla and the great community. Thankyou for your support.

Regards

Mike

nicholas
Akeeba Staff
Manager
You're welcome!

I used to be a newbie, too, and I remember all the frustration I had to go through when trying to figure out how to do things. Don't worry, frustration is a natural part of the learning process. If you never experience frustration using a new system, it usually means you're not learning ;) And when you're frustrated, we're here to help!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

As you suggested, I extracted the jpa backup file using Extract Wizard 3.3. I then uploaded the Joomla files (all 7580 of them) via FTP (Filezilla, binary mode). No errors encountered.

Then when I go to the installation url (www.tasteincorporated.co.uk/installation/index.php) I get the "Internal Server Error" message.

Any ideas?

Mike

nicholas
Akeeba Staff
Manager
The first thing I'd try is to remove or rename the .htaccess file in the site's root (it may be giving you some grief). If this doesn't work, the next step is calling your host and ask them which version of PHP they are using by default on their sites. If they say PHP 4, ask them how you can enable PHP 5 on your site (most likely you have to create a .htaccess with one or two special lines).

I believe that this should work. If not, you will have to go with the step-by-step emergency restoration instructions I linked in my previous post.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

I tried renaming the .htaccess file but no change (error "Internal Server Error" returned).

In terms of PHP, it is version 5.2.17.

So I've looked at the emergency restore instructions. Just one question......they say to edit the joomla.sql file, replacing '#__ with 'jos_ . I understand this but the existing database table prefix is "tst". So should I use "jos" or "tst".

Also, if I use "jos", then does the configuration.php file need to be edited to read $dbprefix = 'jos_' instead of $dbprefix = 'tst_'

Mike

MikeEllis
Nicholas,

I did a little test. I checked the database tables using phpMnyAdmin. The existing tables should be fine.

So I renamed the "installation" folder and tried the site url (www.tasteincorporated.co.uk)

It now returns the error I originally encountered, namely :
"500 JHtmlContent :: prepare not found in file"

Any idea what this means (other Joomla users have encountered it - see http://forum.joomla.org/viewtopic.php?p=2677124)

I cannot see what to do next?

Mike

nicholas
Akeeba Staff
Manager
Hi Mike,

OK, you have now restored the site. This is good.

The problem is that one core Joomla! file is missing from your site. No problem, it's easy to work around it! You can simply extract a fresh Joomla! installation ZIP archive locally and upload all files to your site, by FTP, except for the installation directory. This will refresh the core Joomla! files, including any missing files. Then the error message should go away.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

Sorry to be such a nuisance on this (your support is appreciated) but ....

I extracted a fresh copy of Joomla 1.7.3 and FTP'ed all files (minus the installation folder).

I tried the site with and without the .htaccess file but still the site is returning the message "500 JHtmlContent :: Prepare not found in file". The administrator access is simply returning "Internal Server Error".

Is there anyway to switch on more detailed PHP error messaging to see if that reveals anything?........or to give a better explanation as to why this specific error message is being issued?

Regards

Mike

nicholas
Akeeba Staff
Manager
Hello Mike,

The only way to be able to help you is to send me a Personal Message (check the right hand column for a link, I am user "nicholas") with the following information:
- A link back to this thread so that I know what the PM is about
- FTP connection details
- URL to your site
- Super Administrator username and password
This will allow me to debug your site and see what's going on.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager
Thank you for your PM!

I seriously doubt if you can successfully run a Joomla! site on that host. Apparently, you can only access the index.php file in the site's root. Trying to access any other PHP file, anywhere else on that server immediately produces an Internal Server Error 500 error message. This means that you can not even access the administrator directory :s I have tried different permissions, just in case, but it seems that this is a hardcoded restriction.

I also took a look at where the error message comes from. Apparently, Joomla! can not produce a listing of its own files. So, despite that all files are there, Joomla! can't find them and throws this error message. ARGH!!!

I can't help you any further with that. It is a hosting issue. You will have to contact your host and ask them to lift those strange permissions, or find another host.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

Thanks for your help.

I will talk to the hosting company tomorrow.

I'll keep you posted.

If you were local, I'd offer to buy you a beer for your efforts.

Can I make a subscription?

Mike

MikeEllis
Nicholas,

Been playing around and ........

It is only the Home (index.php) page that isn't working (www.tasteincorporated.co.uk)

If you go to any of the other main menu pages, then they work fine. For example :
www.tasteincorporated.co.uk/menus
www.tasteincorporated.co.uk/order

Is there something specific about the index.php (Home) page?

Regards

Mike

nicholas
Akeeba Staff
Manager
Hi Mike,

I did observe that. I forgot to mention that. There is only one module on your homepage which is trying to call JHTMLContent::prepare and throwing this error. The other pages do work correctly, but only because there is nothing to trigger the incompatibility.

Try uploading an empty file, using any name you want ending in .php and access it from the web, e.g. abcdef123.php. You can't, it throws 500 Internal Server Error. Try accessing your administrator directory. You can't. These are hosting issues. They are not caused by your .htaccess or PHP code (I checked).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

Thanks for the explanation.

What I don't understand is why this error is happening now when it did not occur prior to my attempted Joomla upgrade?. The same code is essentially running now that ran previously so why didn't the error occur previously. The only explanation I can offer is that the hosting company must have changed something in their platform configuration. ??????

nicholas
Akeeba Staff
Manager
It could be that, some other change in your account or some strange permissions requirement not being met any more. Your host should be able to answer than much better than me.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

I'm now stuck!.

I discussed the problems with the hosting partner this morning and they have spent the last few hours looking at the website.

Their conclusion.......?

"This is not a hosting problem. It is a problem in the Joomla coding. Check your coding."

I pointed out the issues with trying to access PHP files (other than index.php) but they have yet to reply (I told them this this morning as well!).

I know the answer is to switch hosting partners but that means I have to wait to transfer the domain so will be without the site for a good few days (could be shorter if lucky). Also moving site loses all Google rankings. So customer not happy.

Are you able to suggest anything?

Mike

nicholas
Akeeba Staff
Manager
Technically, it's a combined problem. The host is very restrictive and Joomla! can't work reliably on this host. So, yeah, we'are all correct: it is a hosting issue and it is a Joomla! issue.

I still believe that not being able to access arbitrary PHP files is a hosting issue, though, and they can't say it's bad coding. An empty file with a .php extension can't have any coding issue!

I still recommend switching hosts. Switching hosts will NOT lose your page ranking. The page ranks are attached to each URL, not to the IP address. If you keep the same domain name, you don't lose anything. In fact, if you apply proper 301 redirections, you can even change the domain name without losing any ranking. This comes from the guy who renamed joomlapack.net to akeebabackup.com, moved it to a different server (different IP!), then used yet another static IP and switched the site to HTTPS, without losing any search engine rankings ;)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

What I still do not understand is that this site was working fine on Joomla 1.7.0.

When I tried to upgrade to 1.7.3 using Admin Tools, it failed with an AJAX error.

So I tried using the "fix permissions" option, but this also refused to work. The "administrator" signon no longer worked.

So on Friday just gone, I tried to restore to the backup. But Kickstart could not run. The manual restore has produced the current system, with a totally clean version of Joomla 1.7.3 applied.

Given the restore, we should now have the system that was originally there with Joomla 1.7.0.......but obviously something has changed.

I don't understand it?

Mike

nicholas
Akeeba Staff
Manager
As I said above, I think that your host expects files and folders to have specific permissions (but which? they have to tell us) for PHP files to be executable. During the Joomla! update, the file and directory permissions must have changed, therefore you get this problem. But if we don't know what the "correct" permissions are for this host, we can't fix that/ I have tried several combinations, but I could not find which permissions would do the trick, as everything would return an Internal Server Error 500. When confronted with a server where the slightest change can bring the site down, I always recommend to change hosts. You can't administer a site hosted on such a server, as the tiniest change could bring your site down. That's just crazy!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

Thanks for your continued support.

The host has said that files on the server must have permissions set to 750. Does this provide any options?.

Mike

nicholas
Akeeba Staff
Manager
Yes! You can use your FTP client to change the permissions of all files and directories to 750. This will take about half an hour. Then retry accessing your site's front- and back-end. Do you se any change?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

All permissions have been set to 750 but it has made no difference.

It can't be permissions as when the site was restored, that would have restored the original working permissions, so removing the problem. is my thinking correct?.

So what next?

I tried installing the backup on a local XAMPP platform to see if it would prove that it was a hosting platform issue. I installed a clean Joomla 1.7.3 (no problem) and then tried to apply the jpa file using kickstart. It didn't work (get a 500 response).

Can I ask a favour?
Could you use the FTP access I provided (via DM) to access the backup file on the main website (under Administrator/components/com-akeeba/backup/site-www.tasteincorporated.co.uk-20111123-201638.jpa). This is the main backup file. Can you download and see if you can restore it locally yourself?. I attach a copy of the original configuration.php file and .htaccess files

If you can help, I will gladly pay for your time doing this (just let me know).

nicholas
Akeeba Staff
Manager
Hello Mike,

I did. The reason why it throws a 500 error locally is that your .htaccess file contains two lines starting with AddHandler. Remove them and your site loads PERFECTLY on your local server. Removing them makes no change in your live site. It's a hosting issue. Q.E.D.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Thanks.

I will be ringing Rochen in the morning to start the process of moving the site!.

Mike

nicholas
Akeeba Staff
Manager
You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

MikeEllis
Nicholas,

FYI, the existing hosting company (Easily) contacted me yesterday to indicate that they indeed had identified a problem in their PHP configuration. They asked me to delete all Joomla files and then restore the site.

This seemed to work!. The site is now operating fine.

Moreover, the Joomla upgrade facility now seems to work.

I have asked them what exactly the PHP problem was but awaiting an answer.

Once again, many thanks for your support.

Kind regards

Mike

nicholas
Akeeba Staff
Manager
I knew it, it was a hosting issue after all :) I am glad this is resolved now!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

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!