How can I turn off php’s register_globals option?

Question:

How can I turn off register_globals ?

Answer:

The method of turning of register_globals depends upon how you are running php. If you are using the default mod_php create a .htaccess file in your www directory and add the line :

php_flag register_globals off

You can also create multiple .htaccess files inside of different directories
and change the status of register_globals for different parts of your site.

If you are using one of the php-cgi versions, .htaccess will not work. Instead, create a directory called :

etc

in your home directory

and place a custom php.ini file in it. Inside the php.ini file, set register_globals to off.

weird php 4.4.0 problem

Possible php 4.4.0 update issue – Thanks to scott for this one!

Hi,

It looks like you upadted PHP to 4.4.0 on this server last night. Ever since this update has been installed (Today only) some of my site is broken.

[later on…]

FYI:

Here is the PHP bug:

I had to change:

$this->_elements[] =& $formElement; // this did work but now does not

to:

array_push($this->_elements,$formElement); // this now works

I think they broke this in the new version.

Can I control php’s register globals option?

Question:

Hi there. I am taking up web design and was wondering something: Is REGISTER_GLOBALS turned on or off? I hope you can help me with this and thank you for your time!

Answer:

Hi,

Thanks for contacting us!

You can have register_globals turned on or off for your site depending upon your needs. It is best to keep it turned off, but some older applications still require it be turned on so you have that option too.

The php website has more information about register globals at :

http://www.php.net/register_globals

Please let me know if you need anything else!

Parsing RSS and changing file attributes

Question:

If I purchase a hosting account from you, will I be to use PHP scripts to parse RSS feeds on my website assuming that I set it correctly? And will I be able to change a file or folder’s attribute settings once I have uploaded the file or folder to my domain?

Answer:

Yes. After you sign up, go to the php-options section of the control panel and turn on the fopen function for remote URL’s. For security reasons, we have it turned off by default. After you turn it on you should be able to fetch and download RSS feeds fine.

You can also chmod files from inside php assuming you either run php as a cgi or (the default) run it as the php module and have the file in question be world writeable.