Forum

Home » support » Installation and setup » syntax error in config.php
icon5.gif  syntax error in config.php [message #34436] Wed, 29 August 2007 14:33 Go to next message
elofoolish  is currently offline elofoolish
Messages: 17
Registered: August 2007
Location: Rome
Junior Member
After running "symfony init-project"
a config.php file is created in this way:
"<?php

// symfony directories
$sf_symfony_lib_dir = \'/usr/share/php/symfony\';
$sf_symfony_data_dir = \'/usr/share/php/data/symfony\';"

the blackslashe presence cause a syntax error while loading
the command "symfony propel-build-model".

Has anyone an idea why config file is created in this way?
Re: syntax error in config.php [message #34576 is a reply to message #34436 ] Thu, 30 August 2007 16:12 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 7242
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I've never seen that before! What version of symfony are you running, and on what platform?


Remember Gaza
Re: syntax error in config.php [message #34578 is a reply to message #34576 ] Thu, 30 August 2007 16:20 Go to previous messageGo to next message
elofoolish  is currently offline elofoolish
Messages: 17
Registered: August 2007
Location: Rome
Junior Member
symfony 1.0.6
php 5.2.3-0
debian OS
Re: syntax error in config.php [message #34579 is a reply to message #34436 ] Thu, 30 August 2007 16:23 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 7242
Registered: January 2006
Location: West Midlands, UK
Faithful Member
It can be fixed manually, but I am not sure what might cause it. Hopefully someone will make a suggestion. If you get nothing, suggest you report it as a bug.


Remember Gaza
Re: syntax error in config.php [message #34580 is a reply to message #34579 ] Thu, 30 August 2007 16:29 Go to previous messageGo to next message
elofoolish  is currently offline elofoolish
Messages: 17
Registered: August 2007
Location: Rome
Junior Member
I'd tried to fix by hand,
but another error occurred. I describe the following one in
"error while reading project file [wrapped: $path/build.xml]"
topic.
These errors are correlated, I guess...
Re: syntax error in config.php [message #34581 is a reply to message #34436 ] Thu, 30 August 2007 16:33 Go to previous messageGo to next message
pezetgee
Messages: 734
Registered: March 2006
Faithful Member
Looks like the apostrophe characters are being escaped.

What's your phpinfo output?
Re: syntax error in config.php [message #34583 is a reply to message #34581 ] Thu, 30 August 2007 16:40 Go to previous messageGo to next message
elofoolish  is currently offline elofoolish
Messages: 17
Registered: August 2007
Location: Rome
Junior Member
in attch php -i output

  • Attachment: phpinfo.txt
    (Size: 22.30KB, Downloaded 107 time(s))

Re: syntax error in config.php [message #34586 is a reply to message #34583 ] Thu, 30 August 2007 16:58 Go to previous messageGo to next message
pezetgee
Messages: 734
Registered: March 2006
Faithful Member
turn off magic_quotes_gpc and magic_quotes_runtime

+ restart apache

[Updated on: Thu, 30 August 2007 16:59]

Re: syntax error in config.php [message #34589 is a reply to message #34586 ] Thu, 30 August 2007 17:10 Go to previous messageGo to next message
elofoolish  is currently offline elofoolish
Messages: 17
Registered: August 2007
Location: Rome
Junior Member
WOW
YOU'RE RIGHT!!!!!!!!!!
now it works and fix also the propel with propel-build-model command!
thank you so much!
Re: syntax error in config.php [message #34590 is a reply to message #34436 ] Thu, 30 August 2007 17:25 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 7242
Registered: January 2006
Location: West Midlands, UK
Faithful Member
pezetgee: shouldn't that have raised a warning or an error? I'm sure this has come up before (perhaps in symfony, though, rather than pake/Propel).

[Updated on: Thu, 30 August 2007 17:26]


Remember Gaza
Re: syntax error in config.php [message #34592 is a reply to message #34590 ] Thu, 30 August 2007 17:35 Go to previous messageGo to next message
elofoolish  is currently offline elofoolish
Messages: 17
Registered: August 2007
Location: Rome
Junior Member
this warnig appears when I load "symfony propel-build-model" after init-project:

PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/eleonora/prova/ptl/config/config.php on line 4

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/eleonora/prova/ptl/config/config.php on line 4
PHP Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/eleonora/prova/ptl/config/config.php on line 4

Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/eleonora/prova/ptl/config/config.php on line 4
PHP Parse error: syntax error, unexpected '/' in /home/eleonora/prova/ptl/config/config.php on line 4

Parse error: syntax error, unexpected '/' in /home/eleonora/prova/ptl/config/config.php on line 4
Re: syntax error in config.php [message #34594 is a reply to message #34590 ] Thu, 30 August 2007 17:41 Go to previous messageGo to next message
pezetgee
Messages: 734
Registered: March 2006
Faithful Member
halfer: I remember getting some warnings about magic_quotes before, can't figure out now on what stage and on which symfony version.

I may check it over weekend if I get some time..

[Updated on: Thu, 30 August 2007 17:41]

Re: syntax error in config.php [message #34595 is a reply to message #34590 ] Thu, 30 August 2007 17:47 Go to previous messageGo to next message
pezetgee
Messages: 734
Registered: March 2006
Faithful Member
AHA! I think that the error message is displayed on browser.

Re: syntax error in config.php [message #34597 is a reply to message #34436 ] Thu, 30 August 2007 18:01 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 7242
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I wonder whether another ticket might be in order here? Looks like the browser incompatibility has a warning, but not at the cmd line.


Remember Gaza
Re: syntax error in config.php [message #34605 is a reply to message #34597 ] Thu, 30 August 2007 18:21 Go to previous messageGo to next message
pezetgee
Messages: 734
Registered: March 2006
Faithful Member
I think so, go for it.
Re: syntax error in config.php [message #34608 is a reply to message #34436 ] Thu, 30 August 2007 18:37 Go to previous message
halfer  is currently offline halfer
Messages: 7242
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Done:

http://trac.symfony-project.com/trac/ticket/2155


Remember Gaza
Previous Topic:Unbuntu Fiesty Propel Issues
Next Topic:CLI Problems
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software