[symfony-users] Re: I18n not translating

2010-12-10 Thread pghoratiu
Make sure the XML you have is well formed. If there is an error in the
XML the translations will not be interpreted.
You can check the XML with:
1. Editor that has support for XML checking - Netbeans, Eclipse
2. Open the messages.xml in in Firefox/IE


AFAIK this XML is not well formed:



Inicio
Home




should be:




Inicio
Home




gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: symfony hangs up

2010-12-04 Thread pghoratiu
What do you mean by generate the data model?
Check if the access rights are correctly set up for the cache/
directory.

gabriel

On Dec 2, 12:03 pm, dianacastillo  wrote:
> I have symfony installed in windows and it works fine when I go 
> herehttp://localhost:8080//frontend_dev.php/
> I generated the data model but when I try to 
> runhttp://localhost:8080//frontend_dev.php/
> it times out and I have to restart php and apache.
>
> I dont have an accelerator installed, could it be because of this?
> Which accelerator should I install on windows and how is it
> installed?
>
> thank you

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: we check if the .html version is here (caching)

2010-11-29 Thread pghoratiu
I think that the sfSuperCache plugin was doing this at one time during
Symfony 1.0, I'm not aware of any plugins doing this for Symfony 1.4
Check here: http://www.symfony-project.org/plugins/sfSuperCachePlugin

gabriel


On Nov 29, 12:26 pm, "Felix E. Klee"  wrote:
> In the default ".htaccess" in Symfony 1.4, the following code block can
> be found:
>
>  # we check if the .html version is here (caching)
>  RewriteRule ^$ index.html [QSA]
>  RewriteRule ^([^.]+)$ $1.html [QSA]
>  RewriteCond %{REQUEST_FILENAME} !-f
>
> What cache is the comment referring to? Is Symfony ever creating ".html"
> files for caching?
>
> I am asking because I am in the process of developing a custom
> ".htaccess" file for a special server setup, and I want to keep things
> as simple as possible.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Manage the credentials of the actions and modules through a form

2010-11-26 Thread pghoratiu
You should do the following:
- design tables to store info about: modules/actions/user/permission
- develop another security filter (that would replace the current
security filter)
that would use the new source for the credential data.

gabriel


On Nov 25, 9:02 pm, Javier Garcia  wrote:
> Hi,
>
> as you know you can edit the credentials of an action or a module
> going to file view.yml of the module and editing them.
>
> Our boss doesn't want to go to the files to edit the credentials in
> each view.yml file, but wants to have a form where he can select the
> modules and the actions of the application and give them the
> credentials.
>
> What would be your approach?
>
> Regards
>
> Javi

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Enable partial caching on pages with query string

2010-11-25 Thread pghoratiu
I did not solve this issue either, the workaround I used was to have
those parameters in the URL something like:
/search?id=10 => /search/id/10
or
/search?category=2&keyword=232  => /search/category/2/keyword/232

and eliminate the query string from the URL.

gabriel


On Nov 23, 1:22 am, Ken Golovin  wrote:
> I would like to be able to cache a partial on a search results page
> that uses query strings, however symfony ignores caching settings. The
> page onhttp://www.symfony-project.org/reference/1_4/en/09-Cache
> says:
>
> "An incoming request with GET parameters in the query string or
> submitted with the POST, PUT, or DELETE method will never be cached by
> symfony, regardless of the configuration."
>
> Is there any way to override this behaviour?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: OT - Translators and Translations

2010-11-22 Thread pghoratiu
I agree with you, it's quite a headache to deal with the translation
files as XML. I have a couple of ideas on how this could be improved
but I did not have the time to implement it as a plugin.

For existing solutions to this problem take a look at:
http://www.symfony-project.org/plugins/mgI18nPlugin
A really nice plugin that stores translations in DB and provides a
jQuery UI to translate the strings directly on the portal.

gabriel

On Nov 22, 11:40 am, Simone Fumagalli 
wrote:
> Hello everybody.
>
> When I develop I18n project I always spend a lot of time (too much) to
> translate it. It's hard for me to keep translation files updated and
> share them with the translators. My translators don't know how to use
> programs like Virtaal/Pootle and the send me MS Words/Excel files ! (I
> let you imagine problems with UTF 8 and etc)
>
> I've 2 questions:
>
> 1) Does anybody have hints or want to share best practices for manage
> the translation process ?
> 2) Is there  a site/service where I can hire a translator and get my
> dictionary file in Xliff format ?
>
> Thanks
>
> --
> Simone

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Security Component: how to authenticate a user manually?

2010-11-22 Thread pghoratiu
Assuming you use sfGuard it's something like:

$this->getUser()->signIn($user);

Where $user is an active sf_guard_user entry, so you have to save the
entry, signin and then redirect.

gabriel

On Nov 21, 5:22 pm, noel guilbert  wrote:
> Hi,
>
> I have a subscribe form, and I want to log my user in just after the
> subscription. How should I do?
>
> Thanks
>
> --
> Noël GUILBERThttp://www.noelguilbert.com/
> Twitter 
> :http://twitter.com/noelguilberthttp://www.sensiolabs.comhttp://www.symfony-project.com
> Sensio Labs
> Tél: +33 1 40 99 80 80

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Performances issues

2010-11-17 Thread pghoratiu
> In the meantime, we have moved forward on our timer method and we
> discovered that rendering templates took us about 200ms. Don't you
> think this is huge ?
> Thanks anyway !
=
Does this include the time to wait for the XML data source?

On my dev machine it takes about 17 ms to process factories, 6 ms for
configuration so about 23 ms of overhead is always present.
For a simple page that is constructed by 5 db accesses it takes aprox.
5 ms to process the action and 65 ms to render the view and 100 ms to
render
the rest of the layout, components on the page, in total about 193 ms.
I think that 200 ms can be large but again depends on what code do you
have in the view.

Check out also this optimization flag, I did not try out myself, maybe
it helps you:
http://www.symfony-project.org/tutorial/1_4/en/whats-new#chapter_a2fae23c9403b0e9ec99806fccf6b53e_sub_project_optimize

You did not say anything about the routing, if you use it or not?
How do you share session information across machines?

I'm curious what you'll find to be the bottleneck :)

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Performances issues

2010-11-16 Thread pghoratiu
On Nov 16, 7:17 pm, Remi  wrote:
> -> we don't use any .htaccess file : everything goes directly to an
> "httpd.conf"
=
Also have
AllowOverride none
in apache config to not search for .htaccess files.

> -> we don't use ORM since we don't use databases : only Webservices
=
Make sure you disable database functionality in the settings.yml
http://www.symfony-project.org/reference/1_4/en/04-Settings#chapter_04_sub_use_database

> -> how can I be sure that APC is well configured ? Do I have a way to
> easily check if APC is working well ?
=
APC stats are available in browser via some web pages generate by APC
itself.

The configuration key to change the max php file size within APC:
http://www.php.net/manual/en/apc.configuration.php#ini.apc.max-file-size
by default is set to 1 M. Check in the cache dir if you have php files
larger than 1M
find . -type f -size +1000k
If you have change the value of this key to something larger.

Make sure you restart Apache after making the changes.

> -> from what I heard, memcache and APC are not such different one from
> another in term of performances. Was it a crapy advice ? We are
> already using APC for the few objects we can store on cache.

The two are different in the way they store the cache, where APC uses
local SHM cache, Memcache uses
a centralized model with a single server holding the cache. When using
multiple machines having a single
centralized cache (may) make more sense.

> -> I thought that Symfony 2 was absolutly not ready for production
> environment ? Can we expect a huge performance increase (or decrease
> depending the side you are :) ) ?

There are crazy people already using it for production, the trick is
to use the stable parts of it :), and from what
I understood you don't need the components that are not yet complete.
According to the benchmarks published by Fabien it is faster than
1.4.x
http://symfony-reloaded.org/fast

Do you use the routing component, that's one of the slowest when it
comes to processing?

My suggestion for you is to establish some baseline measurements to
see where you are, what's the best performance that you can achieve:
a. measure how many requests can you do when requesting a static web
page
b. measure the overhead of php processing -  have that page served by
PHP (echo a template with symfony and separately by plain php)
This way you can see if the overhead is with PHP, symfony or both.

Realistically speaking a framework has quite an overhead compared to
plain PHP so you can never achive the raw PHP speed with it.

I remember reading somewhere about a presentation at the London
Symfony Meetup on how to scale Symfony to process thousand requests
per second, I don't remember the details, maybe some other member in
this group can share more info about this.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Performances issues

2010-11-16 Thread pghoratiu
Some other suggestions:
 - avoid .htaccess - move rewrite rules in the Apache configuration.
 - avoid the ORM - if you do access the database use plain SQL to
manipulate the data.
 - make sure APC is configured correctly (so that it caches large PHP
files, such as the ones generated by the routing).
 - try memcache for data frequently accessed
 - move to symfony2 - if the framework is only a shim layer over the
actual data source you could use symfony2

gabriel


On Nov 16, 11:36 am, Remi  wrote:
> Hi,
>
> I'm working on a Symfony project for the past 11 months. The project
> is basically to throw away the old FrontEnd of a well-known shopping
> comparator, written in java and to replace it with a brand new
> frontend written in PHP with a Service Oriented Architecture (SOA).
> Our high-level architecture is to have a light-weighted frontend in
> PHP (using Symfony 1.4) and a WebService Aggregator written in Java
> (Jersey framework) to ensure all call to underlined webservices are
> done in parallal. This aggregator is extremly performant : it handles
> more than 200 Queries Per Second (QPS).
>
> Our main issue is more about the PHP frontend. Despite all our
> efforts, we can't handle more than 15 QPS on each server. Just to give
> you an idea, here are a few key informations about our achitecture :
>
>     * 6 Servers with 4 physical cores (8 with HyperThreading enabled)
> and 24GB of RAM
>     * Using Symfony 1.4.1 with PHP 5.2.10
>     * No database access : all datas are fetched using WebServices
>     * Centos 5.4 Final 64 bits
>     * Apache 2.2.3
>     * APC cache enabled
>     * using SimpleXml to read XML feeds (300 nodes tops) coming from
> our WebServices
>     * using mod_php
>     * PHP memory limit is set to 128M in our production servers (we
> noticed lots of performances issues with only 32M or even 64M)
>
> Our FrontEnd does not handle complex algorithm. Basically, it get its
> data from some High Performances webservices (all internal), read the
> request, render the page and log some usefull data (access logs using
> Apache and some custom logs for our business). Everything is monitored
> closely and the bottleneck seems to come from CPU usage which reach
> 100% pretty often.
> We tried a few things :
>
>     * Using Apache FastCGI (quite complicated on Centos5.4 since we
> have to re-compile it) : slight increase but is not worth all the
> trouble it causes on our company architecture. Nevertheless, it seems
> that we did some configuration mistakes and we need to bench it again.
>     * Caching a few modules : header, footer, ads, ...
>     * Replacing Apache by NGix : no change at all
>
> For the moment, our average server time exceed 1 second which is
> really bad compared to our old Java-based website (300-400 ms) and we
> didn't have rollouted all supported pages or even all our countries
> (we expect to double the number of connection by activating all
> remaining countries).
> Do you have any idea on how we could increase our performances ? Do we
> need to directly contact SensioLabs to negociate some contractor time
> (maybe a Symfony Guru ?) ?
> Do you know some tools that can help us to profile our application in
> production environment ? We've already tried XDebug on developer
> workstations but we don't have the same exact behavior in production.
> What I'd like to test is to (manually) instrumentate our source code
> to add some timers around some potentially costly algorithms. So you
> know any tool that could help us to do that ?
>
> I already have created a topic on Symfony forum 
> :http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p...
>
> Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: RESTFul & etag

2010-11-07 Thread pghoratiu
You have to check the browser HTTP headers that are sent (Request/
Response) via Firebug or HttpFox Firefox extensions.
Do you have enabled caching for your page?
There are more things to consider when you try to cache a page, not
just the Etag.

gabriel

On Nov 8, 7:28 am, Shihab KB  wrote:
> Thank you for your answer. I am trying to implement ETag in my restful
> apis. I have a problem here. Please check this and could you please
> give me a solution?
>
> Hi,
>
> I am trying to implement etag feature in my RESTFul web services. I
> heard that etag is a mechanism that HTTP provides for cache
> validation, and which allows a client to make conditional requests and
> saves bandwidth, as a web server does not need to send a full response
> if the content has not changed. I have manged to implement the etag
> feature as given below.
>
> In the settings.yml
> prod:
>   .settings:
>     no_script_name:         on
>     logging_enabled:        off
>     cache:                  on
>     etag:                   on
>
> In the cache.yml
> default:
>   enabled: on
>   with_layout: true
>   lifetime: 86400
>   client_lifetime: 0
>
> But I have one issue that, after implementing this, when I modified
> the content in the database, the client is receiving only previous
> data. Not modified one. When I reset the above settings (setting.yml
> and cache.yml) its working fine.
>
> Have faced same situation? Can you suggest a way to overcome this?
>
> My client application is a .NET application.
>
> regards
> Shihab
>
> On Nov 5, 3:10 pm, Gareth McCumskey  wrote:
>
>
>
>
>
>
>
> > ETag is just a way to have finer grained control over caching and to manage
> > when to reprocess a request or just send back a cached response. So for
> > example, if you send a GET request for a resource with id 10 and get a
> > result, sending a request later for id 10 should respond back with the
> > cached version if the resource of id 10 has not changed but reprocess the
> > request if it has changed.
>
> > On Fri, Nov 5, 2010 at 8:29 AM, Shihab KB  wrote:
> > > Dear friends,
>
> > > Can you explain me the significance and benefits of enabling the ETag
> > > feature ?
>
> > > regards
> > > Shihab
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to
> > > security at symfony-project.com
>
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com > >  ­legroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc- Hide quoted text -
>
> > - Show quoted text -

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: question about variables in symfony 1

2010-10-27 Thread pghoratiu
Two possible solutions:

1. create a class or helper in lib/ that caches the data extraction so
that the second time when you request the data
you have it, something like this:
class myUserProfileCache
{
   static protected $userData = null;

   public static function getUserData()
   {
 if (is_null(self::$userData))
 {
   // request data and store it localy for caching purposes
 }

 return self::$userData;
   }
}

2. Store the variable in the request and not in the user session
http://www.symfony-project.org/api/1_4/sfRequest#method_setparameter

gabriel

On Oct 27, 2:36 pm, Michał Piotrowski  wrote:
> Hi,
>
> I've got a layout:
>
> [some html]
> [some php]
> 
> 
> [some html]
> 
> [some random code]
>
> The problem is that all components needs some user data. I've got an
> user settings table and I need to SELECT the same user data in each
> component.
>
> As a result of such br00ken design sometimes I need to SELECT the same
> data three, four times (sometimes in action).
>
> I tried to write an init component that fetches all data and stores it
> in as session variables, but this works only for authenticated users.
>
> Is there a way to store variable in component that would be visible
> for other components and for action?
>
> Best regards,
> Michal

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: symfony or doctrine... or is it me?

2010-10-27 Thread pghoratiu
Are you sure it's not a typo in the condition:

->where('m.name like ?', '%' . $q . '%')
-   ->orWhere('l.name like ?', '%Swit%')
+  ->orWhere('m.name like ?', '%Swit%')

   gabriel


