Php magic_quotes & register_globals help


#1

I’m about to run a scripts that needs:

  • magic_quotes_gpc on
  • register_globals off

Which php version/settings allows me to properly set those two variables and how ?

Many thanks for your help.


#2

Register globals is turned off in php 5 and on in php 4. I don’t know about magic quotes off hand.
There are a few articles in the DH wiki about either a)setting up your own version of php or b)using a copy php.ini to change your settings.
Silk

My website


#3

There is rarely a good reason to have magic_quotes GPC on, though you sound almost as though you are describing the recommended Joomla! configuration. :wink:

As pointed out, neither DH default configuration of PHP (4 or 5) will meet both of those conditions.

PHP 4 defaults to register_globals =on
PHP5 defaults to Magic-quotes GPC = OFF

What script are you trying to run?

–rlparker


#4

I wish the Joomla! people would do something about that. Magic quotes are needed by programmers who are stupid and don’t know what they are doing, or by software that is written by programmers who are stupid and don’t know what they are doing. Joomla! doesn’t need magic quotes enabled to work, but it still gives this stupid and alarming warning message if they are disabled. At the very least, the software should have a “check to ignore this warning” checkbox or something.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

I agree, and I actually had the opportunity to discuss that issue with members of the Joomla! core development team while attending the OSCMS Summit a couple of weeks ago.

They seemed to agree with me, and indicated that the issue would be handled differently in the upcoming 1.5 release (which is already in beta). It was interesting to learn that one of the main reasons they left the recommendation to leave magic_quotes GPC on, was to facilitate the most popular Joomla! add-on forum, whose conversion scripts to move data from existing phpbb and other forums data into the new forum relied upon it.

Additionally, it is possible to suppress the warnings in the back-end via a setting in the Joomla! back-end, and that is probably a good thing to do if developing a site for others - that warning might make your client feel as though they had an “exposed” system, which really is not the case.

–rlparker


#6

That is excellent news. I will expect support questions to be cut by 50% when V1.5 goes live.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]