Setting register globals OFF in .htaccess gives Error 500

Please post all install related problems here. Visit this forum first for troubleshooting.
jean01
Posts: 7
Joined: Sun 8. Feb 2009, 05:36

Setting register globals OFF in .htaccess gives Error 500

Post by jean01 »

Just uploaded v 1.3.9
Running setup.php
My host has register globals ON, the set up says it should be OFF
My host says I can turn it off by adding

php_value register_globals 0

to the .htaccess file.

However, when I do this, and then try to access setup/setup.php I get the error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

So how do I turn register globals OFF in a way that avoids this error.

Thanks very much
jean
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Setting register globals OFF in .htaccess gives Error 500

Post by juergen »

Hello and welcome ;)

How did you manage the entry ? In the phpwcms distribution .htaccess file or where did you do that * Own file ?
jean01
Posts: 7
Joined: Sun 8. Feb 2009, 05:36

Re: Setting register globals OFF in .htaccess gives Error 500

Post by jean01 »

DF6IH wrote:Hello and welcome ;)

How did you manage the entry ? In the phpwcms distribution .htaccess file or where did you do that * Own file ?
I installed phpwcms in the root of the domain so I just added this line to the phpwcms's .htaccess file in the root so I guess I added the line to the phpwcms distribution .htaccess file.
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Setting register globals OFF in .htaccess gives Error 500

Post by juergen »

so .. here we are.

Empty all things inside this without the directive given from your Hoster and Error will be gone. ;)
jean01
Posts: 7
Joined: Sun 8. Feb 2009, 05:36

Re: Setting register globals OFF in .htaccess gives Error 500

Post by jean01 »

DF6IH wrote:so .. here we are.

Empty all things inside this without the directive given from your Hoster and Error will be gone. ;)
I am looking at the .htaccess file that begins . . . .

# These settings are recommend
# Maybe you might have problems
# with other scripts that needs
# register_globals ON

# php_flag magic_quotes_gpc Off
# php_flag register_globals Off
--------------------------------------------------

What should I empty?
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Setting register globals OFF in .htaccess gives Error 500

Post by juergen »

Just a file with only in it:
name: .htaccess

Code: Select all

php_value register_globals 0
all other things to be left outside, cause they have different functions which are not required at this moment. so .. only the one line inside !

hey, and just waiting for the .. OK :)
jean01
Posts: 7
Joined: Sun 8. Feb 2009, 05:36

Re: Setting register globals OFF in .htaccess gives Error 500

Post by jean01 »

DF6IH wrote:Just a file with only in it:
name: .htaccess

Code: Select all

php_value register_globals 0
all other things to be left outside, cause they have different functions which are not required at this moment. so .. only the one line inside !

hey, and just waiting for the .. OK :)
OK, now the .htaccess file contains only one line:

Code: Select all

php_value register_globals 0
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, EMAIL ADDRESS and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Good thing I renamed the one that was working except for register globals!!!
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Setting register globals OFF in .htaccess gives Error 500

Post by juergen »

hehe, your Hoster gave you wrong parameters ... shame ! :lol:

But, I am not completely shure. Just wait around 10 Minutes to let the Error time to diappear.. ( caused by server issues .. me guessing ) If you transfer the .htaccess file to your server, can you see it in an ftp listing or does it ( again guessing) disappear ?
jean01
Posts: 7
Joined: Sun 8. Feb 2009, 05:36

Re: Setting register globals OFF in .htaccess gives Error 500

Post by jean01 »

DF6IH wrote:hehe, your Hoster gave you wrong parameters ... shame ! :lol:

But, I am not completely shure. Just wait around 10 Minutes to let the Error time to diappear.. ( caused by server issues .. me guessing ) If you transfer the .htaccess file to your server, can you see it in an ftp listing or does it ( again guessing) disappear ?
This time I tried:

Code: Select all

php_flag register_globals Off
which was a commented line in the distribution .htaccess file instead of

Code: Select all

php_flag register_globals 0
but the result is the same.
I will wait 15 minutes or so to let the error condition clear and then contact my hosting company if it persists.
Thanks so much for your help.
jean
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Setting register globals OFF in .htaccess gives Error 500

Post by juergen »

no problem...

so its their turn now ...... this is a security issue.
jean01
Posts: 7
Joined: Sun 8. Feb 2009, 05:36

Re: Setting register globals OFF in .htaccess gives Error 500

Post by jean01 »

I was referring to old information on my host web site. It turns out that my server has PHPSUEXEC installed so these settings have to be in the php.ini file. Any php settings in .htaccess will cause a server error.

I put this here so that if someone else has the same problem they might try a php.ini solution.

According to the documentation, PHPSUEXEC will also refuse to serve pages with 777 permissions so I may have to go back and change the permissions from what the installation guide recommends. If I do, I will post that here for the next person also.
rosemckay
Posts: 54
Joined: Thu 13. Oct 2005, 00:59

Re: Setting register globals OFF in .htaccess gives Error 500

Post by rosemckay »

I'm trying to upgrade and having this same problem. I can't seem to download the htaccess file from my host it doesn't appear on my hard drive it just disappears. Can someone please help with easy to follow directions?

When I make the recommended change to the _.htaccess file supplied in the zip I downloaded then save it as .htaccess it completely disappears. How can I change it and add it to my site if it keeps vanishing?

I'm scared, the whole website is down and I don't know how to get it back!
rosemckay
Posts: 54
Joined: Thu 13. Oct 2005, 00:59

Re: Setting register globals OFF in .htaccess gives Error 500

Post by rosemckay »

OK so I just saved the htaccess file as -.htaccess on my hard drive, uploaded it, then changed it to .htaccess. The error is still there: 500 Internal server error.
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Setting register globals OFF in .htaccess gives Error 500

Post by Oliver Georgi »

so you are not allowed to use .htaccess - contact your hosting company.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
rosemckay
Posts: 54
Joined: Thu 13. Oct 2005, 00:59

Re: Setting register globals OFF in .htaccess gives Error 500

Post by rosemckay »

It was the chmod, apparently my host has suPHP which requires all folders to be set to 755, and files must be set to 644. I was able to fix the old 1.3.1 relatively quickly by re-uploading them over the upgrade and making the first layer of the files match the chmod requirements. It fixed the site for the time being, BUT! I spent about 2 hours trying to change the chmod on the upgrade and barely made a dent in what was there to change.

There are so many files to fix that I just can't justify spending possibly two days changing these settings. It's just not practical at all; not to mention so mind numbingly repetitive that I'd probably end up shooting myself. I'm sorry, I've tried several times to use this web app for my web projects and it never seems to work out. There is so much to love about phpWCMS, I just haven't been able to make it meet my needs the last few tries.
Post Reply