On Oct 27, 5:20 pm, erikms  wrote:
> Hi Florian, thank you for your prompt reply. I have DB logging on, I
> think...
> at any rate, I get the line in my log, telling me that
>
> SELECT [c].[country_id] AS [c__country_id], [c].[name] AS [c__name]
> FROM [crm5].[country] [c] WHERE ([c].[name] like  '%Afgh%' OR [c].
> [name] like ?)
>
> which is created from
> $q = 'Afgh';
> $countries = Doctrine::getTable('MSCountries')
> ->createQuery('m')
> ->where('m.name like ?', '%' . $q . '%')
> ->orWhere('l.name like ?', '%Swit%')
> ->execute();
> is not valid SQL. Which it isn't. The last '?' is not being
> substituted with the '%Swit%'. If I do that by hand and run the query,
> I get the expected result: Afghanistan and Switzerland
> Is that what you meant? and then, is this a symfony issue, a doctrine
> one, or am *I* doing something wrong?
>
> Yours,
> -Erik

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: doctrine insert-sql

2010-10-27 Thread pghoratiu
No type specified for the "uri" and "label" columns in the failing
query:
CREATE TABLE layar_actions (id BIGINT UNIQUE
AUTO_INCREMENT, uri , label , entrepeneur_id BIGINT, INDEX
entrepeneur_id_idx (entrepeneur_id), PRIMARY KEY(id)) ENGINE = INNODB

As to why is this I can't say.

gabriel

On Oct 25, 9:02 pm, Peter Paauwe  wrote:
> Hi all,
>
> I developed a simple datamodel with ORM designer and exported to
> Doctrine YML. Then used symfony to generated all ($php symfony
> doctrine:build --all). Everything worked fine, except for the sql
> insertion. This resulted in the following error:
>
> SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
> error in your SQL syntax; check the manual that corresponds to your
> MySQL server version for the right syntax to use near ' label ,
> entrepeneur_id BIGINT, INDEX entrepeneur_id_idx (entrepeneur_id),
> PRIMA' at line 1. Failing Query: "CREATE TABLE layar_actions (id
> BIGINT UNIQUE AUTO_INCREMENT, uri , label , entrepeneur_id BIGINT,
> INDEX entrepeneur_id_idx (entrepeneur_id), PRIMARY KEY(id)) ENGINE =
> INNODB". Failing Query: CREATE TABLE layar_actions (id BIGINT UNIQUE
> AUTO_INCREMENT, uri , label , entrepeneur_id BIGINT, INDEX
> entrepeneur_id_idx (entrepeneur_id), PRIMARY KEY(id)) ENGINE = INNODB
>
> I can't seem to figure out where the problem lies. Anybody any ideas?
> Below is my YML file:
>
> Entrepeneur:
>   columns:
>     id:
>       primary: true
>       type: integer
>       notnull: true
>       autoincrement: true
>     name:
>       type: string
>     short_description:
>       type: string
>     lat:
>       type: integer
>     lon:
>       type: integer
>     layar_line2:
>       type: string
>     layar_line3:
>       type: string
>     layar_line4:
>       type: string
>     small_image:
>       type: string
>     introduction:
>       type: string
>     street:
>       type: string
>     street_number:
>       type: string
>     zipcode:
>       type: string
>     place:
>       type: string
>     phone:
>       type: string
>     email:
>       type: string
>     website:
>       type: string
>     event_or_open:
>       type: boolean
>     monday:
>       type: string
>     tuesday:
>       type: string
>     wednesday:
>       type: string
>     thursday:
>       type: string
>     friday:
>       type: string
>     saturday:
>       type: string
>     sunday:
>       type: string
>     event_date:
>       type: string
>     event_time:
>       type: string
>     event_location:
>       type: string
>     event_price:
>       type: string
>     event_age:
>       type: string
>     event_tickets:
>       type: string
>     event_extra_info:
>       type: string
>     social1:
>       type: string
>     social2:
>       type: string
>     social3:
>       type: string
>     social4:
>       type: string
>     maps_link:
>       type: string
>     Category_id:
>       type: integer
>       notnull: true
>   relations:
>     Category:
>       onDelete: CASCADE
>       local: Category_id
>       foreign: id
> LayarActions:
>   columns:
>     id:
>       primary: true
>       type: integer
>       notnull: true
>       autoincrement: true
>     uri:
>       type: string
>     label:
>       type: string
>     Entrepeneur_id:
>       type: integer
>       notnull: true
>   relations:
>     Entrepeneur:
>       local: Entrepeneur_id
>       foreign: id
> Category:
>   columns:
>     id:
>       primary: true
>       type: integer
>       notnull: true
>       autoincrement: true
>     name:
>       type: string
>     title:
>       type: string
>     short_description:
>       type: string
>     small_image:
>       type: string
>     sort_order:
>       type: integer
>     cat_type:
>       type: integer
>     Category_id:
>       type: integer
>   relations:
>     Category:
>       onDelete: CASCADE
>       local: Category_id
>       foreign: id
> Page:
>   columns:
>     id:
>       primary: true
>       type: integer
>       notnull: true
>       autoincrement: true
>     title:
>       type: string
>     text:
>       type: string
>     page_type:
>       type: integer
>     Category_id:
>       type: integer
>       notnull: true
>   relations:
>     Category:
>       onDelete: CASCADE
>       local: Category_id
>       foreign: id
> Highlight:
>   columns:
>     id:
>       primary: true
>       type: integer
>       notnull: true
>       autoincrement: true
>     type:
>       type: string
>     title:
>       type: string
>     short_description:
>       type: string
>     smal_limage:
>       type: string
>     long_description:
>       type: string
>     large_image:
>       type: string
>     item_title:
>       type: string
>     date:
>       type: string
>     time:
>       type: string
>     location:
>       type: string
>     price:
>       type: string
>     entrepeneur_link:
>       type: string
>     category_link:
>       type: string
>     Category_id:
>       type: integer
>       notnull: true
>   rela

[symfony-users] Re: Why the browser redirects home page to xampp-splash?

2010-10-27 Thread pghoratiu
Looks like a problem with Apache vhost configuration. Make sure you
have it configured correctly.

   gabriel

On Oct 27, 3:30 am, Marcio Pozzato  wrote:
> Hi Gays,
>
> I`m doing the jobeet project again, and unfortunately when finished
> the Day 1 I couldn`t show the home pagewww.jobeet.com.localhost/index.php. 
> The browser redirect it to
> xampp/splash home page.
> Please, why?
>
> Thank you in advance.
>
> M. Pozzato
> Rio de Janeiro - BRAZIL

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: criteria::notlike

2010-10-26 Thread pghoratiu
When using multiple conditions on the same column you need to use a
criterion that links them together otherwise the last defined
filtering criteria is taken into consideration.

Using your example something like this:
$c = new Criteria();
$c1 = $c-
>getNewCriterion((CommentsPeer::COMMENT,'likes',Criteria::NOT_LIKE);
$c2 = $c->getNewCriterion(CommentsPeer::COMMENT,'%likes
%',Criteria::NOTLIKE);
$c1->addAnd($c2);

$c->add($c1);

   gabriel

On Oct 26, 3:16 am, Parijat Kalia  wrote:
> Hey guys, trying to implement a criteria for my sql query which has a not
> like clause in it.
> this is how I proceed:
>
> $c->add(CommentsPeer::COMMENT,'likes',Criteria::NOTLIKE);
>
> I have also carried out trial and error with the following:
>
> $c->add(CommentsPeer::COMMENT,'likes',Criteria::NOT_LIKE);
> $c->add(CommentsPeer::COMMENT,'%likes%',Criteria::NOTLIKE);
> $c->add(CommentsPeer::COMMENT,'%likes%',Criteria::NOT_LIKE);
>
> also made use of not_equal
>
> $$c->add(CommentsPeer::COMMENT,'likes',Criteria::NOTEQUAL);
> $c->add(CommentsPeer::COMMENT,'likes',Criteria::NOT_EQUAL);
>
> None of these work, neither are they causing any background errors in the
> action within which they are called. Yet they always yield the 'likes' query
> in the results.
>
> Not sure what I am doing wrong here, would anybody like to point out any
> errors?
>
> Regards,
>
> Parijat Kalia

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: regarding symfony 1.4

2010-10-24 Thread pghoratiu
You can migrate only till Symfony 1.3, Symfony 1.4 has a lot of
backwards compatibility code removed
so your application probably will not work.
The procedure is to migrate step by step to 1.1, 1.2, 1.3 and check
what the migration script tells you on each stage.
If you want to go directly to 1.4 you will probably have to do a
complete rewrite of the code.
Regarding PHP version, I think you mean 5.2.6  which is fine, i
recommend latest 5.3.x if you can have it.
Symfony 1.4 has a lot of cleanups and improvements all over the
codebase.

If you are satisfied with how your application works under Symfony
1.0.x you should stick with it cause the upgrade/rewrite may
be a lot of effort.

gabriel


On Oct 23, 2:22 pm, madhur garg  wrote:
> hi,
>
> We are using symfony 1.0 in my website. Now we are planning to move to
> 1.4.
> we are using php 2.6
>
> Can you please suggest me the procedure to move to 1.4 and what are
> the benefits of moving to 1.4
> Also please tell me the prons and cons of using doctrine and how to
> use doctrine
>
> Thanks,
> Madhur

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Factories : storage taking a really long time to load

2010-10-22 Thread pghoratiu
What operating system do you use?
It looks like a file I/O timeout to me.

Try out the following, create a php batch script that loads the
symfony instance/context and just prints out a message.
If you still have this timeout it should be much easier to debug this
way than with Apache.

gabriel

On Oct 21, 2:08 am, stephenrs  wrote:
> I'm preparing a site for launch - moving it out of my local dev
> environment to a remote VPS host, and I've discovered that sometimes
> pages take up to 60+ seconds to load on the VPS. Using the symfony
> debug toolbar, I've further discovered that the delay is happening
> during the loading of my factories. Going even further, I patched some
> symfony files (temporarily) according to a tip 
> here:http://groups.google.com/group/symfony-users/browse_thread/thread/99e...
> to get a better idea about what is going on.
>
> Apparently the delay is happening during the loading of Factories :
> storage (which comprises 99% of the total request time), but that's
> about all I can tell at the moment. The delay doesn't happen on every
> request, and during these requests my server is essentially idle, with
> httpd threads occupying most memory (according to top).
>
> Since I've never seen this problem happen on my local box, I'm
> guessing it's somehow related to the config of my remote server, but
> at this point I'm at a bit of a loss. Also, my session storage is the
> default PHP file-based storage. I've been considering upping the
> memory on my VPS plan (for several reasons), but I'm wondering if this
> would have any impact on factories loading, as I would guess that this
> is an I/O issue.
>
> Has anyone seen anything like this? Any suggestions as to what might
> be causing it? Workarounds?
>
> Any help would be appreciated.
>
> SF 1.4.6, PHP 5.3.3, MySQL 5.1.5
>
> Note: I've cross posted this to the main sf forums because it's not
> clear to me where folks are hanging out these days...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Zend Lucene Search - Parser problem

2010-10-20 Thread pghoratiu
By default Lucene search does not look for substrings, I think there
are several reasons why they are doing this mostly related to
performance.
There are some tokenizer engines which put in the index the
combination of all substrings and they solve this way the problem of
substring search, example:
"White fox"
is sent to indexing (with 3 character as minim length) as:
'Whi hit ite fox'
For the Zend PHP version you will have to build this yourself I think,
there is one in Solr:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.EdgeNGramFilterFactory
This can turn into a performance nightmare quickly and I'm not sure
that it will improve your search experience, Google search does not
look for substrings.
I would rather focus on increasing relevancy (synonims, stemming,
stopwords, ...) than solving the problem of substring search.

Regarding the performance I do not recommend the Zend implementation,
only for the really small projects. For larger projects my suggestion
for you is to go with
Solr:
http://lucene.apache.org/solr/

gabriel

On Oct 19, 12:59 pm, Adam  wrote:
> Hi
>
> I integrated Zend Lucene Search to my project ( following the Jobeet
> tutorial ), index: one field (manufacturer name).
> The problem is that it only finds exact words, in the jobeet demo it
> finds it even if the input is a part of a word or just a letter.
> It look like the input isnt formatted but it's not formatted in the
> jobeet demo either( i downloaded the source ) - if i write stan* it
> finds stanley, but for stan nothing.
> I dont know what could be the problem, i did the same as they did in
> the tutorial, do i have to configure the search engine which is
> missing from the tutorial?
>
> Btw it is a webshop and there will be 60 000 products (5-10 index
> fileds), is this engine fast enough for me?
>
> (Sorry for my english)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Having a "web" layer for the "model"

2010-10-06 Thread pghoratiu
You can have another layer of business logic classes that you store in
lib/ which interact with your
models directly.

gabriel

On Oct 6, 7:24 am, "Sebastien Armand [Pink]"  wrote:
> Most of the times in symfony applications, we'll have a model let's say it's
> 'Product' and then many interactions that I don't think belong to the model
> part of the application still would be really convenient if you could write
> them as $myModel->doThis()
>
> The kind of interaction I'm thinking about are more 'application' level.
> For example I'll usually have a link to a page where this product is
> displayed, and instead of having to write the url_for ('product_route',
> $myProduct), it seems to me much more natural if I could write something
> like $myProduct->getUrl().
> Same thing for removing bits of cache related to this product, it seems
> correct in a way to write $myProduct->removeCachedElements(); or something
> like this.
>
> However those interactions as I see them don't belong to the model, they are
> much more linked with a higher presentational or web level of interaction.
>
> Just wondering how other people do things this way or not?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Problem with Lucent output data search in Doctrine

2010-10-06 Thread pghoratiu
If you have those index files it is likely that the indexing part
works ok, you just need to work on the query part of it.
These are the files created on my environment (Solr 1.4):
./spellchecker2
./spellchecker2/segments.gen
./spellchecker2/segments_1
./spellchecker1
./spellchecker1/segments.gen
./spellchecker1/segments_1
./index
./index/_4q.tis
./index/_4q.frq
./index/_4q.fdt
./index/_4q.fnm
./index/_4q.fdx
./index/_4q.nrm
./index/segments_4u
./index/_4q.tii
./index/segments.gen
./index/_4q.prx
./spellcheckerFile
./spellcheckerFile/segments.gen
./spellcheckerFile/segments_1

For production purposes I do not recomend using PHP/Lucene but Java/
Lucene/Solr accesible via XML services.
The PHP version has big scalability issues once you have more than a
couple of thousand of documents you will hit them.

   gabriel

On Oct 5, 10:39 pm, daniel cardona 
wrote:
> Hello again ;-)
>
> As I see that most people recommend Lucent Search, I have decided
> keep trying to include it in my project, using the manual as jobeet
> reference.
>
> At the most I've come to is that some files called "Segments" under
> data / index / are updated, but only shows me a few strange characters
> like: " ˇL´Ki", but it dont returns any data to /search, and the array
> jobs is empty.
>
> I think my problem is that It dosent save the Lucent Index correctly,
> what I should have in this file?
>
> Someone can give me a clue where I am wrong?
>
> Many, many thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] media server support for static content

2010-09-14 Thread pghoratiu
Hi,

The following is not strictly symfony related but I'm hoping someone
on the list can give me a hint for a solution.

I have several websites:
 * fish.com
 * eagle.com
 * bear.com
and I want all the static resources (css, js, images, uploads) to be
served by a common domain, let's say media.fish.com.

I solved the Symfony part of this (the inclusion of static content
css, js) to have that domain included in the path and this is
configurable via a configuration file (one can choose between serving
the content from media.fish.com or via their own domain as relative
path) and I have different configurations for each environment live,
stagging, dev.
The major problem I'm facing is that static content, images linked in
the resources files such as css, js use a relative path.
I could replace this with an absolute path that has the media.fish.com
domain included in the URL but this would force me to use that domain
even for stagging/development environments which I don't want.

