Development

#3466 (Error: magic_quotes_runtime with php 5.2.6)

You must first sign up to be able to contribute.

Ticket #3466 (closed defect: fixed)

Opened 1 week ago

Last modified 4 days ago

Error: magic_quotes_runtime with php 5.2.6

Reported by: Garfield-fr Assigned to: fabien
Priority: major Milestone: 1.0.15
Component: configuration Version: 1.0.13
Keywords: Cc:
Qualification: Unreviewed

Description

[message] Configuration file "/usr/local/php5/lib/php/data/symfony/config/php.yml" specifies key "magic_quotes_runtime" which cannot be overrided

I have commented this line. After that, this is ok

Change History

05/04/08 08:45:40 changed by fabien

  • milestone set to 1.0.14.

05/04/08 14:10:54 changed by Garfield-fr

Addition:

This error in a data import (symfony propel-load-data frontend ou symfony doctrine-load-data)

05/04/08 16:59:26 changed by FabianLange

hmm tried to reproduce it whole morning, even with E_ALL | E_STRICT i cannot see any issue with this being set (windows php 5.2.6, symfony 1.0.13, everything freshly installed)

05/05/08 09:31:57 changed by fabien

  • milestone deleted.

05/06/08 09:44:34 changed by Andrejs.Verza

  • milestone set to 1.0.15.

I have got the same error today. I am using symfony 1.0.14 and PHP 5.2.6. propel-load-data fails, however Garfield's suggested solution works for me too.

Here comes excerpt of the error:

#!/usr/bin/env php
<font color=ff0000>
Warning: Cannot modify header information - headers already sent by (output
started at C:\WebDev\Sites\prakse\symfony:3) in C:\WebDev\PHP5\symfony\lib\
exception\sfException.class.php on line 101
</font>[exception]   sfParseException
[message]     Configuration file "C:\WebDev\PHP5\symfony\data/config/php.yml"
specifies key "magic_quotes_runtime" which cannot be overrided
[stack trace]
  at () in SF_SYMFONY_LIB_DIR\config\sfPhpConfigHandler.class.php line 63
  at sfPhpConfigHandler->execute(array('C:\WebDev\PHP5\symfony\data/config/php
.yml')) in SF_SYMFONY_LIB_DIR\config\sfConfigCache.class.php line 103
  at sfConfigCache->callHandler('config/php.yml', array('C:\WebDev\PHP5\
symfony\data/config/php.yml'), 'C:\WebDev\Sites\prakse\cache\frontend\dev\
config/config_php.yml.php') in SF_SYMFONY_LIB_DIR\config\sfConfigCache.class.
php line 190
  at sfConfigCache->checkConfig('config/php.yml', '') in SF_SYMFONY_LIB_DIR\

05/06/08 11:07:50 changed by fabien

I don't see anything related to magic_quotes_runtime in the PHP 5.2.6 changelog.

Can you try to use set_magic_quotes_runtime() somewhere in your code to see if it works for you or if you have the same error?

05/06/08 13:34:56 changed by sorac

Hi,

Same problem here :

The problem come from an invalid value with the PHP function ini_get_all() :

...  
["magic_quotes_runtime"]=>
  array(3) {
    ["global_value"]=>
    string(0) ""
    ["local_value"]=>
    string(0) ""
    ["access"]=>
    int(63)
  }
...

The access value "63" is invalid and not documented in PHP manual.

But, very strange, when I call the function directly from command line with :

php -r 'var_dump(ini_get_all());'

I got the correct value ("7")

When tested with PHP 5.2.5-0.dotdeb.2, all work fine ...

05/06/08 13:52:20 changed by Andrejs.Verza

Just wanted to tell the same about mysterious "access => 63" which is not documented [yet] or is a PHP bug. Temporary solution would be to check for both values 7 and 63 in the sfPhpConfigHandler.class.php, line 60.

By the way, set_magic_quotes_runtime() works perfectly.

05/06/08 13:54:47 changed by Andrejs.Verza

...and yes, which is strange, in certain situations I've got access = 7 too.

05/07/08 15:10:42 changed by Shinkan

Hi there.

With Symfony 1.0.14, I have the same error using PHP 5.2.6 self-compiled. After portin a freezed app to my environment, I tried to ./symfony propel-load-data myapp but go this error :

[exception]   sfParseException 
[message]     Configuration file "/usr/local/apache2/htdocs/paradise-sf/config/../data/symfony/config/php.yml" specifies key "magic_quotes_runtime" which cannot be overrided

But that's not the worst. My app didn't show the front controller (even using dev env), because it was "unable to write cache file" corresponding to config/php.yml

The two thinks are linked, because removing "magic_quotes_runtime" line in config/php.yml solved the problem (and propel-load-data worked as well). I think this is a big issue as in certain cases, the front controller doesn't work, without telling this is a problem about php.yml ...

05/08/08 10:54:32 changed by FabianLange

  • priority changed from minor to major.

05/08/08 13:53:59 changed by fabien

05/08/08 13:54:34 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

in r8861