Help me with a Drupal change

7 replies
I'm playing around with Drupal to see if it is something I want to use for a new site I'm going to make. I've uploaded it to my site and am able to log in.

I get the message on the admin screen that tells me there are problems with the install. One of the problems is that register_globals is enabled. I looked at the PHP manual to try and figure out how to change it, but I don't understand it enough yet to understand even the instructions.

Can someone who knows Drupal tell me what I should do?

Thanks,
Mike
#change #drupal
  • Profile picture of the author Andy Fletcher
    Hi Mike,

    register_globals is a (very insecure) feature of PHP. The way to turn it off depends on where your site is hosted.

    If you are in complete control of your setup then you would be wise to edit php.ini to add the following -

    register_globals = Off

    Don't forget to check to see if there are any other register_globals = lines in that file as I don't know which one will take precedence.

    The more likely scenario is you don't have access to PHP.ini but you will have access to a .htaccess in the directory that contains the installer. In which case either create or edit the .htaccess file to add the following line -

    php_flag register_globals 0

    Unfortunately this isn't 100% guaranteed to work since not every host supports the correct .htaccess setup but it should work for most.

    Feel free to shoot me a PM or post here again if you need more help.

    Cheers,

    Andy
    {{ DiscussionBoard.errors[791621].message }}
    • Profile picture of the author Micheal Perkins
      Thanks for the help Andy. I see the power that a CMS like Drupal offers, but have not been able to figure it out in the past. So I'm testing Drupal and Joomla for a new site. I really appreciate the help.

      I did not find the php.in file anywhere in my directory. I do have the .htaccess file though. I have downloaded it and opened it up.

      I have several php global listings that look like this:

      php_value register_globals 0

      Is there a specific place that I need to add the code you suggested?

      Mike
      Signature

      {{ DiscussionBoard.errors[791711].message }}
  • Profile picture of the author Andy Fletcher
    PHP.ini wouldn't be in your directory, it's a configuration file for the webserver itself. If you had access to it, you'd know it.

    As for the .htaccess file. Do you mean it already has that line in there? If so that's not good news as it may mean your webhost doesn't allow you to set register_globals via .htaccess. If not, then putting that line anywhere in the .htaccess file should "just work".

    Who are you hosting with? I'll do a bit of digging to see if I can find out what settings they allow.

    Cheers,

    Andy
    {{ DiscussionBoard.errors[791720].message }}
  • Profile picture of the author Micheal Perkins
    I'm going to send you a PM so I can email you a copy of the file so you can look at it directly.
    Signature

    {{ DiscussionBoard.errors[791750].message }}
  • Profile picture of the author nzdealer
    email your host to turn it off. it should be easy or you can do it in your cpanel.
    {{ DiscussionBoard.errors[791774].message }}
  • Profile picture of the author Micheal Perkins
    Thanks for the help Andy.
    Signature

    {{ DiscussionBoard.errors[791865].message }}

Trending Topics