I'm curious how people solve this problem, if you faced such issues
your feedback is welcome.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony and mod_remoteip

2010-09-10 Thread pghoratiu
Understand, you can have that also without the extra apache module, I
use this to log both proxy and client IP:

# If you are behind a reverse proxy, you might want to change %h into %
{X-Forwarded-For}i
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b %T \"%
{Referer}i\" \"%{User-Agent}i\" %D %X" combined

gabriel

On Sep 10, 3:00 pm, Laurent Vaills  wrote:
> Yes, my load-balancer is responsible for caching as well and correctly
> set the header X-Forwarded-For.
>
> Actually, I really need the mod_remoteip because I want the real IP in
> the access_log .
>
> Laurent
>
> On Sep 10, 1:10 pm, pghoratiu  wrote:
>
>
>
>
>
>
>
> > Is the load balancer responsible for caching as well?
> > Checkhttp://en.wikipedia.org/wiki/X-Forwarded-Forandretrieve the
> > client IP address from that HTTP header.
> > You don't need anything extra on the Apache side.
>
> >    gabriel
>
> > On Sep 10, 12:52 pm, Laurent Vaills  wrote:
>
> > > Hi,
>
> > > I am developping a website using symfony 1.4 on CentOS 5 (httpd 2.2.3,
> > > php 5.2.10).
> > > I have compiled the mod_remoteip on the httpd 2.2 (because this module
> > > is only available for httpd 2.3).
> > > But the IP that is reported by Apache is the one of our load-balancer.
>
> > > After some tests, I've found that the problem comes from the
> > > RewriteRule. Is it possible to moMy problem is that the mod_remoteip
> > > does not work with rewrite rule defined by symfony.
>
> > > Does anyone succeeded to have symfony and mod_remoteip working
> > > together ?
>
> > > Regards,
> > > Laurent

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony and mod_remoteip

2010-09-10 Thread pghoratiu
Is the load balancer responsible for caching as well?
Check http://en.wikipedia.org/wiki/X-Forwarded-For and retrieve the
client IP address from that HTTP header.
You don't need anything extra on the Apache side.

   gabriel


On Sep 10, 12:52 pm, Laurent Vaills  wrote:
> Hi,
>
> I am developping a website using symfony 1.4 on CentOS 5 (httpd 2.2.3,
> php 5.2.10).
> I have compiled the mod_remoteip on the httpd 2.2 (because this module
> is only available for httpd 2.3).
> But the IP that is reported by Apache is the one of our load-balancer.
>
> After some tests, I've found that the problem comes from the
> RewriteRule. Is it possible to moMy problem is that the mod_remoteip
> does not work with rewrite rule defined by symfony.
>
> Does anyone succeeded to have symfony and mod_remoteip working
> together ?
>
> Regards,
> Laurent

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Race condition with session data

2010-09-07 Thread pghoratiu
The session is closed after all content is sent from A1.
You should find a way to delay the load of the iframe (via Javascript
maybe) to make sure that A1 has completed and that A2 can load the new
content.

gabriel

On Sep 7, 6:04 pm, Phil Moorhouse  wrote:
> Hi, I currently have an action (A1) that performs some manipulation of
> objects saved in the session, and then loads a view containing an
> iframe.
>
> The iframe loads another action (A2) from the same application which
> relies on objects saved to the session in A1. Sometimes, particularly
> when accessing remotely, the objects do not seem to be present in the
> session and A2 throws a fatal error.
>
> After some discussion in IRC, it seems like A2 is probably loading the
> session before A1 has finished writing to it. This seems counter-
> intuitive, but I can't think of any other explanation.
>
> Is it possible to flush writes to the session from an action (A1) so
> that I can be sure the data has been saved?
>
> This is on a symfony 1.0 site and using sfMemcacheSessionStorage 
> fromhttp://www.symfony-project.org/plugins/sfMemcachePlugin.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Session won't last

2010-09-03 Thread pghoratiu
Check the sessions settings in php.ini as well.

What operating system do you use? For instance on Ubuntu there is a
cron job that deletes the session files and this
is controlled by php.ini configuration:

# /etc/cron.d/php5: crontab fragment for php5
#  This purges session files older than X, where X is defined in
seconds
#  as the largest value of session.gc_maxlifetime from all your
php.ini
#  files, or 24 minutes if not defined.  See /usr/lib/php5/maxlifetime

# Look for and purge old sessions every 30 minutes
09,39 * * * * root   [ -x /usr/lib/php5/maxlifetime ] && [ -d /
var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/
maxlifetime)
-print0 | xargs -n 200 -r -0 rm

gabriel


On Sep 3, 4:27 pm, HAUSa 
wrote:
> My session won't hold! After 30 minutes, I'm logged out again!
> I obvious must have gotten something wrong, but I cannot figure it
> out...
>
> This is my factories.yml:
>
> test:
>   storage:
>     class: sfSessionTestStorage
>     param:
>       session_path: %SF_TEST_CACHE_DIR%/sessions
>
>   response:
>     class: sfWebResponse
>     param:
>       send_http_headers: false
>
>   mailer:
>     param:
>       delivery_strategy: none
>
> dev:
>   mailer:
>     param:
>       delivery_strategy: none
>
> all:
>   routing:
>     class: sfPatternRouting
>     param:
>       generate_shortest_url:            true
>       extra_parameters_as_query_string: true
>
>   storage:
>     class: sfSessionStorage
>     param:
>       session_name: f9bc38a4
>
>   user:
>     class: myUser
>     param:
>       timeout: 2592000
>
>   view_cache_manager:
>     class: sfViewCacheManager
>     param:
>       cache_key_use_vary_headers: true
>       cache_key_use_host_name:    true

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Http load problem with concurrent users.

2010-09-02 Thread pghoratiu
Regarding cache one thing that you have to worry about is cache
invalidation (which can grow into a really complex and ugly issue).
Even if you don't use caching there are many strategies available, one
that I recommend warmly is to avoid the ORM layer entirely by using
memcache as intermediary storage for your data.

In any case the best course of action is to profile your web app to
exactly find out where the performance bottleneck is and decide which
part of the code requires optimization.

Interesting presentation from Fabien regarding cache in Symfony2 that
may be of interest to you:
http://www.slideshare.net/fabpot/caching-on-the-edge-with-symfony2

gabriel

On Sep 2, 11:25 pm, "Ivo Az."  wrote:
> My local machine CPU usage goes up to max, don't know about hosting's
> CPU usage, but the response times on there are the same.
>
> Luckily for this project the frontend changes only when something is
> changed from the backend, so I will work on the caching now.
>
> However, my next project will be a social network, planning on
> thousands of users being online. So I still need help with this,
> because the cache will not be the option there.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Http load problem with concurrent users.

2010-09-02 Thread pghoratiu
What's the CPU usage on that machine?
In my experience 50-100 concurrent requests is quite large for dynamic
pages and you need good hardware to handle that.
Or you should look into using cache heavily, reverse proxy caching,
avoiding the ORM layer entirely (by using memcache) ...

I think that the response on the symfony homepage is so good because
the entire page is cached.

   gabriel

On Sep 2, 9:57 pm, "Ivo Az."  wrote:
> Hi.
>
> I am using a tool called "Siege" (http://www.joedog.org/index/siege-
> home) to test the http load with 50 concurrent users, and the results
> are bad:
>
> HTTP/1.1 200   0.64 secs:    4923 bytes ==> /en
> HTTP/1.1 200   1.33 secs:    4925 bytes ==> /en
> HTTP/1.1 200   1.38 secs:    4922 bytes ==> /en
> HTTP/1.1 200   1.44 secs:    4924 bytes ==> /en
> HTTP/1.1 200   1.47 secs:    4924 bytes ==> /en
> HTTP/1.1 200   1.48 secs:    4924 bytes ==> /en
> ...
> ...
> HTTP/1.1 200   7.00 secs:    4924 bytes ==> /en
> HTTP/1.1 200   7.04 secs:    4923 bytes ==> /en
> HTTP/1.1 200   7.05 secs:    4923 bytes ==> /en
> HTTP/1.1 200   7.07 secs:    4924 bytes ==> /en
> HTTP/1.1 200   7.08 secs:    4924 bytes ==> /en
> HTTP/1.1 200   7.10 secs:    4924 bytes ==> /en
>
> What can possibly cause this? What things should I optimize?
>
> I tried the same test with 100 concurrent users onwww.symfony-project.org,
> and the average response time was 0.52secs.
>
> I am using symfony 1.4 with sfPropel15Plugin, SQL queries are
> minimized down to 6 queries, links are generated using named routes.
>
> Please help.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: CLI sf Task, allowed memory issue

2010-09-01 Thread pghoratiu
Hi!

My suggestion is to use PHP 5.3.X, it has improved garbage collection
and it should help with reclaiming unused memory. Also you should
group the code that is leaking inside a separate function(s), this way
the PHP runtime knows that it can release the memory for variables
within the scope.

gabriel

On Sep 1, 12:11 pm, "PieR."  wrote:
> Hi,
>
> I have a sfTask in CLI wich use lot of foreach and preg_matches, and
> unfortunatly PHP return an error "Allowed memory size" in few
> minutes.
>
> I read that PHP clear the memory when a script ends, so I tried to run
> tasks inside the main task, but the problem still remains.
>
> How to manage this memory issue ? clear memory or launch tasks in
> separate processes ?
>
> The final aim is to build a web crawler, wich runs many hours per
> days.
>
> Thanks in advance for help,
>
> Regards,
>
> Pierre

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to translate a text that contains ?

2010-08-27 Thread pghoratiu
The <> chracters are not allowed in the XML element node and you have
to either
1. quote them as > or <
2. Include them in CDATA sections:

 ![CDATA[For security reasons...]]
 ![CDATA[Por razones de seguridad...]]
 
If you do not quote them translations breaks altogether (no
translation works).

It's not a good practice to include formating code in the translation
text, avoid it if possible.

   gabriel

On Aug 27, 1:42 pm, Javier Garcia  wrote:
>   Hi,
>
> i want to translate this below:
>
>  
> For security reasons...
> 
> EOM
> ) ?>
>
> So i create this translation unit:
>
> 
> For security reasons...
> Por razones de seguridad...
> 
>
> The problem: it is not translated less than i remove the  tags.
>
> Any way to translate it keeping those tags?
>
> --
> Javi
>
> Ubuntu 8.04

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Url genartion bug for '/' ?

2010-08-26 Thread pghoratiu
Do you have a route set up for your homepage, something like:
homepage:
  url:   /
  param: { module: homepage, action: index }

Try also redirecting to $this->redirect('@homepage') it's much more
efficient.

gabriel

On Aug 26, 5:48 pm, torok84  wrote:
> Hi,
>
> I noticed that
> $this->redirect("/") in actions or url_for("/") in views when called
> from an url likehttp://host/frontend_dev.php/somethingthrow away the
> frontend_dev.php and generate url likehttp://host/. While
> url_for("module/action") will generate an url containing
> frontend_dev.php.  url_for("") will generatehttp://host/frontend_dev.php
> and this is nice, because when I am testing I want to keep the
> frotnend_dev.php in my URL. With $this->redirect seems impossible to
> get the same result, since $this->redirect("") throws an exception. I
> am quite new to symfony so maybe I am wrong. Would'n be better to make
> redirect and url_for always include frontend_dev.php if it is prenset
> in the URL of the current page? Or am I missing something?
>
> Thanks
> Paolo

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: set_flash and browser's cache

2010-08-26 Thread pghoratiu
Is there a proxy between the browser and the webserver (for caching
purposes or some other reason)? Have you tested with different
browsers (Firefox, IE, Opera, Chrome)?

AFAIK symfony sets up the HTTP headers correctly to disable caching by
adding the following two lines in the HTTP response header:
Cache-Control   no-store, no-cache, must-revalidate, post-check=0, pre-
check=0
Pragma  no-cache

Check if these are set up for you.

   gabriel

On Aug 25, 5:05 am, Joe666  wrote:
> Hi Guys,
>
> I have the following in a module actions.class.php:
>
> class myPageActions extends sfActions
> {
>   public function executeIndex(sfWebRequest $request)
>   {
>       $q = Doctrine_Query::create()->from('table t');
>       $this->items = $q->execute();
>   }
>
>   public function executeNew(sfWebRequest $request)
>   {
>       $this->getUser()->setFlash('notice','This is just a message.');
>       $this->redirect('myPage/index');
>   }
>
> }
>
> And in the layout.php for my application I have:
>
> hasFlash('notice')): ?>
>   
>     getFlash('notice') ?>
>   
> 
>
> If I load myPage/new  I do get redirected to myPage/index but the Flash
> message is not there, however once redirected if I reload the browser
> page (hit reload button) the flash message shows up just fine.
>
> The http header I get when redirected from new to index shows that the
> browser loads the index page from the browser's cache and thus it
> prevents the flash message from being shown unless I reload the page,
> how can I stop this from happening ? is there a setting I may be missing
> here ?
>
> I hope my explanation of the issue is clear enough, thank you very much
> for your help.
>
> Regards.
>
> --
> Luis Maga a

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: htaccess & 2 applications in /web: strange problem

2010-08-26 Thread pghoratiu
Try uncomenting this lines:

# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]

These rules are used to process .css, .js and other static files.

gabriel

