3

While configuring FLOW3 on mac, I modified the php.ini in terms of setting magic_quotes_gpc = off and on restarting server I get the magic_quotes_gpc = off by browsing http://localhost:8888/MAMP/phpinfo.php But on running:

$ ./flow3 kickstart:package Acme.Demo

I get the following error message:

FLOW3 requires the PHP setting "magic_quotes_gpc" set to Off. (Error #1224003190)

Can anyone have an idea whats going wrong with it?

Richard J. Ross III
  • 53,315
  • 24
  • 127
  • 192
Sidra Sultana
  • 529
  • 1
  • 5
  • 20
  • 1
    Are you sure you modified the right `php.ini`. Like I can see, you are using MAMP. The path should be something like: `/Applications/MAMP/bin/php/php?.?.?/conf/php.ini`. – evotopid Jan 07 '12 at 12:34
  • i just opened the php.ini at Applications/MAMP/conf/php5.3/php.ini mannually and added ; Magic quotes magic_quotes_gpc = off About "Are you sure you modified the right php.ini". Yes, as i have only 1 php.ini when i searched it through mac – Sidra Sultana Jan 07 '12 at 12:38
  • Did you manage to get around this? I have the same exact problem and can't turn off magic quotes.. yet. Despite being set to off by default in the .ini file – Dark Star1 Apr 08 '12 at 02:27
  • Later I configure flow3 on windows and it get well configured there – Sidra Sultana Apr 08 '12 at 11:18
  • Try run `php --ini` in terminal to find out where your php.ini is. – Dmytro Zavalkin Dec 17 '12 at 00:10

3 Answers3

4

If you're using MAMP Pro, editing the php.ini file directly results in it being overwritten when MAMP Pro restarts. I had to edit through the MAMP Pro GUI to turn off 'magic_quotes_gpc'.

In MAMP Pro, go to

File > Edit Template > PHP > [The PHP you're using, in my case PHP 5.3.14 php.ini] 

(img link: http://i.stack.imgur.com/ToUqF.png).

There, you can look for 'magic_quotes_gpc = On' and set that to 'magic_quotes_gpc = Off'. Save the file and restart MAMP Pro.

If you only see 'magic_quotes_sybase = Off', which happened to me, I modified it with these lines:

; Magic quotes for incoming GET/POST/Cookie data.
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

(img link: http://i.stack.imgur.com/HsyPw.png)

Hope that helps!

David Ung
  • 119
  • 1
  • 4
4

You call phpinfo() through a browser, right? But kickstart uses the PHP
CLI binary. I bet you have another binary and/or another configuration for
that one.

Try php -i and look at the path for the config file(s) and the values of
the relevant settings.

Make sure any config file you edit is actually used by the PHP binary you call!

k-fish
  • 23
  • 2
NT88
  • 947
  • 5
  • 25
  • ya you are right its magic_quotes_gpc => On => On but i have only one 1 php.ini residing at Applications/MAMP/conf/php5.3/php.ini. Where should i set magic_quotes_gpc = Off now? – Sidra Sultana Jan 07 '12 at 12:41
1

Eventually you could also do the easy way and disable it in a .htaccess file.

This code should work:

php_flag magic_quotes_gpc Off
evotopid
  • 4,904
  • 2
  • 24
  • 40
  • tried it earlier for executing the code in browser and it works there but while running it through CLI, the error is still there – Sidra Sultana Jan 07 '12 at 17:11