symfony
symfony forum
Home » development » Documentation » My first symfony project Documentation enhancements
icon4.gif  My first symfony project Documentation enhancements [message #20472] Sun, 28 January 2007 18:47 Go to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
Hi,

I'm trying to follow the My first symfony project,
using the final source code http://www.symfony-project.com/downloads/my_first_project.tg z
(link obtained from http://www.symfony-project.com/tutorial/my_first_project.htm l),
under Debian Testing (grml actually).

I've noticed several places that could use some enhancements. I'll post them as I move along.

Here is the first one.

Quote:


Test the sandbox by requesting the following URL:

http://localhost/sf_sandbox/web/index.php/



Don't do that, most people would get:

Quote:


Oops! There was an internal server error.



instead, check http://localhost/sf_sandbox/web/frontend_dev.php
as the very first step. so that people can know what's problem is when there was an error.

[Updated on: Sun, 28 January 2007 22:11]


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20475 is a reply to message #20472 ] Sun, 28 January 2007 18:50 Go to previous messageGo to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
For,

Quote:

Oops! There was an internal server error.



and next problem,

Quote:


Warning: fopen(/www/sf_sandbox/log/backend_dev.log)
[[1]function.fopen]: failed to open stream: Permission denied in



I need to

cd sf_sandbox
chmod 777 -R cache log


[Updated on: Sun, 28 January 2007 18:57]


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20476 is a reply to message #20472 ] Sun, 28 January 2007 18:52 Go to previous messageGo to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
For,

Quote:


Configuration file "/usr/share/php/data/symfony/config/php.yml" specifies
that php.ini "magic_quotes_gpc" key must be set to "". The current value is
"1" (php.ini location: "/etc/php5/apache/php.ini"). [err0001]



check out.
http://www.symfony-project.com/forum/index.php?t=msg&got o=15018&&srch=magic_quotes_gpc#msg_15018
http://de.php.net/manual/en/ref.info.php#ini.magic-quotes-gp c

Here is how I get it working:

  $ grep magic_quotes /etc/php5/apache/php.ini 
  magic_quotes_gpc = On
  magic_quotes_runtime = Off
  magic_quotes_sybase = Off


Change it to:

  @@ -445,3 +445,3 @@
   ; Magic quotes for incoming GET/POST/Cookie data.
  -magic_quotes_gpc = On
  +magic_quotes_gpc = Off


*Edit*:

If you still have the same problem (as I did), restart your web server:

/etc/init.d/apache restart

[Updated on: Sun, 28 January 2007 18:57]


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20481 is a reply to message #20472 ] Sun, 28 January 2007 21:56 Go to previous messageGo to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
Met with "sqlite extension not loaded" problem:

$ symfony propel-insert-sql
propel > insert-sql:
[propel-sql-exec] Executing statements in file: /vars/grml8/var/www/sf_sandbox/data/sql/schema.sql
[propel-sql-exec] Our new url -> sqlite://./../../../../data/sandbox.db
Execution of target "insert-sql" failed for the following reason: /vars/grml8/var/www/sf_sandbox/lib/symfony/vendor/propel-generator/build-propel.xml:253:1:  [wrapped: sqlite extension not loaded [User Info: Array]]



Solution: install php5-sqlite and do it again:

$ aptitude install php5-sqlite

$ php -m | grep -E 'pdo|sqlite'
pdo_mysql
pdo_sqlite

$ symfony propel-insert-sql
propel > insert-sql:
[propel-sql-exec] Executing statements in file: /vars/grml8/var/www/sf_sandbox/data/sql/schema.sql
[propel-sql-exec] Our new url -> sqlite://./../../../../data/sandbox.db
[propel-sql-exec] Executing file: /vars/grml8/var/www/sf_sandbox/data/sql/schema.sql
[propel-sql-exec] 4 of 4 SQL statements executed successfully

BUILD FINISHED


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20482 is a reply to message #20472 ] Sun, 28 January 2007 22:05 Go to previous messageGo to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
Have Symfony interpret the data model and generate the CRUD interface automatically:

$ symfony propel-generate-crud frontend post Post
$ symfony propel-generate-crud frontend comment Comment
$ symfony clear-cache

$ chmod 777 data -R


You now have two modules (post and comment) that will let you manipulate objects of the Post and Comment classes. A module usually represents a page or a group of pages with a similar purpose. Your new modules are located in the sf_sandbox/apps/frontend/modules/ directory, and they are accessible by the URLs:

http://localhost/sf_sandbox/web/frontend_dev.php/post
http://localhost/sf_sandbox/web/frontend_dev.php/comment

From http://localhost/sf_sandbox/web/frontend_dev.php/post

Strict Standards: Static function CreoleTypes::getType() should not be abstract in /vars/grml8/var/www/sf_sandbox/lib/symfony/vendor/creole/CreoleTypes.php on line 124

Strict Standards: Static function CreoleTypes::getNativeType() should not be abstract in /vars/grml8/var/www/sf_sandbox/lib/symfony/vendor/creole/CreoleTypes.php on line 133

Warning: Cannot modify header information - headers already sent by (output started at /vars/grml8/var/www/sf_sandbox/lib/symfony/vendor/creole/CreoleTypes.php:124) in /vars/grml8/var/www/sf_sandbox/lib/symfony/response/sfWebResponse.class.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at /vars/grml8/var/www/sf_sandbox/lib/symfony/vendor/creole/CreoleTypes.php:124) in /vars/grml8/var/www/sf_sandbox/lib/symfony/response/sfWebResponse.class.php on line 247


hmm... this is no longer a configuration issue, but rather a symfony specify problem.

Somebody chip in please!

I'm supposed to see 2 posts, but I saw none, with above errors/warnings. Please help.

thanks

xpt


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20484 is a reply to message #20482 ] Sun, 28 January 2007 22:36 Go to previous messageGo to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
sfxpt wrote on Sun, 28 January 2007 16:05

hmm... this is no longer a configuration issue, but rather a symfony specify problem... Please help.



Lesson learned. Don't go for the stable, the latest stable release == lots of trouble release.

Be brave and go for the latest beta...

no problem so far..


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20494 is a reply to message #20484 ] Mon, 29 January 2007 04:43 Go to previous messageGo to next message
sfxpt  is currently offline sfxpt
Messages: 339
Registered: January 2007
Location: Canada
Faithful Member
sfxpt wrote on Sun, 28 January 2007 16:36

Be brave and go for the latest beta...

no problem so far..



Finished!

I was able to follow the My first symfony project to the last step, after working 2 days on it...


http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Re: My first symfony project Documentation enhancements [message #20795 is a reply to message #20472 ] Fri, 02 February 2007 01:52 Go to previous message
jschrab  is currently offline jschrab
Messages: 8
Registered: March 2006
Location: Milwaukee, WI
Junior Member
I too am having problems with...

"Strict Standards: Static function CreoleTypes::getType()"


...errors with Symfony 0.6.3 and PHP 5.20. Is there no way around this short of downgrading PHP? I've looked at the Creole patch to this but it just "more gracefully" throws exceptions.

This is for a project that I'd rather not go to 1.0.0 until it's full release.
Previous Topic:mistake in The Definitive Guide ?
Next Topic:Pagination Documentation
Goto Forum:
  

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