On Aug 26, 1:55 am, Benoit Pr  wrote:
> Hi,
>
> I have 2 applications: app1 & app2, which directory web files are both
> in /web.
>
> Here's my problem:while rewrite works perfectly for app1, rewrite
> works partially for app2: css, img & js are not loaded.
>
> When we both exchange app* places in .htaccess, app2 works perfectly,
> then app1 works partially: no load of css img & js.
>
> Here's my .htaccess, did I forgot something? I am on this since 2
> days... :(
>
> Cheers
>
> Options +FollowSymLinks +ExecCGI
> ExpiresActive On
>
> # 1 month
> 
> #  Header set Cache-Control "max-age=2592000, public"
>   ExpiresDefault "access plus 1 month"
> 
>
> # 1 month
> 
>   Header set Cache-Control "max-age=2592000, proxy-revalidate"
> 
>
> # 2 month favicon
> 
>   Header set Cache-Control "max-age=2592000, proxy-revalidate"
> 
>
> # 1 MIN
> 
>  Header set Cache-Control "max-age=60, private, proxy-revalidate"
> 
>
> 
>   RewriteEngine On
>
>   # uncomment the following line, if you are having trouble
>   # getting no_script_name to work
>   RewriteBase /
>
>   # we skip all files with .something
>   #RewriteCond %{REQUEST_URI} \..+$
>   #RewriteCond %{REQUEST_URI} !\.html$
>   #RewriteRule .* - [L]
>
>   # we check if the .html version is here (caching)
>   RewriteRule ^$ index.html [QSA]
>   RewriteRule ^([^.]+)$ $1.html [QSA]
>   RewriteCond %{REQUEST_FILENAME} !-f
>
>   # no, so we redirect to our front web controller
>   RewriteCond %{HTTP_HOST} ^hostapp1 [NC]
>   RewriteRule ^(.*)$ index.php [QSA,L]
>
>   RewriteCond %{HTTP_HOST} ^hostapp2 [NC]
>   RewriteRule ^(.*)$ frontend.php [QSA,L]
>
> 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Catch and handle Doctrine's exceptions (Doctrine_Connection_Exception)

2010-08-26 Thread pghoratiu
Unless it's a problem with the network connection it's probably a
problem with the number of connections allowed by the MySQL server.
This is usually set up to 100 by default, it should be increased to
something like 500.

MySQL has admin tools to monitor the connections to the server, use it
to monitor the number of connections and what's causing it.

gabriel

On Aug 25, 4:46 am, J K  wrote:
> Hey everyone,
>
> I have one mysql db server, and one apache symfony server. It happens
> (very rarely) that the web server can't temporarily reach the db
> server, and I get those a couple times per day:
>
> Aug 23 16:00:52 symfony [err] {Doctrine_Connection_Exception} PDO
> Connection Error: SQLSTATE[HY000] [2003] Can't connect to MySQL server
> on '' (4)
>
> Is there a way to log a bit more than that? Tweak the error message to
> include the SQL query that did not get sent? How would one go about
> auto-retrying those queries?
>
> Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: symfony Day Cologne 2010

2010-08-26 Thread pghoratiu
Hi!

What's the latest date one can get a ticket for Symfony Day
(subscription deadline)?

   gabriel

On Aug 25, 11:20 am, Dennis Benkert 
wrote:
> Hi,
>
> this year we are organizing a symfony Day again here in Cologne,
> Germany on 8th October. As last year the conference will be one day
> long with a sessions and a workshop track. Speakers for this year will
> be Fabien Potencier, Jonathan Wage, Kris Wallsmith, Pierre Joye,
> Christian Schaefer and Gaylord Aulke. As last year Stefan Koopmanschap
> will lead the workshop track.
>
> The early bird period ends next Tuesday (31. August). So if you want
> to get your ticket for lower price be sure to get them as soon as
> possible!
>
> If you want to get a ticket or need more information check out our
> websitewww.symfonyday.com.
>
> Hope to see you there,
> Dennis

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doctrine/MySQL: double up of id index

2010-08-23 Thread pghoratiu
Post the schema you use.
Usually a PK ID is autogenerated for a given table if none was
specified.

gabriel

On Aug 24, 1:52 am, Jochen Daum  wrote:
> Hi,
>
> this may sound quite minor, but I'm just getting into Symfony and am
> interested in some of the details.
>
> When I run symfony doctrine:insert-sql, the tables created always have
> a duplicate index, one called PRIMARY and one called id. Normally this
> wouldn't matter much, I'm just wondering for big tables, if the index
> wouldn't eat up unnecessary buffer space. Can this be configured to
> create only the PRIMARY index?
>
> Kind Regards,
>
> Jochen Daum
>
> Chief Automation Officer
> Automatem Ltd
>
> Phone: 09 630 3425
> Mobile: 021 567 853
> Email: j...@automatem.co.nz
> Skype: jochendaum
> Website:www.automatem.co.nzhttp://twitter.com/automatemhttp://nz.linkedin.com/in/automatemhttp://www.xing.com/go/invite/3425509.181107http://www.aucklandbusinessnetworking.co.nz

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How do I execute code on session expire with sfUser?

2010-08-22 Thread pghoratiu
There is no such thing, a session may expire also because of user
inactivity thus there is no way to catch this on the server side. Even
in case the browser is closed nothing is sent to the server to signal
the session end (like a logout).

In case you store the user sessions in the database you could develop
a cron job that would scan the session table for recently expired
sessions (running that task every minute) and make it part of the
session cleanup process.
In case the default PHP session storage is used (files on the disk)
the sessions get GC-ed by the PHP engine and you will not be able to
get expired sessions unless you disable this in php.ini.

gabriel


On Aug 22, 6:17 am, Gabriel Comeau  wrote:
> Hello,
>
> I am storing an array of object IDs in the session, and storing the objects
> themselves in the database.  When the user's session expires (ie - they
> close their browser) I want to test the saved objects for certain
> conditions, and delete the ones that don't meet these conditions.  What I'm
> looking for is the place to make this call.
>
> Browsing the API docs, I've found that there is a shutdown() method of the
> sfUser class, but it seems to be run at the end of every request, so that
> won't work.
>
> Can anyone point me in the right direction?
>
> Thanks very much,
>
> Gabriel Comeau

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Different result on two servers when submitting a form that sends email automatically

2010-08-17 Thread pghoratiu
We encountered something similar with OS version 32 bit vs. 64 bit,
having the same PHP version 5.2.4.
The dev machines use 32 bit OS but staging/prod run on 64 bit and the
problem happened only on the 64 bit machines.

   gabriel

On Aug 17, 10:18 am, El Duderino  wrote:
> The problem was eventually identified to where a type cast was being
> made. The PreProduction server did not have an issue with this but the
> Live server failed when converting the object to a string with
> (string). Solved when __toString() was used instead.
>
> Before:
> $replaceVariables = array('var1' => $Practice->getDateStart(), 'var2'
> => (string)$Practice->getCompleteName());
>
> After:
> $replaceVariables = array('var1' => $Practice->getDateStart(), 'var2'
> => $Practice->getCompleteName()->__toString());
>
> Production runs PHP 5.2.4, PreProduction 5.2.6 and both worked
> correctly with (string) in test cases:
>
>  class Foo {
>     public $name;
>
>     public function __construct($name) {
>         $this->name = $name;
>     }
>
>     public function __toString() {
>         return $this->name;
>     }
>
> }
>
> $foo = new Foo('foobar');
> echo (string)$foo;
> ?>
>
> This isn't something you would expect but there was a solution
> available to deal with it. I'd be very interested to know why the
> Production server behaves in this case.
>
> Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-15 Thread pghoratiu
> It might be worthwhile to take things a step further by versioning
> them in the URL so that they can be given an infinite cache expiration
> date, although this requires a database hit or perhaps a glob call
> when outputting the pages that contain them. The code is a big step
> forward as-is if you are using unminimized, uncombined CSS and JS and
> has no negative impact on your existing caching issues, but we'll
> think about next steps.

I think think it's important to add cache invalidation as well. My
suggestion is to append another key
to app.yml to have a cache key that can be updated manually and append
that key too the minified resource
file:
all:
  a:
ver:1
css/main.css?ver=1
This way css and js pages can be cached indefinitely on the client
side without having problems when manually
updating the css or js files.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-14 Thread pghoratiu
Hi!

How do you solve the cache invalidation for these resources (in case
they are cached on the client side)?
Please post also a link to the sources.

Thanks,

gabriel

On Aug 14, 5:08 pm, Tom Boutell  wrote:
> We've committed a new CSS and JS minifier to the trunk of
> apostrophePlugin. It's possible to take advantage of this even if you
> don't need the rest of Apostrophe for your project.
>
> Apostrophe now has a built-in CSS and JS minifier, similar to
> sfCombinePlugin but up to date and easier to work with. All you have
> to do is call a_include_javascripts and a_include_stylesheets in your
> layout.php rather than the usual include_javascripts and
> include_stylesheets.
>
> Although we didn't start from sfCombinePlugin, which has not been
> updated for about a year, we are not reinventing the wheel here.
> Apostrophe now bundles the latest stable release of the excellent
> Minify package by Ryan Grove and Steve Clay.
>
> We're not using Minify's built-in server. Instead we are using the
> Minify library classes to do the actual minification and integrating
> these into our helpers for a native Symfony feel. That means that:
>
> * When minification is turned on with app_a_minify, all CSS files
> needed on a page are rolled into a single file
> * Ditto for JavaScript
> * The cache files are automatically reused if they already exist
> * The cache files are automatically erased when you 'symfony cc' on a
> particular server, as you ought to do when you deploy anyway
> * Files that need to be loaded separately (for instance, they have IE
> conditional comments) are still loaded the traditional way
> * Files that need to load together as a group because they have the
> same script tag options (for instance, print stylesheets) are merged
> to a separate cache file from the rest
> * When app_a_minify_gzip is turned on, minimized CSS and JS files are
> automatically gzip-compressed in advance when they are generated (the
> necessary .htaccess directives to allow your server to support this
> are in the trunk sandbox .htaccess file, take a look - all web
> browsers support this so it's a big win)
>
> Dead simple and very effective.
>
> With app_a_minify and app_a_minify_gzip both turned on, the logged-out
> view of the Apostrophe sandbox now receives a "B" grade from the YSlow
> plugin. Those who are familiar with YSlow know that a "B" is extremely
> hard to get. YSlow dings you for every little infraction, including
> the use of images that are not CSS sprites and so on. Our former score
> was an "D"
> on an "A" to "F" scale (a "C" if the server is configured to gzip
> everything on the fly, but that takes more CPU than app_a_minify_gzip,
> which runs only at caching time).
>
> To use this in a project in which you don't otherwise want Apostrophe
> (although I obviously think you should consider using it!), you'll
> want to tell Apostrophe to disable its built in routes:
>
> app_aMedia_routes_register: false
> app_a_routes_register: false
>
> Turn it on in app.yml (for testing, do it under 'all', but later
> probably just 'prod' so you can still easily debug JS and CSS):
>
> all:
>   a:
>     minify: true
>     #Optional but a huge win, requires appropriate Apache
> configuration and zip support in PHP
>     minify_gzip: true
>
> And just start calling a_include_javascripts and a_include_stylesheets
> instead of include_javascripts and include_stylesheets in your
> layout.php.
>
> To make the gzipped CSS and JS files work, your PHP must have zlib
> support (check your phpinfo), and Apache must be configured to serve
> .cssgz and .jsgz files correctly (you can do this in your .htaccess
> file):
>
> AddType text/javascript .jsgz
> AddType text/css .cssgz
> AddEncoding x-gzip .jsgz .cssgz
>
> If you don't want to do that, you can leave app_a_minify_gzip turned
> off, but it won't be as awesome.
>
> symfony cc and go to town.
>
> That's it - no database tables needed, no schema changes.
> Note that web/uploads/asset-cache needs to be writable by Apache
> (project:permissions should take care of this).
>
> Enjoy!
>
> --
> Tom Boutell
> P'unk Avenue
> 215 755 1330
> punkave.com
> window.punkave.com

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Weird cache issues under load, sf 1.4 as svn:external on Windows Server 2008 Standard

2010-08-10 Thread pghoratiu
Hi!

Have no idea what could this be, in my opinion it is something related
to locking at the FS level.

My suggestion is to try one of the following:
1. Use a different cache storage class - sfSQLiteCache,
sfMemcacheCache or sfAPCCache.
2. Run code on a different machine or on a Linux/Unix system

gabriel

On Aug 10, 3:18 pm, Alexander Deruwe 
wrote:
> Hey all,
>
> My current symfony project has recently become quite popular.  While this is 
> obviously good, load on the server has increased in tandem.
> Since about 2-3 weeks, we are experiencing very strange sf config cache 
> issues.  They seem most likely to happen under heavy load.
> The first few times the cache got corrupted, I was able to trace the cause 
> back to project_autoload.cache - classes were not being found.
> Deleting this file every 5 minutes solved our problem for a whole week.
> Without warning, last Sunday the site went down again, again due to cache 
> corruption - this time I traced it back to a permission denied error 
> somewhere in the config cache.
> As we are running on Windows Server 2008 Standard and IIS7, I made sure IUSR 
> had proper rights to the cache dir, which again seemed to solve the problem.
> (I don't really know how the cache could work without that user having rights 
> in the first place... Probably IUSR is a member of Users or Authenticated 
> Users or whatever, I am no Windows expert...)
>
> Yesterday evening, and this morning, again we were affected by a corrupted 
> config cache:
>
> Yesterday:
> [09-Aug-2010 17:31:39] PHP Fatal error:  Class 'ExceptionReportFilter' not 
> found in 
> D:\site\cache\frontend\prod\config\modules_inbox_config_filters.yml.php on 
> line 30
> [09-Aug-2010 17:31:39] PHP Fatal error:  Class 'ExceptionReportFilter' not 
> found in 
> D:\site\cache\frontend\prod\config\modules_chat_config_filters.yml.php on 
> line 30
> [09-Aug-2010 17:31:39] PHP Fatal error:  Class 'ExceptionReportFilter' not 
> found in 
> D:\site\cache\frontend\prod\config\modules_chat_config_filters.yml.php on 
> line 30
> ... etc ...
>
> This morning:
> [10-Aug-2010 05:12:09] PHP Fatal error:  Call to undefined function 
> image_tag() in D:\site\apps\frontend\modules\profile\templates\_details.php 
> on line 20
> [10-Aug-2010 05:12:12] PHP Fatal error:  Call to undefined function 
> include_http_metas() in D:\site\apps\frontend\templates\member-layout.php on 
> line 4
> [10-Aug-2010 05:12:16] PHP Fatal error:  Call to undefined function 
> image_tag() in D:\site\apps\frontend\modules\profile\templates\_details.php 
> on line 20
> ... etc ...
>
> At this point I am no longer sure what is going on - yesterday's problem 
> seems to indicate autoload problems again, maybe this morning's too - 
> possibly deleting the project_autoload.cache file periodically has not solved 
> the original problem at all.
>
> We don't do any sort of heavy caching - the config cache and a couple of 
> templates, and that is basically it - I used to cache files from the db using 
> sfFileCache but it's disabled now to reduce external factors influencing the 
> cache.
>
> I am wondering if anyone else ever experienced anything like this?  I talked 
> to Stefan (Koopmanschap), and he has seen similar problems on a client's 
> site, but we were unable to narrow things down enough to be sure where the 
> problem is.
> It doesn't help his client's site is *nix and sf 1.2 while I run on Windows 
> and sf 1.4.
> Stefan did check with Fabien, who confirmed that no recent commit present in 
> both 1.2 _and_ 1.4 could be the cause.
>
> This morning, I made a backup copy of the corrupted cache dir on the server 
> (including project_autoload.cache).  I created a virtual disk on my 
> workstation to replicate the prod environment with exact same paths etc to 
> try and reproduce the problem locally.
> I had to modify cache/frontend/prod/config/config_databases.yml.php to 
> connect to my dev database, but other than that the cache dir was exactly as 
> it was on the server.
> I could not reproduce the problem - everything worked just fine with that 
> cache dir.
>
> Any input is at this point much appreciated.
>
> Thanks,
>
> Alexander

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Session timeout problem

2010-08-04 Thread pghoratiu
Check out also the session variables that can be set up in
session.ini:
session.gc_maxlifetime
Depending on the OS you use there may be other things to consider as
well.

gabriel


On Aug 5, 4:31 am, Gustavo Adrian  wrote:
> Hi,
>
> I'm using sfDoctrineGuardPlugin. My backend session always ends after 5 or
> 10 minutes if its idle. I've tried to change on factories.yml:
>
>   *user:*
> *    class: myUser*
> *    param:*
> *      timeout: 86400*
>
> And..
>
>  * storage:*
> *    param:*
> *      session_cookie_lifetime:          86400*
>
> But nothing happens. My session always ends after 5 or 10 minutes. Is
> anything I'm forgetting about session stuff?
>
> Thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: a good IDE for Symfony

2010-08-03 Thread pghoratiu
Check out Komodo edit
http://www.activestate.com/komodo-edit
some of my colleagues use it.

I think that with your configuration any java based editor should work
fine, make sure you configure properly
the java runtime settings (-mx, -mss) and allow more memory than the
default.

gabriel


On Aug 4, 2:22 am, "Julian Reyes Escrigas"
 wrote:
> Hi
>
> I need help for find a new editor for PHP, I'm using Netbeans 6.9 but I
> don't know for what is slow, always start very well but when the project
> grows it's turns unstable
>
> I need only 3 characteristics
>
> 1.       Faster and lightweight
>
> 2.       With autocomplete for all classes in a folder and include folders
>
> 3.       Support for PHP, html, CSS, JavaScript and YAML (auto colored,
> syntaxes and turn tabs into spaces )
>
> Some one knows any similar NO JAVA editor.
>
> I use Windows 7 64bits, have AMD Phenom II X4 965 3.4Ghz, 6Gb DDRIII, and
> SATAII HD

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Real purpose of admin generator

2010-08-02 Thread pghoratiu
I see the admin generator more as a starting point, something you can
build upon.
We have in our application backend both simple and complicated admin
modules.
Simple - generated admin modules where only a couple of partials are
used, no actions override.
Complicated - rewritten editing + custom object actions.
Even for complicated modules we are able to reuse some functionality
such as listing, filtering, ordering
so it's a win for my point of view.

What I've seen also in our project is that people don't know how to
solve a given task using the admin generator
and start to work "against it" (due to time constraints, other
reasons) thus defeating the whole point of using it.

Having less lines of written PHP code is always good.

gabriel


On Jul 26, 9:03 pm, Christian Fazzini 
wrote:
> Hello all,
>
> I've used admin generator a few times. Personally, I don't really
> understand the point of this. The forms in admin generator are based
> on the definitions in the form class. For the backend app, why is the
> common convention for devs to use admin generator? The only difference
> admin generator provides is the search filter. Doctrine generate
> creates the same kind of CRUD functionality that is seen in admin
> generator.
>
> Second, since we have to rely on yml files (i.e. generator.yml) to
> configure the forms in admin generator. It leads to messy code.
> Especially when we have to declare partials in the .yml file just to
> display something different.
>
> Third, if our forms are a bit more complex. We need to copy most of
> the code from /cache dir and paste into the backend module actions
> file. Which makes it a bit tedious if we need to extend our
> application. Plus, we need to do this for every backend module that
> admin generator creates. And the same thing for templates!
>
> If I would have used doctrine generate (for example: symfony
> doctrine:generate-module --with-show --non-verbose-templates frontend
> user User) instead. I would have easy access to the templates folder.
> and the action files. Exactly the same way I would have it in the
> frontend app. Which in some ways, also keeps the coding structure
> consistent.
>
> Having admin generator only complicates the flow of things and defeats
> the purpose of keeping things convenient.
>
> I am starting to suspect that the admin generator is more for
> prototyping than anything
>
> What are your thoughts?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Emails and multiple Applications

2010-08-02 Thread pghoratiu
You should use a plugin, put your templates in the same module and
enable the plugin for all the
applications that need it.

gabriel

On Aug 2, 5:26 pm, Stephen Melrose  wrote:
> Hey,
>
> I've just been reading up on email best practices for 1.3/1.4.
>
> It all makes sense, however my project has two applications (frontend
> and backend) and both will be sending the same email.
>
> I don't want to duplicate my template into both applications, but at
> the same time I don't know how to call it globally outside of an
> application.
>
> Can you make a module global to multiple/all applications? Is that the
> best approach?
>
> Steve

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony Almost Live: building a new Symfony application in 26 minutes

2010-08-01 Thread pghoratiu
It's really nice, I think that something like this is missing on
http://www.symfony-project.org/.
When I started first with symfony (1.0.x) there was a screencast with
building an application with Ajax on the front page. From my point of
view these type of presentations have a high marketing value (not
necessarily technical value) because the potential developers are able
to understand what exactly does it mean to code in Symfony.

gabriel


On Jul 30, 11:04 pm, Tom Boutell  wrote:
> Last week I built a Symfony application while waiting for a panel
> discussion on web frameworks to start, then used it to demonstrate one
> of Symfony's advantages: speed of development. Afterwards I put
> together a screencast. You can watch me build the app here:
>
> http://window.punkave.com/2010/07/30/symfony-almost-live/
>
> I've kept in my mistakes along with their solutions. More educational that 
> way.
>
> Hope you find it helpful! Definitely a good choice for beginning
> Symfony developers.
>
> --TomBoutell
> P'unk Avenue
> 215 755 1330
> punkave.com
> window.punkave.com

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Timestampable

2010-08-01 Thread pghoratiu
You can store the column in a separate table and link it to the master
table 1:1 relationship.
An even better solution is to store this in memcache (also use the
memcache
incrementation mechanism) and save this value in the database from
time to time.

gabriel


On Jul 30, 11:18 am, comb  wrote:
> Hi!
>
> I use the Timestampable behavior on a model.
> The model counts how often it was shown at a column "views".
>
> Well as you might imagin, I want to update the views-column without
> changing the updated_at-value.
> How can I do this?
>
> example:
>
>         public function incrementNbViews()
>         {
>                 $invoker = $this->getInvoker();
>                 // increment
>                 $invoker->setNbViews($invoker->getNbViews() + 1);
>                 // save
>                 $q = Doctrine::getTable(get_class($invoker))->createQuery();
>                 $q->update()
>                 ->set($q->getRootAlias().'.nb_views', '?', 
> $invoker->getNbViews())
>                 ->where($q->getRootAlias().'.id = ?', $invoker->getId())
>                 ->execute();
>         }
>
> => updated_at should NOT change, but it does.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Redirect a subdomain to a module

2010-07-27 Thread pghoratiu
I can see 2 ways of doing this:

1. Outside symfony core - rewrite/.htaccess
http://www.scriptygoddess.com/archives/2007/06/13/redirect-a-subdomain-to-a-directory-using-htaccess/

2. Use the symfony routing system:
http://www.symfony-project.org/blog/2009/03/02/call-the-expert-adding-subdomain-requirements-to-routing-yml
http://www.symfony-project.org/plugins/sfDomainRoutePlugin

gabriel

On Jul 28, 12:59 am, Nicolas Braquart  wrote:
> Hello !
>
> I would like to know if it's possible to redirect a subdomain (like
> api.mydomain.com) to a module (supposed to be accessed with
> mydomain.com/api) ?
> I have already tried a few way to do it, but it didn't work.
>
> I have totally control on the server configuration and symfony
> installation.
>
> Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Zend Lucene can't find accented words

2010-07-20 Thread pghoratiu
Do you use utf-8 everywhere (when indexing the document, when
searching ...) ?

gabriel

On Jul 20, 5:09 pm, wueb  wrote:
> I'm using Zend Lucene in symfony.
>
> When i search by words with á or ã he can't find it.
>
> Anyone knows what can be causing this and how to solve?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: .js is not loaded in prod enviroment

2010-07-19 Thread pghoratiu
This type of problems can be found easily with Firefox -> Firebug
extension, resources return 404 message.

gabriel

On Jul 19, 1:09 pm, Javier Garcia  wrote:
> Well I just added .js in the name of the file (jquery-
> ui-1.7.2.custom.min.js) and it's working.
>
> On Jul 19, 7:05 am, pghoratiu  wrote:
>
>
>
> > Did you clear the cache?
>
> >     gabriel
>
> > On Jul 19, 2:20 am, Javier Garcia  wrote:
>
> > > Hi,
>
> > > I'm loading correctly these .js in the dev enviroment:
>
> > > 
> > >  > > use_javascript('/sfJqueryReloadedPlugin/js/plugins/jquery-ui-1.7.2.custom.m
> > >  in')
> > > ?>
>
> > > but in the prod enviroment the second one is not loaded.
>
> > > No mention about them in view.yml.
>
> > > Any idea?
>
> > > --
> > > Javi
>
> > > Ubuntu 8.04 - Symfony 1.3

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: .js is not loaded in prod enviroment

2010-07-18 Thread pghoratiu
Did you clear the cache?

gabriel

On Jul 19, 2:20 am, Javier Garcia  wrote:
> Hi,
>
> I'm loading correctly these .js in the dev enviroment:
>
> 
>  use_javascript('/sfJqueryReloadedPlugin/js/plugins/jquery-ui-1.7.2.custom.m 
> in')
> ?>
>
> but in the prod enviroment the second one is not loaded.
>
> No mention about them in view.yml.
>
> Any idea?
>
> --
> Javi
>
> Ubuntu 8.04 - Symfony 1.3

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: caching problem in firefox

2010-07-16 Thread pghoratiu
Do you have this behavior also with the development controller
(frontend_dev.php)?

   gabriel

On Jul 16, 4:09 pm, Lea Haensenberger  wrote:
> I've encountered a strange problem with firefox and caching. When I
> log in and get redirected to the homepage afterwards I don't see that
> I'm logged in. If I have a look at context->getUser()->isAuthenticated() I 
> get 'false'. After manually reloading the
>
> homepage everything is fine. I already tried invalidating the cache on
> log in, doesn't help.
> It works fine in Safari.
> Does anyone have an idea what happens with firefox here?
>
> Cheers,
> Lea

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doctrine Admin Generator

2010-07-14 Thread pghoratiu
AFAIK you can not specify security settings in generator.yml only in
config/security.yml
There you have to specify the action name and the credentials required
to access the action,
see more info here:
http://www.symfony-project.org/reference/1_4/en/08-Security

gabriel

On Jul 14, 11:58 pm, galileo  wrote:
> I have question
>
> how in admin generator add credentials to forms in edit or new
>
> for example i have
>
> new:
>   display:
>      "Something":  [ great ]
>   fields:
>     great: { credentials:[admin_credential]}
>
> It dosn't working this field is allways displayed any reason ?
>
> Symfony 1.4 with standard sfDoctrinePlugin doctrine 1.2
>
> Hope for any answer how to do that

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Jobeet Day 3 data-load problem

2010-07-06 Thread pghoratiu
Maybe you have no fixtures in the required directory, can you post the
content of directory where the fixtures are and sample fixture
content.

   gabriel

On Jul 6, 4:43 pm, Elton Saheki  wrote:
> No success,
>
> I tried to clear all caches, and did:
>
> $ php symfony doctrine:build --all --and-load
>
> It created the tables but didn't fill it with fixture data.
> Using 127.0.0.1 gives me the same result, and with password 'pass', it
> can't connect to my database:
>
> PDO Connection Error: SQLSTATE[28000] [1045] Access denied for user
> 'root'@'localhost' (using password: YES)
>
> On Jul 6, 9:58 am, Ricardo Jose Guzman Milanes
>
>
>
>  wrote:
> > Hello Elton
>
> > Try using 127.0.0.1 instead of localhost and for your pwd password: 'pass'

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Cache and analytics parameters

2010-07-05 Thread pghoratiu
> Your solution is to tell apache to ignore the utm parameters before
> the request even goes to PHP, making a REWRITE (not a redirect as I
> understood before).

Yes, this is it.
You may have problems with rewriting query parameters as this is not
so straight-forward.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Having multiple queries with Lucene in nameTable.Class.php

2010-07-05 Thread pghoratiu
Hi!

Sorry but this does not make too much sense to me.

You need to get an instance of the Zend Lucene class, assuming you did
everything as
explained in the Jobeet tutorial:
http://www.symfony-project.org/jobeet/1_4/Propel/en/17

  $index = JobeetJobPeer::getLuceneIndex();
and then you do separate searches to get the highes and lowest ranking
element:
  $index->find($query, 'ranking', SORT_NUMERIC, SORT_DESC);
  $index->find($query, 'ranking', SORT_NUMERIC, SORT_ASC);

And the best would be to do these operations in an action not in the
view.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Cache and analytics parameters

2010-07-05 Thread pghoratiu
1. no because the URL is cleaned up only internally (without doing a
redirect)
In the browser bar the URL will look like this:
http://example.com/post/13?utm_campaign=x&utm_medium=y
but what reaches the controller at the last line in the .htaccess file
should be
http://example.com/post/13
So your Javascript code will pick up the right URL and the PHP code
the filtered URL.

2. I don't understand what you mean by that.

gabriel

On Jul 5, 5:53 pm, illarra  wrote:
> Maybe I'm missing something, but:
>
> 1) Cleans the URL and then shows the page, but then I lose all the
> analytics data: suppose I want to track a marketing campaign.
> 2) I'm using a template cache, so I can't specify a cache key.
>
> Is there any other solution?
>
> On Jul 5, 4:10 pm, pghoratiu  wrote:
>
>
>
> > You have 2 options:
> > 1. Change in mod_rewrite to filter out the extra query elements that
> > pollute the query string
> > 2. Set up explicitly the sf_cache_key when including a partial - in
> > your case tthe sf_cache_key would be the id.
>
> >    gabriel
>
> > On Jul 5, 4:26 pm, illarra  wrote:
>
> > > Hi
>
> > > Is there a way of having an unique cache regardless of the extra
> > > parameters added to a route (like Google Analytics)?
>
> > > Let's say I have a route @view?id=13 that results in the 
> > > URLhttp://example.com/post/13
> > > When I go to the URLhttp://example.com/post/13?utm_campaign=x&utm_medium=y
> > > the cached route by symfony is: @view?
> > > id=13&utm_campaign=x&utm_medium=y
>
> > > And that creates different entries in the cache for the very same
> > > page, because this parameters are just used via javascript.
> > > I would like only one cache per view: @view?id=13. Can I change this
> > > behavior?
>
> > > Thanks a lot.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Cache and analytics parameters

2010-07-05 Thread pghoratiu
You have 2 options:
1. Change in mod_rewrite to filter out the extra query elements that
pollute the query string
2. Set up explicitly the sf_cache_key when including a partial - in
your case tthe sf_cache_key would be the id.

   gabriel


On Jul 5, 4:26 pm, illarra  wrote:
> Hi
>
> Is there a way of having an unique cache regardless of the extra
> parameters added to a route (like Google Analytics)?
>
> Let's say I have a route @view?id=13 that results in the 
> URLhttp://example.com/post/13
> When I go to the URLhttp://example.com/post/13?utm_campaign=x&utm_medium=y
> the cached route by symfony is: @view?
> id=13&utm_campaign=x&utm_medium=y
>
> And that creates different entries in the cache for the very same
> page, because this parameters are just used via javascript.
> I would like only one cache per view: @view?id=13. Can I change this
> behavior?
>
> Thanks a lot.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: .htaccess - redirect example.com/index.php to example.com

2010-07-05 Thread pghoratiu
I think I know what is causing this, in the webserver configuration
the
index.php is set up as the default file to search for when someone
requests
a dir, like:
www.domain.com/dir/
it will automatically search for
www.domain.com/dir/index.php (or index.html if that as configured in
the web server).

On my system Apache is configured to search for the following index
files:


  DirectoryIndex index.html index.cgi index.pl index.php
index.xhtml index.htm



I think that If you change the controller name to something else
index.php -> frontend.php
and update the rewrite rules accordingly it should work well.

gabriel

