Jump to content

register_globals


Roger

Recommended Posts

I'm in a bit of a pickle on my server at the moment. The owner appears to have recompiled apache last night and as of today. Turning register_globals on in my htaccess file produces a 500 error. Apache being recompiled may just be a coincidence.

 

I have root WHM and SSH access but I don't know where to check this. Can anyone point me to the right spot. I'd be most grateful...

 

Thanks,

-Roger

Link to comment
Share on other sites

Try this:

 

su root into your server using ssh, the locate your php.ini file. Its usually located at /etc/php.ini

 

Open up your php.ini in your favorite text editor. I usually use nano.

 

nano /etc/php.ini

 

then press crtl + w for search

 

type in: register_globals

 

press enter

 

changed register_globals to on and then save and exit the file.

 

restart apache. For me this is:

 

service httpd restart

 

hope this works for you. Good luck.

Link to comment
Share on other sites

i'm not sure what you are asking here. are you asking how to check if register_globals has been set to on/off?

 

if so you can check that by looking at a PHP info file. (If on cpanel it will show you that option)

No, it would seem that register_globals has been disabled. Or rather the ability to set register_globals on in an htaccess file.

 

Thanks for the response though.

Link to comment
Share on other sites

Try this:

 

su root into your server using ssh, the locate your php.ini file. Its usually located at /etc/php.ini

 

Open up your php.ini in your favorite text editor. I usually use nano.

 

nano /etc/php.ini

 

then press crtl + w for search

 

type in: register_globals

 

press enter

 

changed register_globals to on and then save and exit the file.

 

restart apache. For me this is:

 

service httpd restart

 

hope this works for you. Good luck.

Well beans.. I HAD ssh access not at the moment. I still do have root WHM access. I don't see anything that will give me access to the php.ini file from there. He also has disabled phpinfo()...

 

Arrgh guess I'll have to wait until he's available. He's in England near Matt I think. Maybe they both took some time off.... :)

 

Thanks for the advice MAC.

 

-Roger

Link to comment
Share on other sites

The reason you're getting those problems with .htaccess is becasue the owner seems to have enabled phpsuexec. You'll need to use a php.ini now, instead of .htaccess.
I know that causes a problem, sometimes lots of them. Maybe he has. I'll check. Thanks for the reminder Kyle.

 

And as Mac said, I can't go to the DC because I'm not the owner. I just have admin privileges on the box.

 

I'll keep you posted.

Link to comment
Share on other sites

The reason you're getting those problems with .htaccess is becasue the owner seems to have enabled phpsuexec. You'll need to use a php.ini now, instead of .htaccess.

 

Hey,

 

I have phpsuexec enabled and able to run .htaccess with reg. globes fine.

 

Try and put this in your root whmcs folder

 

.htaccess

php_value register_globals on

 

That should work.

 

If you do have root access to your server you can go to your server status page (from WHMCS) and click the the PHPInfo page and find something called

 

Configuration File (php.ini) Path

 

about the 6th box down and go to that folder listed (this different to each server if you have Zend and other tools installed and what not.)

 

Once you found the path in SSH do a

 

cd /to/your/path/for/php/ini/FOLDER

(If your php.ini was in /usr/local/Zend/etc/php.ini then you would go to /usr/local/Zend/etc/)

 

What I personally do is download the file to my computer and then re-upload to the server, much easier...

 

So once you have re-upload the php.ini file in SSH type

service httpd restart

 

and you are done!

 

From,

Adam

Link to comment
Share on other sites

Turning reg globals on via the htaccess file was what I was doing but that is causing the problem now. Having PHPSuexec enabled and trying to use the htaccess file instead of a php.ini would produce similar results.

 

I placed a php.ini file in the site root with "register_globals = On" as the only entry and disabled the htacces file. It just acts like register globals is off now. Meaning that PHPSuexec has not been enabled.

 

So I'll just wait for the owner to come on line and get it squared away then. Guys I really appreciate the positive attitude to help in here. Great suggestions. Thanks very much...

 

-Roger

Link to comment
Share on other sites

Join the conversation

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

Guest
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated