Support

Admin Tools

#18072 Problem .htaccessmaker and "top of file" options

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 on Friday, 13 December 2013 18:00 CST

iamalive
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? No
Have I searched the tickets before posting? No
Have I read the documentation before posting (which pages?)? No
Joomla! version: (unknown)
PHP version: (unknown)
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Admin Tools version: (unknown)

Description of my issue:

Hi Although everything appears to be working fine, there is a requirement to set the php version for the hosting account. The hoster has provide the following to be activated via .htaccess:



PHP 5.3:

Action php /cgi-php53gd/php



AddHandler php53gd .php





PHP 5.4:

Action php /cgi-php54gd/php



AddHandler php54gd .php



When I have just one of those in a simple .htaccess file, it works fine for either php version.
However, when I copy say the php 5.3 Version into the .htaccessmaker as "own htaccess rules at the beginning of file" and activate that, I get a 500 error and a white screen, both front and backend. It goes away when I delete the generated htaccess file and restore the simple 2 line version. I have checked the generated file and the rules were correctly included.

Any ideas how to overcome this problem?

Regards
David

dlb
David,

I am a little confused about exactly what you put in the "own htaccess rules" box. What exactly did you put in the box?


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)

iamalive
I copied the same rules as provided by the hosting company:



Action php /cgi-php54gd/php

AddHandler php54gd .php



Nothing more or less.
Hope that clears it up.

Regards
David

dlb
The examples that I found showed the Action and AddHandler lines in reverse order. Is that the order that your host gave them to you?

When you add the command to the "include at top" box and generate the .htaccess file, make sure you do not have two AddHandler lines in the resulting .htaccess file.


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)

iamalive
I'm not sure I follow you.

I've attached the current generated file for you to look at. Perhaps you can spot where the issue lies.

Regards
David

dlb
OK, the coffee is kicking in now. :-)

It is not the AddHandler/Action lines that are the problem. You have already proven that they are fine because they work in an .htaccess file all by themselves. It is something else in the .htaccess file that Admin Tools is creating that causes the 500.

I can't see anything that looks wrong, but I still believe that .htaccess files are black magic. Not all commands work on all servers. You need to do a little trial and error searching, just comment out a line or group of lines and test your site to see if the 500 is still there. Any line that begins with the # character is a comment and is not processed by your server.


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)

iamalive
Very strange!
I've commented out each section and then tried it - no single section seems to be the problem.
Hmmm.

iamalive
Even weirder:

  • I commented out everything except the 2 lines calling up the php version - error

  • I commented out everything including the 2 lines calling up the php version - error


I uploaded the file with just the 2 lines calling up the php version and it worked!

So the only thing I can think of is that there is some kind of coding issue in the file-format.

dlb
David, are you actually getting a 500 error or just a white page? I can think of another possiblitiy, but it would give you a 403 or a white page, it shouldn't give a 500.


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)

iamalive
Hi again - I appreciate the effort you putting in. Thanks.

I'm getting a 500 error - see attached image.

dlb
I'm out of ideas, I'll ask Nicholas to take a look. He may be done for today, he took a red eye from Boston last night.


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)

iamalive
OK - there isn't a huge hurry - the client is due to provide comments on the appearance of the site, but not until the weekend.
Thanks for your input - I appreciate it.
Regards
David

nicholas
Akeeba Staff
Manager
You'll have to ask your host. If you have commented out the entire file and it throws an error there is something strange in the server setup. Perhaps they need a different owner or permissions for that file? It's not a file encoding issue, though. The .htaccess file only contains ASCII characters which are identical among ANSI, ASCII, ISO-8859-1, ISO-8859-15, Windows-1252 and Unicode 6.1 UTF-8.

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!

iamalive
Hi Nicholas

Thanks. I've been in touch with the hoster and the problem has been solved:

The line that caused the problem is

Options All -Indexes


This is now commented out and the site works.

maybe this will help someone else.

Regards and thanky to you and Dale for all the effort.

David

nicholas
Akeeba Staff
Manager
You're welcome. This is, however, something which can be disabled in the .htaccess Maker when you set "Disable directory listings (recommended)" to No. Moreover, when you said you commented out every line you had also commented that line as well. That's what threw us off.

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!