Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi,

 

Thank you in advance.

 

Can anyone help please? I sure would appreciate it as I'm new to this. I've copied my phpinfo() below.

 

Here is the question: How (else) can I disable magic_quotes_gpc when I already have in every php.ini file I could find?

 

This is from the php.ini file within the MAMP directory (/Applications/MAMP/bin/php/php5.2.17/conf)

.

 

 

; Magic quotes for incoming GET/POST/Cookie data.

;ATS: Turned off. Item deprecated as of PHP version 5.3

;magic_quotes_gpc = Off

 

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.

;magic_quotes_runtime = Off

 

; Use Sybase-style magic quotes (escape ' with '' instead of \').

;magic_quotes_sybase = Off

 

 

PHP Version 5.2.17

 

 

Configuration

 

PHP Core

/Applications/MAMP/bin/php/php5.2.17/lib/php/extensions/no-debug-non-zts-20060613/ /Applications/MAMP/bin/php/php5.2.17/lib/php/extensions/no-debug-non-zts-20060613/

 

.:/Applications/MAMP/bin/php/php5.2.17/lib/php

.:/Applications/MAMP/bin/php/php5.2.17/lib/php

 

magic_quotes_gpc On On

Link to comment
Share on other sites

Hi Rob,

 

Thanks for the reply. magic_quotes_gpc is Off in every file I can find (see below). It is still on both locally and globally. Any other ideas?

 

To the forum administrator: this problem relates directly to this book, page 44, Sidebar "Magic Quotes". I'd like to go on from the this spot, but want to fix this problem before I do, as I think it may affect the mysql portion.

 

 

/etc/php.ini

 

; magic_quotes_gpc

; Default Value: Off

; Development Value: Off

; Production Value: Off

 

 

/Applications/MAMP/bin/php/php5.2.17/conf/php.ini

 

 

; Magic quotes for incoming GET/POST/Cookie data.

;ATS: Turned off. Item deprecated as of PHP version 5.3

magic_quotes_gpc = Off

 

 

 

tail /etc/.htaccess

php_flag magic_quotes_gpc Off

Link to comment
Share on other sites

Thank you for the reply.

 

I got it, though from a different site (http://forum.mamp.in....php?f=2&t=6770).

 

The answer was:

 

Using MAMP Pro, you need to edit the PHP ini template from there.

Open MAMP Pro -> File (on the menu) -> Edit Templates -> PHP -> PHP 5.2.17 php.ini

 

I edited the file directly, but apparently doing it through the template is the key.

 

Thank you for those who replied! Enjoy your weekend.

Link to comment
Share on other sites

  • 8 months later...

I know this is getting close to a year old but I still can't get the regular(not pro) version of MAMP to turn off magic_quotes_gpc.

Wordpress is working nicely but I can't install Opencart on my current local MAMP server Version 1.9.5 (1.9.5).

I have meet all the opencart requirements except: magic_quotes_gpc = Off

  • Register Globals: Off
  • Magic Quotes GPC: Off
  • File Uploads: On
  • Session Auto Start: Off

I restart the server after each edit to the php.ini file/s - but still no change.

This is the error message I get in my browser:magicquotesheadache.png

Any suggestions?

Thanks

Phil

Link to comment
Share on other sites

 Share

×
×
  • Create New...