[symfony-users] Re: How to upload a database to the production server with symfony ?

2010-02-05 Thread James Cauwelier
Yep, just mysqldump although that 's only half the story. After export, you need to import. Beste way to do this is with command line. Add following code to your export SQL file: USE `db_name`; Run following command: mysql --user=username -p < /location/of/export/file.sql This will impo

[symfony-users] Re: REST webservices

2010-04-06 Thread James Cauwelier
You can manipulate headers and so on all by yourself in Symfony. There is no component in Symfony that delivers API functionality by default, not for REST and not for SOAP. There is a plugin for it: http://www.symfony-project.org/plugins/sfRestAdminPlugin I wouldn 't recommend the plugin, because

[symfony-users] Re: Zend et Symfony

2010-04-28 Thread James Cauwelier
Do you have the Zend_Pdf classes in your path? In other word, when you only downloaded the pieces of the framework you need, there is a good chance that you forgot to download the Zend_Pdf component. Sometimes the most obvious things gives us the most trouble. James On Apr 26, 3:38 pm, Omar El

[symfony-users] Re: Symfony 2 Documentation or Tutorials

2010-05-04 Thread James Cauwelier
lol... Anyway, the reasoning of the poster is not hard to understand. Learning a new framework takes time and effort and you don 't want to study information that will be old in just a few months. Well, you 'll have to start with sf1.4 and see how it goes. sf1.4 will stick around for some time s

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

2010-06-27 Thread James Cauwelier
It 's difficult to answer these questions without a clue to the nature of these problems. First thing to check is indeed how it was installed, which version and from there you could consult the docs for the symfony version you use. Importing won 't be necessary, but it could be that you have to m

[symfony-users] Re: sfShoppingCart

2010-07-08 Thread James Cauwelier
Are you using an exit(); or redirect after clearing the cart? Working on the object might change the object itself without propagating those changes to your session. Find out which method will save the current state to the session and call it before redirecting (if that is your problem) Good lu

[symfony-users] Re: Install plugins programmatically?

2010-08-12 Thread James Cauwelier
It is possible to enable a plugin from the projectConfiguration methods, but nobody dictates that the plugin names should be hardcoded there, you could use a configuration XML for instance... The code below does not work, but illustrates the principle. There is also more than one way to do this.

[symfony-users] Re: Install plugins programmatically?

2010-08-13 Thread James Cauwelier
gt; > On 13 Aug., 14:57, Gustavo Adrian wrote: > > > Hi James. I was thinking and something like that too. What I don't know is > > how to enable the modules of the plugin programmatically. Is there available > > a method for this purpose? > > > Thanks! > &

[symfony-users] Re: organizing partials in folders

2010-08-24 Thread James Cauwelier
You can support it yourself: 1. Disable standard Partial helper in the settings.yml 2. Copy the partial helper from the symfony lib and adjust to suit your needs. You will probably want to create a new view class that inherits from sfParialView Good luck with it... James On Aug 24, 6:06 pm,

[symfony-users] Re: How to populate data from an array?

2008-09-11 Thread James Cauwelier
Hi, There is a function special made for this 'fromArray'. I didn't test the following code, but it should work, I think. function arrayToObject ($values) { $object = new Object (); $object->fromArray ($values, BasePeer::TYPE_FIELDNAME); $object->save(); return $object; } $your_objec

[symfony-users] Re: Partial helper in symfony 1.1 task

2008-11-03 Thread James Cauwelier
I think I 've got it. I added the following to the task execute method: $context = sfContext::createInstance($this->configuration); On 3 nov, 15:47, James Cauwelier <[EMAIL PROTECTED]> wrote: > Thanks Jamie, that helps... > > Could you also help me with the following

[symfony-users] Re: Partial helper in symfony 1.1 task

2008-11-03 Thread James Cauwelier
pers('Partial'); > > -- Jamie > > On 3 Nov, 12:53, James Cauwelier <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I want to send emails from a task, but need the partialhelper to be > > available in this class.  The cookbook on the symfony site is

[symfony-users] Partial helper in symfony 1.1 task

