This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Installing Symfony

Installation and environment issues, mainly on 1.x but there's some 2.x here too.

Installing Symfony

by macio » Fri Nov 04, 2005 12:27 am

Hello,
After successful installation, after init-project and init-app all I can see in my browser is:

--CUT--

Warning: preg_replace_callback() [function.preg-replace-callback]: Unable to call custom replacement function in /usr/share/php/symfony/symfony/config/sfCompileConfigHandler .class.php on line 112

Warning: preg_replace_callback() [function.preg-replace-callback]: Unable to call custom replacement function in /usr/share/php/symfony/symfony/config/sfCompileConfigHandler .class.php on line 112

Warning: preg_replace_callback() [function.preg-replace-callback]: Unable to call custom replacement function in /usr/share/php/symfony/symfony/config/sfCompileConfigHandler .class.php on line 112
[exception] sfInitializationException [message] Configuration file "/usr/share/php/data/symfony/config/php.yml" specifies that php.ini "magic_quotes_gpc" key must be set to "" [code] N/A [class] sfPhpConfigHandler [file] /usr/share/php/symfony/symfony/config/sfPhpConfigHandler.cla ss.php [line] 98 [symfony] v. 1.0.0-DEV (symfony-project.org) [PHP] v. 5.0.5-pl2-gentoo [stack trace] at sfConfigCache::execute() in [/usr/share/php/symfony/symfony/config/sfConfigCache.class.p hp:66] at sfConfigCache::callHandler() in [/usr/share/php/symfony/symfony/config/sfConfigCache.class.p hp:150] at sfCompileConfigHandler::checkConfig() in [/usr/share/php/symfony/symfony/config/sfCompileConfigHandle r.class.php:118] at sfCompileConfigHandler: :preg_replace_callback() in [/usr/share/php/symfony/symfony/config/sfCompileConfigHandle r.class.php:95] at sfConfigCache::execute() in [/usr/share/php/symfony/symfony/config/sfConfigCache.class.p hp:66] at sfConfigCache::callHandler() in [/usr/share/php/symfony/symfony/config/sfConfigCache.class.p hp:150] at checkConfig() in [/usr/share/php/symfony/symfony/symfony.php:107] at require_once() in [/var/www/localhost/htdocs/symf/myapp/config/config.php:47] at require_once() in [/var/www/localhost/htdocs/symf/web/index.php:8]

--CUT--

I've tried to find out what is going on, but I had to give up :/ and yes, I know how to use google ;)~ ;-)~ :wink:
Do you know the answer?

OS: Linux laps 2.6.13-gentoo-r3 #1 SMP Mon Oct 10 22:02:17 CEST 2005 i686 Intel(R) Pentium(R) M processor 1.50GHz GenuineIntel GNU/Linux
PHP: php-5.0.5-r2
APACHE: apache-2.0.54-r31
SYMFONY: 0.5.38
PAKE: 1.0.70
PHING: 2.1.1

thanks
macio
Junior Member
 
Posts: 2
Joined: Fri Nov 04, 2005 12:12 am

Re: Installing Symfony

by fabien » Fri Nov 04, 2005 10:44 am

It seems you have magic_quotes_gpc set to on and symfony likes to have it to off.

If you can't or don't want to change magic_quotes_gpc to off, you can copy the php.yml (/usr/share/php/data/symfony/config/php.yml in your case) to your project config directory and remove the magic_quotes_gpc line.

And I think it will work.

I will see if we can have a better error message.
fabien
Faithful Member
 
Posts: 487
Joined: Sat Oct 22, 2005 9:01 am

Re: Installing Symfony

by macio » Fri Nov 04, 2005 10:38 pm

Yes, you're right, that was the problem.
Thanks :)~ :-)~ :smile:

I think you should add this info to "Installing Symfony" chapter because magic_quotes_gpc=on by default.

Now, I'm gonna play with symfony ;)~ ;-)~ :wink:
macio
Junior Member
 
Posts: 2
Joined: Fri Nov 04, 2005 12:12 am

Re: Installing Symfony

by jlapier » Thu Nov 10, 2005 7:34 pm

I had the same problem and would just like to add that I added:
Code: Select all
php_value magic_quotes_gpc 0

to the end of myproject/web/.htaccess to change the magic quotes without changing it in my php.ini file.

- Jason
jlapier
Junior Member
 
Posts: 1
Joined: Thu Nov 10, 2005 7:28 pm

Re: Installing Symfony

by erestar » Fri Nov 11, 2005 6:20 pm

Hi everyone...

I'm having this problem as well, but I have magic quotes turned off (verified by a check to a phpinfo() call).

Can anyone think of any other configuration changes that I might need to make in order to get this working?

Thanks!

Jim
Jim Podroskey [www.pbtg.com]
erestar
Senior Member
 
Posts: 114
Joined: Fri Nov 11, 2005 6:14 pm

Re: Installing Symfony

by erestar » Fri Nov 11, 2005 6:24 pm

Whoops, turned out there was a different error involving register globals. Sorry!
Jim Podroskey [www.pbtg.com]
erestar
Senior Member
 
Posts: 114
Joined: Fri Nov 11, 2005 6:14 pm

Re: Installing Symfony

by jbauer » Sun Nov 13, 2005 10:10 am

I had this exact problem on Fedora Core 3

jlapier's .htacces addition solved it for me too.

php_value magic_quotes_gpc 0

thanks!
jbauer
Junior Member
 
Posts: 21
Joined: Sun Nov 13, 2005 10:07 am