On Jul 5, 9:57 am, Mickael HOAREAU  wrote:
> Hi,
>
> Thanks for the tips about the debugging log for the htaccess.
>
> Here that I have in the logs when i access tohttp://www.example.com
>
>  [example.com/sid#e05840][rid#5a1eb40/initial] (3) [perdir /var/www/]
> strip per-dir prefix: /var/www/ ->
>  [example.com/sid#e05840][rid#5a1eb40/initial] (3) [perdir /var/www/]
> applying pattern '^index.php$' to uri ''
>  [example.com/sid#e05840][rid#5a1eb40/initial] (3) [perdir /var/www/]
> strip per-dir prefix: /var/www/ ->
>  [example.com/sid#e05840][rid#5a1eb40/initial] (3) [perdir /var/www/]
> applying pattern '^(.*)$' to uri '' (1)
>  [example.com/sid#e05840][rid#5a1eb40/initial] (2) [perdir /var/www/]
> rewrite '' -> 'index.php'
>  [example.com/sid#e05840][rid#5a1eb40/initial] (3) [perdir /var/www/]
> add per-dir prefix: index.php -> /var/www/index.php
>  [example.com/sid#e05840][rid#5a1eb40/initial] (2) [perdir /var/www/]
> strip document_root prefix: /var/www/index.php -> /index.php
>  [example.com/sid#e05840][rid#5a1eb40/initial] (1) [perdir /var/www/]
> internal redirect with /index.php [INTERNAL REDIRECT]
>  [example.com/sid#e05840][rid#5a16120/initial/redir#1] (3) [perdir /
> var/www/] strip per-dir prefix: /var/www/index.php -> index.php
>  [example.com/sid#e05840][rid#5a16120/initial/redir#1] (3) [perdir /
> var/www/] applying pattern '^index.php$' to uri 'index.php' (2)
>  [example.com/sid#e05840][rid#5a16120/initial/redir#1] (2) [perdir /
> var/www/] rewrite 'index.php' -> 'http://example.com/'
>  [example.com/sid#e05840][rid#5a16120/initial/redir#1] (2) [perdir /
> var/www/] explicitly forcing redirect withhttp://example.com/
>  [example.com/sid#e05840][rid#5a16120/initial/redir#1] (1) [perdir /
> var/www/] escapinghttp://example.com/for redirect
>  [example.com/sid#e05840][rid#5a16120/initial/redir#1] (1) [perdir /
> var/www/] redirect tohttp://example.com/[REDIRECT/301]
>  [example.com/sid#e05840][rid#5a48c28/initial] (3) [perdir /var/www/]
> strip per-dir prefix: /var/www/ ->
>  [example.com/sid#e05840][rid#5a48c28/initial] (3) [perdir /var/www/]
> applying pattern '^index.php$' to uri '' (3)
>  [example.com/sid#e05840][rid#5a48c28/initial] (3) [perdir /var/www/]
> strip per-dir prefix: /var/www/ ->
>  [example.com/sid#e05840][rid#5a48c28/initial] (3) [perdir /var/www/]
> applying pattern '^(.*)$' to uri ''
>  [example.com/sid#e05840][rid#5a48c28/initial] (2) [perdir /var/www/]
> rewrite '' -> 'index.php'
>  [example.com/sid#e05840][rid#5a48c28/initial] (3) [perdir /var/www/]
> add per-dir prefix: index.php -> /var/www/index.php
>  [example.com/sid#e05840][rid#5a48c28/initial] (2) [perdir /var/www/]
> strip document_root prefix: /var/www/index.php -> /index.php
>  [example.com/sid#e05840][rid#5a48c28/initial] (1) [perdir /var/www/]
> internal redirect with /index.php [INTERNAL REDIRECT]
>
> I deduced that:
> (1) The rule RewriteRule ^(.*)$ index.php [L,QSA] is applied the first
> time.
> (2) The new url is parsed again by the htaccess. I dont really
> understand why.
> (3) We have an infinite loop.
>
> I find another quick solution which is to do the redirect in the
> index.php with the following code:
>
> if ($_SERVER['REQUEST_URI'] == "/index.php") {
>         header("HTTP/1.1 301 Moved Permanently");
>         header("Location: http://".$_SERVER['HTTP_HOST']."/");
>         exit;
>
> }
>
> If i access tohttp://www.example.com,  $_SERVER['REQUEST_URI'] will
> be empty (even with RewriteRule ^(.*)$ index.php [QSA,L]).
> I dont really like this solution because i would like to keep
> centralized all the rewrite rules in the htaccess.
>
> Mickael

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Having multiple queries with Lucene in nameTable.Class.php

2010-07-04 Thread pghoratiu
The same way you do it in the action.
Actually putting controller code in the view is not recommended,
better use a component or something else for this.

   gabriel


On Jul 5, 1:13 am, Ricardo Jose Guzman Milanes
 wrote:
> Thanks for the link Gabriel!
>
> But, how can I call that from the templates?
> Thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Having multiple queries with Lucene in nameTable.Class.php

2010-07-04 Thread pghoratiu
You can change the sort order from score to whatever column you have
indexed, see more here:
http://zendframework.com/manual/en/zend.search.lucene.searching.html
look for "Search Result Sorting".

   gabriel

On Jul 4, 9:30 pm, Ricardo Jose Guzman Milanes
 wrote:
> Hello
>
> After implementing Lucene in our project and testing how it works. We
> want to do the following:
>
> Our project consist on search for doctors by their ranking value. We
> want to search for the highest rated ones, lowest rated ones and a
> search by terms.
>
> The search by terms is done, what we are a little confused about how
> to do is the search of the highest and the lowest. Because in the
> nameTable.Class.php file there is only one query, and we want to have
> different queries, and be able to call them fromthe layout.php  with
> the same index.But we don't know how to do that.
>
> Thanks for your help.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Sending mail from a Form class.

2010-07-01 Thread pghoratiu
>From the first one the actual send is missing:

  // send the email
  $this->getMailer()->send($mail);

gabriel

On Jul 2, 5:25 am, Cosimo Zecchi  wrote:
> Hi all.. I think it's a strange behavior: if I send email inside an  
> action it will be sent. If I try to send it inside the save function  
> in a form class, the email doesn't arrive (I've seen in the sendmail  
> queue and it is empty).
> To explain what i'm trying to do: i want to send an email everytime a  
> post is created or edited, so the better thing to do it is to send  
> through the save function of the Post Form class.
>
> This is the not working code (but it gives no errors, everything seem  
> fine):
> 
> public function doSave($con = null) {
>      parent::doSave($con);
>         $post=$this->getObject();
>         $mail = sfContext::getInstance()->getMailer()->compose();
>         $mail->setFrom("i...@teapartyitalia.it", 'Tea Party Italia');
>               $to = array(
>                           'myaddr...@yahoo.com',
>                           'myaddr...@gmail.com',
>                         );
>         $mail->setTo($to);
>         $mail->setSubject("prova");
>         $mail->setBody("Mail inviata da form");
>         // send the email
>         sfContext::getInstance();
>
> }
>
> This my working function (it sends the email) in the actions.class.php:
> public function executeTestMail(sfWebRequest $request){
>                  $mail = $this->getMailer()->compose();
>                   // definition of the required parameters
>                   $mail->setFrom("i...@teapartyitalia.it", 'Tea Party 
> Italia');
>               $to = array(
>                           'myaddr...@yahoo.com',
>                           'myaddr...@gmail.com',
>                         );
>                   $mail->setTo($to);
>                   $mail->setSubject("prova");
>                   $mail->setBody("Mail inviata da testMail");
>                   // send the email
>                   $this->getMailer()->send($mail);
>         $this->redirect('/');
>    }
>
> They are quite the same.. why the hell the first doesn't work?
> I'm going mad, thank you in advance,
> Cosimo

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Migration of Symfony 1.0 to 1.4 Help and Hints please

2010-07-01 Thread pghoratiu
If you want to upgrade the project you can get only till 1.3 because
in 1.4 the backward compatible elements were removed.
To move the project between 1.3 -> 1.4 you will certainly have to do
some rewrites/refactoring.

I also have a project running on 1.0 but I think I would rather jump
to 1.4 directly and do a rewrite of the code.

gabriel

On Jul 1, 6:16 pm, Juerg  wrote:
> Hi
>
> I am ready to update 2 larger projects made with Symfony 1.0.22-LAST
> to the current version 1.4.6, including updating Propel to the latest
> 1.5 Version.
> Do I really have to update by running each > 1.1 > 1.2 > 1.3 > 1.4
> step or is there a somewhat easier way to do it?
>
> For example new install of Symfony 1.46 and migrate manually?
> If anybody with experience can give me some hints, warn me about traps
> or send me helpful links, I would highly appreciate it.
>
> I can do the upgrade on a Mac with SnowLeopard PHP < 5.3 and Propel
> 1.0 installed or on a Mac with PHP 5.31 and Propel 1.5
>
> Any help, hint or link very much appreciated. Thanks
> Juerg

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Different Cache for different user groups

2010-06-30 Thread pghoratiu
I do not know much about your application but usually it is not a good
strategy to cache pages or partials accessible only to one user.
Usually these type of pages are not highly traffic-ed (compared to
public pages) and the cache will not be hit so many times (compared to
public pages).

If those pieces take a lot of time to generate I would solve the
caching at a different level (memcache of data).

gabriel


On Jul 1, 4:34 am, Richtermeister  wrote:
> Hi all,
>
> I have an app with 2 usergroups  (admins and dealers), and dealers can
> fall into 3 brands. Those two factors affect the content of certain
> lists. Now, I'd like to cache certain sections, but of course I need
> to still worry about who sees what, and I'm thinking that in theory
> this should be as easy as making the two factors part of the cache
> key.
> This way, all combinations of dealer/admin and brands get individual
> caches.
> Is that the right thought, and where would I have to tinker to make
> this happen? I suspect the sfViewCacheManager is a good spot, but I'm
> unsure how exactly.
>
> Thanks,
> Daniel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: .htaccess - redirect example.com/index.php to example.com

2010-06-28 Thread pghoratiu
I managed to replicate the behavior you are seeing, not sure why it
happens.

My suggestion is to enabled debugging for mod_rewrite and see which
rule executes in a loop and why:
RewriteLog "/home/gabi/rewrite.log"
RewriteLogLevel 3

gabriel

On Jun 29, 5:39 am, Mickael HOAREAU  wrote:
> Hello Gabriel,
>
> Thanks for your answer.
>
> I tried this, but it provokes an infinite loop.
>
> Here the exact content of my .htaccess:
>
> ===
> Options +FollowSymLinks +ExecCGI
>
> 
>   RewriteEngine On
>
>   RewriteCond %{REQUEST_URI} index\.php [NC]
>   RewriteRule ^index.php$http://www.example.com/[L,R=301]
>
>   RewriteCond %{REQUEST_FILENAME} !-f
>   # no, so we redirect to our front web controller
>   RewriteRule ^(.*)$ index.php [QSA,L]
>
> 
> ===
>
> Mickael
>
> On 28 juin, 20:30, pghoratiu  wrote:
>
>
>
> > it should be ok if you put that rule in the following order:
> > ==
> >   RewriteCond %{REQUEST_URI} index\.php [NC]
> >   RewriteRule ^index.php$http://www.example.com/[L,R=301]
>
> >   # no, so we redirect to our front web controller
> >   RewriteRule ^(.*)$ index.php [QSA,L]
> > ==
>
> >     gabriel
>
> > On Jun 28, 12:23 pm, Mickael HOAREAU 
> > wrote:
>
> > > Hello,
>
> > > In the default .htaccess of symfony we have:
>
> > > Options +FollowSymLinks +ExecCGI
>
> > > 
> > >   RewriteEngine On
>
> > >   # uncomment the following line, if you are having trouble
> > >   # getting no_script_name to work
> > >   #RewriteBase /
>
> > >   # we skip all files with .something
> > >   #RewriteCond %{REQUEST_URI} \..+$
> > >   #RewriteCond %{REQUEST_URI} !\.html$
> > >   #RewriteRule .* - [L]
>
> > >   # we check if the .html version is here (caching)
> > >   RewriteRule ^$ index.html [QSA]
> > >   RewriteRule ^([^.]+)$ $1.html [QSA]
> > >   RewriteCond %{REQUEST_FILENAME} !-f
>
> > >   # no, so we redirect to our front web controller
> > >   RewriteRule ^(.*)$ index.php [QSA,L]
> > > 
>
> > > I would like to redirectwww.example.com/index.phptowww.example.com
> > > with a 301 redirection.
>
> > > One solution would be to add the following rule in the htaccess:
>
> > >   RewriteCond %{REQUEST_URI} index\.php [NC]
> > >   RewriteRule ^index.php$http://www.example.com/[L,R=301]
>
> > > But this rule makes a conflict with the rule :
> > > RewriteRule ^(.*)$ index.php [QSA,L]
>
> > > It provokes an infinite loop.
>
> > > Another option would to rename the script index.php to another name
> > > like frontend.php in the web folder.
>
> > > But before to do that i want to make sure that there is no other way
> > > to do this only by modifying the htaccess.
>
> > > Does anybody have an idea ?
>
> > > Thanks in advance for your help.
>
> > > Mickael

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: .htaccess - redirect example.com/index.php to example.com

2010-06-28 Thread pghoratiu
it should be ok if you put that rule in the following order:
==
  RewriteCond %{REQUEST_URI} index\.php [NC]
  RewriteRule ^index.php$ http://www.example.com/ [L,R=301]

  # no, so we redirect to our front web controller
  RewriteRule ^(.*)$ index.php [QSA,L]
==

gabriel


On Jun 28, 12:23 pm, Mickael HOAREAU 
wrote:
> Hello,
>
> In the default .htaccess of symfony we have:
>
> Options +FollowSymLinks +ExecCGI
>
> 
>   RewriteEngine On
>
>   # uncomment the following line, if you are having trouble
>   # getting no_script_name to work
>   #RewriteBase /
>
>   # we skip all files with .something
>   #RewriteCond %{REQUEST_URI} \..+$
>   #RewriteCond %{REQUEST_URI} !\.html$
>   #RewriteRule .* - [L]
>
>   # we check if the .html version is here (caching)
>   RewriteRule ^$ index.html [QSA]
>   RewriteRule ^([^.]+)$ $1.html [QSA]
>   RewriteCond %{REQUEST_FILENAME} !-f
>
>   # no, so we redirect to our front web controller
>   RewriteRule ^(.*)$ index.php [QSA,L]
> 
>
> I would like to redirectwww.example.com/index.phptowww.example.com
> with a 301 redirection.
>
> One solution would be to add the following rule in the htaccess:
>
>   RewriteCond %{REQUEST_URI} index\.php [NC]
>   RewriteRule ^index.php$http://www.example.com/[L,R=301]
>
> But this rule makes a conflict with the rule :
> RewriteRule ^(.*)$ index.php [QSA,L]
>
> It provokes an infinite loop.
>
> Another option would to rename the script index.php to another name
> like frontend.php in the web folder.
>
> But before to do that i want to make sure that there is no other way
> to do this only by modifying the htaccess.
>
> Does anybody have an idea ?
>
> Thanks in advance for your help.
>
> Mickael

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: importing a symfony made website back into symfony??

2010-06-27 Thread pghoratiu
First check how was symfony installed, it was installed via PEAR or it
is a local installation
available in directory lib/vendor. In case of local installation you
have everything in place.
Otherwise find out which symfony version was used (1.0.x, .1.1.x,
1.2.x, 1.3.x, 1.4.x) and download/install the required
version (via PEAR or into lib/vendor).

The documentation should help you, again it's good to know the symfony
version used to develop the application
and study the documentation according to that version.

If you have errors in you apps you will probably have to change the
PHP code. You don't have to create a new project
and insert into it, just use the existing one if all the environment
dependencies are in place.

gabriel


On Jun 26, 7:47 pm, martyn  wrote:
> hello symfony users,
>
> my programmer made an excellent website using Symfony with MySQL appl.
> due to a family occurance he is off the project- and I mean OFF.
>
> i think he's left the city as well as the continent.
>
> i have a back-up of the complete project exactly as it was orig. made
> by Symfony.
> my new programmer [new to Symfony, but advanced in php & mysql] wants
> to know...
>
> how can we fix a handfull of errors, without needing to hack/break
> into the php code cause it might cause severe probs elsewhere.
>
> can we start a 'NEW' symfony project, then import the project back-up
> [orig. made in symfony] in it??
> we are fairly certain any changes should be made within- and content-
> driven by- Symfony, not simply within the project using netbeans.. [am
> i correct??]
>
> any suggestions will be m-IT-ghtely appreciated.
>
> Martyn Biesheuvel
> Amsterdam

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Day 1 - jobeet problem

2010-06-22 Thread pghoratiu
Try with frontend_dev.php because index.php (the production
controller) does not print out error messages.
Also try to put there a phpinfo.php that prints out the phpinfo() so
you can check if all your settings are allright.

gabriel


On Jun 22, 7:30 pm, Christian  wrote:
> Hi!
>
> my name is christian and i'm new with symfony framework.
>
> I found this step by step 
> tutorial:http://www.symfony-project.org/jobeet/1_2/Propel/it/01
>
> i have troubles during the apache configuration...
>
> this is my httpd.conf
>
> ___ __
> # Be sure to only have this line once in your
> #configuration
> NameVirtualHost 127.0.0.1:8080
>
> # This is the configuration for your project
> Listen 127.0.0.1:8080
>
> 
>   DocumentRoot "/home/chris/public_html/jobeet/web"
>   DirectoryIndex index.php
>   
>     AllowOverride All
>     Allow from All
>   
>
>   Alias /sf /home/chris/public_html/jobeet/web/lib/vendor/symfony/data/
> web/sf
>    data/web/sf">
>     AllowOverride All
>     Allow from All
>   
> 
> ___
>
> where public_html is my apcahe DocumentRoot in whitch i have a lot of
> directory with different site, but when i put this link in my 
> browser:http://localhost:8080/index.php(as the tutorial say) i can't see
> anything...only a blank page...
>
> can you help me please?
>
> thanks
> Chris

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardUser: Unable to stay signed in

2010-06-22 Thread pghoratiu
The defaults for session storage are defined in apps/frontend/config/
factories.yml.
If there is nothing changed vs. the defaults than the PHP session
storage is used, in this case you can check
the serialized sessions stored usually somewhere in /var/lib/php5 (or
something similar, depending on your Linux distribution).

   gabriel


On Jun 22, 5:33 pm, ashton honnecke  wrote:
> I'm not sure.  How do I check on this?
>
> I tried reverting my dev instance to a known version (the same one
> that is in production and can be logged in to), it still exhibits this
> behavior, so I think that you are probably right that there is
> something going on outside of the code.  What might that be, and do
> you have any ideas of how I could check?
>
> ashton

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardUser: Unable to stay signed in

2010-06-22 Thread pghoratiu
How does symfony store the session in your case, are you using the php
session or something else?

gabriel

On Jun 22, 9:19 am, ashton honnecke  wrote:
> I am able to save information to the session manually:
>       print_r($_SESSION['something']);
>       $_SESSION['something'] = array('7');
>
> That will save and then print Array ( [0] => 7 ) in a unprotected action.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardUser: Unable to stay signed in

2010-06-21 Thread pghoratiu
I would say it's something wrong at the PHP configuration level, what
is your environment (OS, PHP, symfony version, ...?).

gabriel

On Jun 21, 8:51 pm, ashton honnecke  wrote:
> This is what I have in configuration>user on the page load after sign
> in (from the webDebugToolbar):
>
> attributeHolder:
>   sfGuardSecurityUser: { user_id: '173' }
>
> On the next pageload, it goes away (no sfGuardSecurityUser at all)
>
> I printed the session at the beginning of an action (right after
> login) and I got:
>             [sfGuardSecurityUser] => Array
>                 (
>                     [user_id] => 173
>                 )
>
> then died before the action was over.
>
> Reloading after that got me back to the signin page.
>
> I did recently add Profile to the schema (with a 1:1 relationship
> between User and Profile) and rebuild after that.
>
> I tried removing and re-adding the entire plugin with no change in behavior.
>
>
>
> On Fri, Jun 18, 2010 at 12:57 AM, pghoratiu  wrote:
> > Check the session - the user id should be stored after sign-in.
> > This can be checked in the web debug toolbar or directly the
> > serialized session data.
>
> >   gabriel
>
> > On Jun 18, 9:50 am, ashton  wrote:
> >> I'm not sure how I broke things, but I can no longer remain logged in
> >> beyond one page load (tried clearing cache/using a different browser).
>
> >>  * When I hit a page, I get the login screen
> >>  * I login successfully
> >>  * The page that I was initially navigating to loads
> >>  * Then next time that I load a page, the signinSuccess form renders
> >> again.
>
> >> Thoughs?
>
> >> logs:http://pastebin.com/0302jtfK
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: unwanted id column from doctrine:build-sql / build-sql ignores schema.yml

2010-06-19 Thread pghoratiu
>  relations:
>    Users:
>      local: statusid
>      foreign: statusid
>      type: many

Try changing the relation type between tables to "one". The id is add
because the relation type is many.

> Now here's where things get completely bizarre. Hopefully this will be the 
> key to someone.
>
> I can remove my schema.yml and schema.sql files and clear cache, then rerun 
> doctrine:build-sql and it will still generate the same SQL file! If I'm 
> reading the documentation correctly, it should fail when schema.yml is 
> missing. So, if it's not using config/doctrine/schema.yml, then where is it 
> getting the schema definition?

If I remember correctly the lib/model files are used in this case. Try
removing the content of that directory or do a
symfony doctrine:clean-model-files

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardUser: Unable to stay signed in

2010-06-17 Thread pghoratiu
Check the session - the user id should be stored after sign-in.
This can be checked in the web debug toolbar or directly the
serialized session data.

   gabriel


On Jun 18, 9:50 am, ashton  wrote:
> I'm not sure how I broke things, but I can no longer remain logged in
> beyond one page load (tried clearing cache/using a different browser).
>
>  * When I hit a page, I get the login screen
>  * I login successfully
>  * The page that I was initially navigating to loads
>  * Then next time that I load a page, the signinSuccess form renders
> again.
>
> Thoughs?
>
> logs:http://pastebin.com/0302jtfK

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Call to undefined function.

2010-06-16 Thread pghoratiu
It's part of the PartialHelper.php modify your config/settings.yml to
include it by default:

all:
  .settings:
standard_helpers:   [I18N, Partial]

or prepend use_helper('Partial') at the top of your template.

Check the manual.

gabriel


On Jun 17, 8:28 am, Dan  wrote:
> Hello, I have the following error, and after killing my nerves
> googling for it, I posted here.
>
> Does anyone knows how I can get rid of this stupid error?
>
> "Fatal error: Call to undefined function include_component() in "
>
> Everything else works, pages, modules, routing etc. but this doesn't
>
> Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Too many redirects error on symfony.

2010-06-16 Thread pghoratiu
It may be related to user sessions timing out and the framework doing
an internal forward to the login page,
did you consider that option?

   gabriel


On Jun 16, 6:50 pm, Bruno Reis  wrote:
> the $secureRequest var is the same as ImNotOnHTTP
>
> The odd thing is that it will work most of the time, so the filter
> logic is valid.
> For the same exact situation it will work one time, it will fail another time.
>
> 2010/6/16 Tom Ptacnik :
>
>
>
> > I think that this code will redirect to http even if I'm on http
> > right. And same with https. I'm on https and this filter redirect me
> > to https again..
>
> > So I advice to insert conditions...I'll show it on pseudocode
>
> > if (ImNotOnHTTP && $sslEnabled && !$secureRequest) {
> >  redirect to http
> > }
> > elseif($secureRequest && ImNotOnHTTPS) {
> >  redirect to https
> > }
>
> > On 14 čvn, 17:56, Bruno Reis  wrote:
> >> Hi,
>
> >> I´m using a filter with the following code to change from http to https and
> >> back from https to http. Sometimes when leaving from a https page, the
> >> browser gives a "too many redirects" error. I cannot reproduce the error
> >> easily. It´s not all the time that it happens. Normaly it still happening
> >> very often after the first time it happens.
>
> >> We have debuged the error requests here and the sfResponse status code 
> >> still
> >> 200 until the very last filter (rendering), but the headers sent to the
> >> browser have a 302 code and I have no idea why neither where.
>
> >> Do you have any idea of what can be happening?
>
> >>         $module = $this->getContext()->getModuleName();
> >>         $secureRequest = $this->getContext()->getRequest()->isSecure();
> >>         $moduleHasToBeSecure = in_array($module,array('join','payment'));
> >>         //$sslEnabled = sfConfig::get('app_enable_join_ssl', true);
> >>         $sslEnabled = true;
> >>         $uri = $this->getContext()->getRequest()->getUri();
> >>         if (!$this->isAjax()) {
> >>             if ($moduleHasToBeSecure) {
> >>                 if ($sslEnabled && !$secureRequest) {
>
> >> $this->getContext()->getController()->redirect(preg_replace("/^http:\/\//",
> >> "https://";, $uri));
> >>                 }
> >>             }
> >>             else {
> >>                 if($secureRequest) {
>
> >> $this->getContext()->getController()->redirect(preg_replace("/^https:\/\//"
> >>  ­,
> >> "http://";, $uri));
> >>                 }
> >>             }
> >>         }
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Too many redirects error on symfony.

2010-06-16 Thread pghoratiu
Check the symfony logs - there should be some info about the filters
executed and redirects performed.

   gabriel


On Jun 16, 4:17 pm, Bruno Reis  wrote:
> any hints?
>
> 2010/6/14 Bruno Reis :
>
>
>
> > Hi,
>
> > I´m using a filter with the following code to change from http to https and
> > back from https to http. Sometimes when leaving from a https page, the
> > browser gives a "too many redirects" error. I cannot reproduce the error
> > easily. It´s not all the time that it happens. Normaly it still happening
> > very often after the first time it happens.
>
> > We have debuged the error requests here and the sfResponse status code still
> > 200 until the very last filter (rendering), but the headers sent to the
> > browser have a 302 code and I have no idea why neither where.
>
> > Do you have any idea of what can be happening?
>
> >     $module = $this->getContext()->getModuleName();
> >     $secureRequest = $this->getContext()->getRequest()->isSecure();
> >     $moduleHasToBeSecure = in_array($module,array('join','payment'));
> >     //$sslEnabled = sfConfig::get('app_enable_join_ssl', true);
> >     $sslEnabled = true;
> >     $uri = $this->getContext()->getRequest()->getUri();
> >     if (!$this->isAjax()) {
> >     if ($moduleHasToBeSecure) {
> >     if ($sslEnabled && !$secureRequest) {
>
> > $this->getContext()->getController()->redirect(preg_replace("/^http:\/\//",
> > "https://";, $uri));
> >     }
> >     }
> >     else {
> >     if($secureRequest) {
>
> > $this->getContext()->getController()->redirect(preg_replace("/^https:\/\//" 
> > ,
> > "http://";, $uri));
> >     }
> >     }
> >     }

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: app.yml array is not array on first level

2010-06-14 Thread pghoratiu
Hi!

I think this is by design, sort of a "undocumented feature".
I had this problem as well when I first encountered it and since than
I remembered to always use the second level to store arrays.

gabriel

On Jun 14, 11:43 am, Tom Ptacnik  wrote:
> Do someone know why first solution produce bad array and second will
> produce good array?
> I'm talking abou settings in app.yml
>
> 1)
> all:
>   frontend_cultures: [cs, en]
>
> will produce (cache/app/dev/app.yml.php):
>
> 'app_frontend_cultures_0' => 'cs',
> 'app_frontend_cultures_1' => 'en',
>
> 2)
> all:
>   frontend:
>     cultures: [cs, en]
>
>  'app_frontend_cultures' => array (
>   0 => 'cs',
>   1 => 'en',
> ),

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: practical symfony guide 1.4 routing (or apache?) question

2010-06-11 Thread pghoratiu
Check if you have mod_rewrite enabled in your apache setup.

   gabriel

On Jun 10, 2:48 am, Marvin Frederickson
 wrote:
> I'm up to day 5 (page 69) in the guide.  When I browse 
> tohttp://jobeet.artemisu.local/the job list comes up fine.  But when I
> click on the first job in the list, I get an apache page not found
> error.  The url is this:
>
> http://jobeet.artemisu.local/job/sensio-labs/paris-france/1/web-devel...
>
> It works fine if I include the index.php or frontend_dev.php filename
> in the url, but not if I omit it.  Why is that?  And how can I fix it?
>
> Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mediatemnple Dv server symfony deployment

2010-06-11 Thread pghoratiu
There is something wrong with your setup check:
  1. phpinfo()
  2. Run the /data/bin/check_configuration.php script
  3. Check Apache log (the error log in particular)
  4. Install xdebug if possible
White screen means usually a fatal error with the PHP interpreter.

  gabriel


On Jun 11, 10:56 am, fRAnKEnSTEin  wrote:
> Hi,
>
> Ok i have deleted that limitation, now i can load the
> "frontend_dev.php" file but all i can see is a blank page :(
>
> Any idea?
>
> cheers

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mediatemnple Dv server symfony deployment

2010-06-10 Thread pghoratiu
The frontend_dev.php is limited by default for accesses from
localhost.
Check and change that (add your IP) or delete that limitation
altogether.

gabriel


On Jun 11, 9:13 am, fRAnKEnSTEin  wrote:
> using the "frontend_dev.php" i get:
>
> You are not allowed to access this file. Check frontend_dev.php for
> more information.
>
> any idea?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mediatemnple Dv server symfony deployment

2010-06-10 Thread pghoratiu
Check also the output with the development controller
(frontend_dev.php).
In case you get blank page with prod you can see the problem with dev.

   gabriel


On Jun 11, 7:12 am, fRAnKEnSTEin  wrote:
> Hi there,
>
> Does any body knows any tutorial/guide/page or something that explains
> how to deploy a Symfony(v1.4) project in a dedicated virtual (dv 3.5)
> mediatemple server?
>
> At the moment i have just uploaded the project to my dv server, chaged
> the Db configuration like this pgae explains:
>
> http://www.symfony-project.org/jobeet/1_2/Doctrine/en/23
>
> But all i see is a blank page, i already turned off phph safe_mode,
> but still nothing.
>
> Any idea will be very apreciatted.
>
> Cheers

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Create sub-directory in Backend Application on the fly

2010-06-09 Thread pghoratiu
This is the expected behaviour, you need to have access rights for the
given directory to create a subdirectory in it.
You can create the support directory with ownership set up as the user
used to run apache (under Ubuntu this is www-data)
in this case the access rights can be set up as 0700.

gabriel


On Jun 9, 12:50 pm, "Md. Al Amin Chowdhury"
 wrote:
> Hi,
>
>     I am working in a project using Symfony 1.4.5 with Doctrine.
>     I have two application backend,frontend.
>     The project content Ticket System, I have tickets module in backend
> using admin-generator.
>     & also created a directory support underneath apps/backend
>     apps
>        -- backend
>              -- support
>
>    admin user will create ticket during that time a sub-directory name
> 'ticket_id' containing 'help.txt' file  under apps/backend/support
>    apps
>        -- backend
>              -- support
>                   -- 1 (ticket_id)
>                          -- help.txt
>                   -- 2
>                          -- help.txt
>                   -- 3
>                          -- help.txt
>
>     I can get the support directory using
> sfConfig::get('sf-app-dir').'/support' in my model class.
>     I need to create the subdirectory with containing help.txt file under
> apps/backend/support
>
>     if i set full permission(0777) to support directory,the subdirectory
> with files are created successfully.
>
>     For security reason i cann't set the full permission(0777) to support
> directory.
>     using default permission, I tried to create sub directory, it says
> warning  chmod,mkdir()
> [function.mkdir]:
> Permission denied.
>
> Any Ideas
>
> Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfImageTransformExtraPlugin: Anyone manage to get it working?

2010-06-06 Thread pghoratiu
What type of image transformer you use (mod_gd)?
Check that is installed correctly (phpinfo()).

What type of images are you trying to transform?
There are some known limitations for libgd - no bitmap (.bmp) etc...

What error do you get when running under the dev controller (it should
be something else then a white page).

gabriel


On Jun 7, 12:18 am, aikistudio  wrote:
> Hi,
>
> Did anyone get the plugin sfImageTransformExtraPlugin working? I tried
> and made sure to follow the steps but still getting blank page when
> trying to get a thumbnail.
>
> Regards,
> Paulo

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardPlugin fails query upon doctrine:build --all

2010-06-06 Thread pghoratiu
Check this for the sf_guard_forgot_password table, that is the one
giving the errors.

gabriel

On Jun 6, 8:49 pm, James Wheaton  wrote:
> This is what I had before, so I get the same error.
>
> On 6/5/2010 2:16 PM, pghoratiu wrote:
>
>
>
> >> Taking a look at
> >> plugins/sfDoctrineGuardPlugin/config/doctrine/schema.yml, all of the id
> >> columns use integer(4). Isn't this what the user_id type should be?
>
> > =
> > It should be type: integer(4)
>
> >     columns:
> >       user_id:
> >         type: integer(4)
> >         notnull: true
>
> >      gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony cache, override?

2010-06-06 Thread pghoratiu
1. Split up the page in cache-able pieces and leave the main page un-
cached.
2. use AJAX to load content for the changed section.

   gabriel


On Jun 5, 9:54 am, zedan  wrote:
> I want to cache my index page, but i don't want to cache
> [_index_partial] which include by index page, I code cache.yml list
> below, but it can't work, the total index page was cached.
> What can i do to make it work? I know that I can cache all partial in
> index page except _index_partial, but if index page include many
> partials, to code cache config is a heavy work.
> Other suggestion?
>
>      index:
>         enabled: true
>         lifetime: 300
>      _index_partial:
>         enabled: false

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Custom directory structure

2010-06-06 Thread pghoratiu
I think that it was your mistake by choosing the "wrong tool" for the
job.
Given your requirements (strict shared hosting environment)
CodeIgniter would be a better fit.

In the future if you commit to symfony try searching for a shared
hosting provider that is more
symfony friendly (there are plenty of those as well).

gabriel


On Jun 6, 10:21 am, Ragnis  wrote:
> I can't learn it if I can't get it to work.
>
> Theese "framework guys" never think about those who are using shared
> hosting.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardPlugin fails query upon doctrine:build --all

2010-06-05 Thread pghoratiu
> Taking a look at
> plugins/sfDoctrineGuardPlugin/config/doctrine/schema.yml, all of the id
> columns use integer(4). Isn't this what the user_id type should be?

=
It should be type: integer(4)

   columns:
 user_id:
   type: integer(4)
   notnull: true

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to paginate search-results?

2010-06-05 Thread pghoratiu
> how do you secure, that one cannot bypass the post-form, by url-
> manipulation?

You can not really do that, they can do whatever they want in the
request.

One thing that you have to do is to enforce a session upon the users
that get to search form - by requesting login for instance.
To identify if a request is a second search or pagination just save
the array of filters in the session and compare it
when going to the second request, in the case of pagination all the
filters will be the same except page.

The thing is that there are so many ways to generate a DOS for a
website that protecting only the search result does not make
too much sense to me. They could be requesting an image from your site
over and over again without touching the search result.
So basically you will protect your search result somehow without
protecting from other DOS methods.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Overriding settings.yml

2010-06-05 Thread pghoratiu
I don't think that you can do this given that these are decided on the
application level (not module level).
What you can do is do a forward to your own 404 page depending on the
request once you are in the 404
action.

gabriel

On Jun 4, 8:09 pm, Carlos Jorge Andrade 
wrote:
> Hi,
>
> Is it possible to override settings.yml at the module level ?
> I know it's possible with security.yml and view.yml but I can't find  
> any reference to settings.yml
>
> I want to be able to do the following
>
> 1) Set  different 404 error pages per module.
> 2) Set different login_module/login_action per module (i have two  
> types of users on the site)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to paginate search-results?

2010-06-05 Thread pghoratiu
> Saving session by ip ... what if $_SERVER['REMOTE_ADDR'] is not set ?

That value should always be set.
If there is a proxy between the client and the server it will be the
proxy server IP address and maybe set up
in the HTTP header as X-Forwarded-For.

> Anyway... as I mentioned my main question isn't about storing
> sessions, but getting a best practice for the pagination of search-
> results with flood-protection!? :-)
> So you both think that storing search results in the session is a good
> idea?
> I thought it would be odd and may give a better way?

My suggestion in this case is to use the difference between GET/POST.
When someone makes a search request than it should be with a POST.
For pagination use GET with URL parameters to switch between pages.
You will limit the access based on the type of request made.

I would keep in session (or the URL) the filter used and not the
actual results.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to paginate search-results?

2010-06-05 Thread pghoratiu
I think you should be worried about users that refuse to reply with
the cookie thus
the session is pretty much useless in this case (crawlers usually
don't hold the cookie).
In this case you need to track the users by IP address.
I would solve this problem on the Apache server side with dos_evasive
and not in symfony, see here:
http://bobcares.com/blog/?p=79

AFAIK the users can't mess with session data, it's stored safely on
the server side and the data storage bucket
is identified by the hash of the session (check cookie named symfony).

gabriel

On Jun 4, 11:47 pm, comb  wrote:
> Hi everybody! :-)
>
> I have two actions: search/executeIndex and search/executeSearch.
>
> And I have a Search-Query $q generated by the executeSearch that gives
> all search results.
>
> Normally you would simply give it to the Pager and be happy! :-)
> BUT I want to add a search-flood-protection.
>
> I try to find the best-practice now for this use-case:
>
> 1) A User sees a search-Form, fills it and submits it.
>
> 2) I check if the user is flooding, if so, he's redirected and sees a
> message like 'you have to wait some time' - otherwise he sees the
> results page.
>
> If I now add pagination to the results, I need to execute the search-
> function on each page and that would result in a redirection for the
> user and a message that he has to wait some time if he switches the
> page to fast... Thats NOT what I want!
>
> I want that the user can switch pages in THIS current search results
> without waiting. Only if he queries a NEW search from the form, I want
> to check the flooding-time.
> If I use the users-session like setting a var "is_new_search" , I will
> be afraid of someone who manually sets this var in his cookie to
> FALSE.
>
> Any ideas on how I could do that securely? I thought about fetching
> all search-results and saving them in the users session. Then if the
> search function finds those results in the session, the function
> simply paginates it. Otherwise a new query is generated and the flood-
> time is checked. But that sounds very odd to me :-/
> Any experience with that?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Question about jq_link_to_remote()

2010-06-04 Thread pghoratiu
Try with:

  'update' => 'myDialog',

gabriel

On Jun 4, 8:04 pm, Javier Garcia  wrote:
> Hi,
>
> i have a template with this below to show a dialog when the link is clicked:
>
> 
>
> 
>
> echo jq_link_to_remote('Enviar mensaje 2', array(
>                                          'url' =>
> 'mensaje/new?receptor='.$miembro->getId().'&tipo=0&estado=0',
>
>                                         'update' => "$('#myDialog')",
>
>                                          'complete' =>
> '$("#myDialog").dialog({ height:530 });
>                                      ));
>
> When i click the link, i get in Firebug the message:
>
> $("#myDialog") is null
>
> and no dialog appears.
>
> Any idea?
>
> --
> Javi
>
> Ubuntu 8.04 - Symfony 1.3

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Getting the value of a field from an another template???

2010-06-04 Thread pghoratiu
You just set it up in the action of step3 so it's available in the
template.

   gabriel


On Jun 4, 3:12 pm, bedomon  wrote:
> Hi,
>
> I work on symfony 1.0.21, and get a probleme with a form.
> My form got 3 step with for each an execute and validate method in
> action class.
> Catching the value of a field in the action class is not a problem,
> but how i can get the value of a select tag of the first page in the
> template of the third page??
>
> Do you understand the problem ??
>
> thx

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfDoctrineGuardPlugin fails query upon doctrine:build --all

2010-06-03 Thread pghoratiu
Not sure if this solves it, check the type of data for id's used in FK
references in the schema:
int(4)
or
int
It should be of the same type for the FK to work.

   gabriel

On Jun 3, 11:25 pm, "Wheaton, James S"  wrote:
> I’m in the midst of updating to symfony 1.4.1-stable; using 
> sfDoctrineGuardPlugin 4.0.1-stable. When trying to do a doctrine:build –all, 
> it fails on this error:
>
>   SQLSTATE[HY000]: General error: 1005 Can't create table 
> 'notetolife.#sql-2ba_9d' (errno: 150). Failing Query: "ALTER TABLE 
> sf_guard_forgot_password ADD CONSTRAINT 
> sf_guard_forgot_password_user_id_sf_guard_user_id FOREIGN KEY (user_id) 
> REFERENCES sf_guard_user(id) ON DELETE CASCADE". Failing Query: ALTER TABLE 
> sf_guard_forgot_password ADD CONSTRAINT 
> sf_guard_forgot_password_user_id_sf_guard_user_id FOREIGN KEY (user_id) 
> REFERENCES sf_guard_user(id) ON DELETE CASCADE
>
> This seems to be something internal to the plugin. What can I do to fix it?
>
> Thanks in advance,
> James Wheaton

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfWidgetFormInputFileEditable: where is the code that removes the file?

2010-06-03 Thread pghoratiu
Check your class inheritance tree, it's defined in one of your ORM's
base classes,
depending on what you use:
Propel: symfony/lib/plugins/sfPropelPlugin/lib/form/
sfFormProppel.class.php
Doctrine: symfony/lib/plugins/sfDoctrinePlugin/lib/form/
sfFormDoctrine.class.php

Search for unlink().

gabriel

On Jun 3, 7:31 pm, Javier Garcia  wrote:
> Hi,
>
> by default, when you replace a file using sfWidgetFormInputFileEditable,
> the old file is removed from your hard disk.
>
> Where is that code that removes the file??
>
> --
> Javi
>
> Ubuntu 8.04 - Symfony 1.3

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: recursive redirect :-/

2010-06-03 Thread pghoratiu
You should store in the session the timestamp of the last request so
you can decide when to do the redirect for the user.

gabriel

On Jun 3, 12:44 pm, comb  wrote:
> Thanks, I solved it with the users session:
>
> // redirect to referrer if not in this action here
> if ($this->getUser()->getAttribute('in_search', false))
> {
>         $this->getUser()->setAttribute('in_search', false);
>         $this->redirect('@homepage');}
>
> else
> {
>         $ref = $request->getReferer();
>         if (empty($ref))
>         {
>                 $this->redirect('@homepage');
>         }
>         else
>         {
>                 $this->getUser()->setAttribute('in_search', true);
>                 $this->redirect($ref);
>         }
>
> }
>
> On 3 Jun., 05:57, Eno  wrote:
>
>
>
> > On Wed, 2 Jun 2010, comb wrote:
> > > But now there is a search-results page, too, that comes from the
> > > search-action, where the redirection is done. If the user starts a new
> > > search from here and is too fast he gets the flash-message again, but
> > > the redirect to the last page is recursively since he came from the
> > > same action as he's redirected to. In this case I want to redirect the
> > > user to @homepage, too. But I don't know, how to find out, if the
> > > referrer matches the current route.
>
> > What Ive done in the past is generate the URL for the current page and
> > store it in the session, so you can examine it in your action and take
> > appropriate action. Referer is really not reliable so I donbt use it.
>
> > --

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: batch import

2010-06-02 Thread pghoratiu
I have done something similar and the memory leak problem was
difficult to solve. In my case
it was due to circular references between objects and I always had to
use unset() explicitely on
individual objects after saving them into the database.
Make sure the objects you are trying to save do not reference each
other because they can not
be free-d by the PHP garbage collector, also PHP 5.3 is somewhat
smarter about memory recycling (compared to PHP 5.2).

If you can not figure out where the problem is you should go with SQL
data inserts.

   gabriel


On Jun 2, 6:00 pm, f1gm3nt  wrote:
> I'm looking into doing batch imports with a symfony task. The issues
> I'm having are seg faults and running out of memory. Even after
> jacking the memory limit to 2gigs. Has anyone else ever done batch
> imports using a symfony task that can shed some light on how they did
> it?
>
> -f1g

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: recursive redirect :-/

2010-06-02 Thread pghoratiu
You need to evaluate your routes into a module/action tuple, see the
last
example on this page:
http://pookey.co.uk/wordpress/archives/80-playing-with-symfony-routing-without-symfony
You can probably load the routes separately from the YAML as well.

 gabriel

On Jun 3, 12:24 am, comb  wrote:
> yeah but how can I check if the current page is the same as the user
> comes from?
>
> On 2 Jun., 21:20, Eno  wrote:
>
>
>
> > On Wed, 2 Jun 2010, comb wrote:
> > > In a executeIndex(...) I want to redirect to the referrer, but only if
> > > the referrer is not the current action.
> > > How can I do that?
>
> > > //...
> > >            $ref = $request->getReferer();
> > >            if ($ref != ...what do I need HERE?...)
> > >            {
> > >                    $this->redirect(empty($ref)?'@homepage':$ref);
> > >            }
> > >    }
> > > //...
>
> > > problem is that the getReferer() method returns not a route but a
> > > string with the whole http-uri incl. server etc..
>
> > That's right - that's what a referrer string 
> > is.http://en.wikipedia.org/wiki/HTTP_referrer
>
> > --

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Cache problem? I don't know

2010-06-02 Thread pghoratiu
Do you redirect after the form data is saved?
After a form is processed and data is saved the best practice is to
do  redirect to avoid the re-POST
of form data, make sure you have this.

   gabriel

On Jun 2, 7:44 pm, wueb  wrote:
> I'm having a problem with symfony on my server.
>
> Almost every action i do that goes to database i need make a F5 to the
> page to the modifications appear.
>
> For example, when i update a record from a table, when he goes to the
> show page he still have the old values, but if i make F5 the new
> values will appear.
>
> Same with logout for example. When i make logout i need press the
> logout butto and then make F5 to the logout take place.
>
> Any idea what's this?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Lucene-Search

2010-06-01 Thread pghoratiu
> @pghoratiu: Yeah I know about Solr, but I cannot use it, like I wrote
> in the first post :-(
>
> Is there an alternative PHP-Search-Engine to Zend Lucene?

Sphinx is a good alternative, I did not use it personally but my
colleagues have and they are content with it.

It very much depends on what exactly you try to accomplish, maybe the
in-database search is
enough for you if you have a small data set and have no special
requirements for the free text search part.
If this is the case you may consider also:
  - MySQL Free text search.
  - Doctrine Searchable behavio

   gabriel

> On 1 Jun., 21:53, pghoratiu  wrote:
>
>
>
> > Lucene is not slow, only the Zend PHP re-implementation of the Lucene
> > file format + search.
> > In my opinion it's close to unusable for real life scenarios (large
> > data set, fast indexing ...).
> > It probably would work ok for a small dataset such as < 1.
>
> > I recomend Solr as alternative which is Java Lucene service + XML API
> > for access (and much more).
>
> > As for the search part you need to define your exact document model,
> > the basic entity used in search is the document
> > that has several properties. There is usually one field to be used for
> > full text search and several other fields that
> > you use for structured search (e.g. date, tags).
>
> >     gabriel
>
> > On Jun 1, 8:13 pm, comb  wrote:
>
> > > Hi!
>
> > > I have 5 different Models that I want to be searchable.
> > > I don't know, how to implement the search right now. First thing I
> > > think of is Zend Lucene, but I read several times, that the
> > > performance is bad (cannot use the java implementation).
>
> > > No my question is: where is the limit of Zend Lucene? I expect about
> > > 1000-10.000 records per Model and a maximum of 100 search-requests per
> > > minute. (probably 1-10 per minute average)
> > > Can Zend Lucene handle that amount?
>
> > > Is there an other (PHP-)library that I could do the searching with, if
> > > Lucene is to slow?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


  1   2   >