Jump to content

Recommended Posts

Posted

I need to turn register_globals off in my .htaccess file in order to load Drupal 6. I just did this for another site and it worked fine, but it's not working on my current site. This is what I have in my .htaccess file:

 

>php_flag register_globals off

 

That's it. But I'm getting the following error log message:

 

>Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

 

I'm stumped why one .htaccess file works and a copy of it does not on different sites.

Posted

That seems to bethe correct line to include in a htaccess file. Maybe you have something in the htaccess or on your account that interfere with that line? I would open a ticket with the help desk and ask them to check it.

 

As for how to see the htaccess file in file manager...

When you open file manager there should be a option "Show Hidden Files (dotfiles)". Check that and it should work.

Posted

That seems to bethe correct line to include in a htaccess file. Maybe you have something in the htaccess or on your account that interfere with that line? I would open a ticket with the help desk and ask them to check it.

 

As for how to see the htaccess file in file manager...

When you open file manager there should be a option "Show Hidden Files (dotfiles)". Check that and it should work.

 

 

Thanks, Thomas. I opened a support ticket and it appears that my server "Denver" uses something called a "suPHP" configuration. I have no clue what that is, but the support guy said he modified the php.ini file to turn register_globals off, and everything appears to be in order now. My concern is whether the suPHP setup causes server errors with ALL .htaccess files, or JUST those with php commands, because I expect that I will be wanting to use .htaccess for a few things down the road. I've asked technical support about this in a follow-up email and am waiting to hear back.

 

As for the file manager not showing hidden files, I'm not getting that option window anymore. Is there anyway to get it back so I can check the "show hidden files" box?

 

Thanks for your help.

Posted
Is there anyway to get it back so I can check the "show hidden files" box?

Yes, at the bottom of cpanel there is a "reset all interface settings" option that will bring the box back.

Posted

Yes, at the bottom of cpanel there is a "reset all interface settings" option that will bring the box back.

 

Thanks! Stupid me - I was looking at the top and totally ignored the bottom.

Posted

in response to your question about suPHP you are correct any PHP flags will not work within the htaccess and would probably result in a 500 server error.

 

All PHP flags must be set in the php.ini file, but as you are on shared hosting you will be unable to do this.

 

At least that is my understanding of suPHP. I may be wrong, let us know what tech support say.

Posted

All PHP flags must be set in the php.ini file, but as you are on shared hosting you will be unable to do this.

 

 

That's what I thought, too, but then I got this from tech support:

 

I have created a php.ini file where you can add these values and I have added the entry to turn register global off for you.

 

But I was unable to locate a php.ini file and subsequent problems forced me to load Drupal via the Fantastico tool in cPanel. In the process of doing so, it appears that register_globals is once again enabled. So I've replied to tech support to fix it once again, and I also asked for clarification regarding my access to php.ini.

 

On a minor note, I wish the emails sent from tech support where more clear - grammar mistakes abound and that makes them hard to interpret at times.

Posted

The php.ini file was probably in your Drupal folder. Create a php.ini file in the Drupal folder and enter the command as such to turn register_globals off.

 

>register_globals = Off

Posted

I thought php.ini files were set for an entire apache install and shared over all the vhosts at compile time not runtime? Or have I missed a trick here?

Posted

I thought php.ini files were set for an entire apache install and shared over all the vhosts at compile time not runtime? Or have I missed a trick here?

 

I think this may be a capability of "suPHP", though I'm only speculating. Here's the suPHP site.

  • 1 year later...
Posted

get the same error message.

The error log says the following: /public_html/lists/.htaccess: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration

 

edit: put a # in front of "php_flag magic_quotes_gpc on" and it worx like a charm!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...