2008-11-03 Thread James Cauwelier
Hi, I want to send emails from a task, but need the partialhelper to be available in this class. The cookbook on the symfony site is rather vague about this. Can somebody show me some working code for emailing from a task? Here is some of my task code: protected function execute($arguments =

[symfony-users] Re: Cache question

2009-02-22 Thread James Cauwelier
It wouldn 't be slower, but come with other difficulties. Think about what happens when you want to clear the cache. You would have to remove a huge number of files which would take quite a while. This does not have to be a problem, but it may be that you won't be able to clear the cache with t

[symfony-users] Re: Sending Email from CLI task in Symfony 1.2

2009-03-04 Thread James Cauwelier
Here 's some code of mine, although I use it on sf1.1. It should work on 1.2 as far as I know namespace= 'send'; $this->name = 'resetPassword'; $this->briefDescription = 'Send reset password emails'; $this->detailedDescription = <

[symfony-users] Re: Symfony Production Performance improvements

2009-03-07 Thread James Cauwelier
Hi, There are some good ideas in this post, but they don't have a lot of value if you haven 't identified your bottelenecks first. Did you run this website on an isolated VPS or dedicated server? In that case, you could look at the processes taking the most resources. If your database is in f

[symfony-users] Re: Symfony Production Performance improvements

2009-03-07 Thread James Cauwelier
doesn't get read on every single request... > > On 7 Mar 2009, at 15:00, James Cauwelier wrote: > > > > > Hi, > > > There are some good ideas in this post, but they don't have a lot of > > value if you haven 't identified your bottelenecks first.

[symfony-users] Re: Shopping cart

2009-04-19 Thread James Cauwelier
What exactly do you mean with 'shopping cart'? Does this include processing payments? Or do you just want some classes for filling up and changing the cart 's content? In that case, look at the following plugin: http://www.symfony-project.org/plugins/sfShoppingCartPlugin Some documentation: htt

[symfony-users] Re: Zend Search scalability

2009-05-11 Thread James Cauwelier
Hi, Maybe I can help you out? I 've built an index, using Xapian, on about 1.5 - 2 million products (books, CD, DVD). I am not having these scalability issues, but Xapian does require that you have a dedicated server of VPS to install. Take a look at http://xapian.org/ People are very helpfu

[symfony-users] Re: Search engine

2009-05-13 Thread James Cauwelier
It depends. What types of fulltext queries do you want to run? Do you need spelling correction, stemming, ...? Do you need the title to have a higher weight than the description? What type of content do you want to index (articles, books, products, ...)? What is the number of items you want t

[symfony-users] Re: Best Practices for Schema Changes

2009-05-21 Thread James Cauwelier
With a small database this approach would work just fine. From time to time I have to change the schema on a database with tables as large as 6 million rows. Adding a row or an index is not someting that you do on the live database. It is just too risky and takes a long time. Not so long ago I

[symfony-users] Re: Best Practices for Schema Changes

2009-05-24 Thread James Cauwelier
I did some research and it turns out that the master solution in my earlier response should work. Just make sure that your application doesn 't use 'unnamed insert/update', always use the column names for update/insert. More information on the mysql performance blog: http://www.mysqlperformance

[symfony-users] Re: why don't view other functions in symfony

2009-05-29 Thread James Cauwelier
I don 't understand your question. What is it exactly that you are trying to do? James On May 28, 7:26 pm, Romildo Paiter wrote: > Hi all, > > This code below is my action.class.php > > { > >   //Exibe a as informações da pagina >   public function executeIndex(sfWebRequest $request) >   { > >

[symfony-users] Re: why don't view other functions in symfony

2009-05-29 Thread James Cauwelier
exandru-Emil Lupu > wrote: > > > > > as James said: "What is the question?" > > maybe try to write into > > > notprincialSuccess.php > > > > var_dump($data); > > ?> > > > and then try to callhttp://your_url/your_env_dev/

[symfony-users] Re: about Doctrine vs Propel performance

2009-07-03 Thread James Cauwelier
If performance is important, then don 't use an ORM. You are just gonna get yourself into trouble. A good midway solution could be to use an ORM for your backoffice, but to use simple queries for your frontend. Take this into account when desiging your tables. Suppose a product has a limited l

[symfony-users] Re: about Doctrine vs Propel performance

2009-07-04 Thread James Cauwelier
Indeed, it 's al about trade-offs. When using something like doctrine, you are effectively choosing for speed in development while sacrificing some performance of your application. If you must choose an ORM (which I often do myself), then choose doctrine. Not for speed or performance reasons, b

[symfony-users] Re: How to handle async. background-tasks initiated by the frontend..

2009-07-08 Thread James Cauwelier
The solution of Stefan is perfect. If you were executing through an exec() call, then a simple queue will fit your needs just fine. If no need to execute a task, then just add it to the queue, which is basically a list of tasks to be executed: 1. clear cache task 2. custom db cleaning task 3. c

[symfony-users] Re: using doctrine task without CLI

2009-07-09 Thread James Cauwelier
$task = new Task (new sfEventDispatcher, new sfFormatter); $task->run($arguments, $options); should do the trick. if it complains about not being in the correct dir, use a chdir() call to the symfony root directory. To know in which format to put the arguments and options array, try to execute

[symfony-users] Re: backend inside a sub folder

2009-07-09 Thread James Cauwelier
Best solution would probably be to edit .htaccess, so that every URL starting, with 'admin' is routed to admin/backend.php, and then you would would be able to link to images in the directory beow it. On Jul 9, 12:27 pm, Sid Ferreira wrote: > Maybe   way to add a prefix to the URL, even before t

[symfony-users] Re: backend inside a sub folder

2009-07-10 Thread James Cauwelier
dmin > folder (ie: images provided by the admin generator, which would be at / > admin/plugins/sfProtocolousPlugin/images/). If that is the case, those > should obviously not be rewritten. I guess there should be an extra > rule for that, right? > > Cheers > > Juan > >

[symfony-users] Re: Use Plagin from Different ORM

2009-07-14 Thread James Cauwelier
No, it is not possible. In theory though, you can activate both the sfPropelPlugin and sfDoctrinePlugin, but you could run into issues. Then you would have 2 separate systems to manage your data and I doubt that is what you want. You will have to rewrite the functionality or find a similar plugi

[symfony-users] Re: Rebuilding model

2009-07-21 Thread James Cauwelier
I don 't think you should. Database access should be abstracted in Doctrine. However, rebuilding never hurts, except when you have a huge database. You do have to make sure the tables are present in the database, but that 's pretty obvious. James On Jul 21, 6:20 pm, Rytis Daugirdas wrote: >

[symfony-users] Re: symfony extensible model for other data source than default ORM (API, SOAP WS, CouchDB...)

2009-08-04 Thread James Cauwelier
I 'd think that simple CRUD actions wouldn 't be hard to abstract. Especially with RESTful interfaces like the ones used in couchDB. If the four HTTP methods are supported by your data source (GET, PUT, POST and DELETE), then all that would be needed is an CRUD interface that all data sources sho

[symfony-users] Re: Best way to learn Symfony

2009-08-12 Thread James Cauwelier
If you feel like you 're struggling with doctrine rather than symfony, the following is recommended: http://www.symfony-project.org/doctrine/1_2/en/ I wouldn 't recommend Jobeet without first skimming through " The Definitive Guide to Symfony " James On Aug 12, 5:01 am, Eno wrote: > On Tue,

[symfony-users] Re: Best way to learn Symfony

2009-08-12 Thread James Cauwelier
ncepts apply > to PHP, and definitely symfony. > > If those sound like overkill, then you might want to start with a > quick online article on the Model View Controller design pattern. > > On Wednesday, August 12, 2009, James Cauwelier > > wrote: > > > If

[symfony-users] Re: using JSON and Proptype

2009-08-21 Thread James Cauwelier
Have you tried to run the page outside of the AJAX request? What errors do you get? Maybe return $this->renderText(json_enconde($resultado)); should be return $this->renderText(json_encode($resultado)); James On Aug 20, 10:20 pm, germana wrote: > Please !!! somebody knows about JSON ?

[symfony-users] Re: Call For Information Re-organization [opinions needed]

2009-09-28 Thread James Cauwelier
> Put comments on the manual and you will see I completely agree with previous post! --~--~-~--~~~---~--~~ 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@googl

[symfony-users] Re: List of ebooks for symfony

2009-09-30 Thread James Cauwelier
What are you looking for in particular? All documentation is available from the symfony website. Other documentation is available in the form of individual blog posts, but there are search engines for that. James On Sep 30, 4:43 am, Ehsan wrote: > Hi all > Please enter name and url of all ebo

[symfony-users] Re: Symfony BugHuntDay - Who 's coming?

2009-11-05 Thread James Cauwelier
> > I will be coming, although my skill in Symfony isn't that good yet,   > > I hope to learn a lot from the masters. ;-) > > > 2009/11/5 James Cauwelier > > > Dear colleagues, > > > I am writing this message to poll who 's coming to the Symfony > &g

[symfony-users] Re: Symfony Documentation / Api / Wiki

2009-11-06 Thread James Cauwelier
Symfony has much better documentation than other open source projects! That being said, there is always room for improvement although you should probably post your suggestions on the mailing list dedicated to symfony documentation http://groups.google.com/group/symfony-docs I think you should joi

[symfony-users] Re: approve comments clicking on checkboxes using AJAX - should I use Symfony forms ?

2009-12-28 Thread James Cauwelier
Well, I wouldn 't use the remote function since it 's deprecated. And yes, you could use the form framework for this. The 'normal way' of constructing a symfony form is to build your widget schema using the configure () method and nothing prevents you to put a loop in that method. If this behavi

[symfony-users] Re: How can I use a different routing.yml for each language?

2008-07-10 Thread James Cauwelier
You need to build a controller for each language and then override the file structure. So you would need an application for each language instead of one for frontend and one for backend. To pull this off you should customize your file structure in the config.php of your application, so that you