I use the following code to make Propel 1.4 works in a php file.

what should i do to make sure DatabaseManager delete correctly after its work?

shutdown at the end of the php file??

what will happen if there are multiple accesses to the same php file at the same time?



$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false);
$dbManager = new sfDatabaseManager($configuration);
//start db access
Was it helpful?


I'm not sure I understand your question. If you want to make sure the connection is closed at the end of the script, you should not worry, since this is the default for a PDO connection (PHP will automatically close the connection when your script ends).

If multiple clients connect to your site, multiple connections to the database will be made. This is not a problem, the database will handle the concurrency.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow