just2bduckie Posted November 25, 2011 Share Posted November 25, 2011 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 More sharing options...
rob Posted November 25, 2011 Share Posted November 25, 2011 You need to remove the semicolon from the start of the line: ;magic_quotes_gpc = Off You can also turn magic quotes off in a .htaccess file using a php_flag 1 Link to comment Share on other sites More sharing options...
just2bduckie Posted November 26, 2011 Author Share Posted November 26, 2011 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 More sharing options...
Jonathon Posted November 26, 2011 Share Posted November 26, 2011 Remove the semi colons from the php.ini file lines too. A semi colon is like a php comment, you'll possibly need to restart apache too. The values in php.inii currently have no meaning as they are still commented out I believe. 1 Link to comment Share on other sites More sharing options...
just2bduckie Posted November 26, 2011 Author Share Posted November 26, 2011 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 More sharing options...
Phil Posted July 31, 2012 Share Posted July 31, 2012 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: Any suggestions? Thanks Phil Link to comment Share on other sites More sharing options...
Larry Posted August 1, 2012 Share Posted August 1, 2012 I would remove the apostrophe from your hard drive name. You really don't wan to have any special characters in file or directory names. Link to comment Share on other sites More sharing options...
Recommended Posts