well, i found a solution:
create a copy of the ./simfony executable and rename it filename.php .
add:
<?php
// add checks to prevent access to debug front controllers that are
deployed by accident to production servers.
$_SERVER['argv'] = array('./symfony','doctrine:build-all-reload','--
env=dev','--no-confirmation'); //this performs php symfony
doctrine:build-all-reload --env=dev --no-confirmation
$_SERVER['argc'] = count($_SERVER['argv']);
?>
before the content of the file. then call the file using wget and you
are done.
cheers Marco
On Jul 8, 3:18 pm, mbernasocchi <[email protected]> wrote:
> Hi, my (shared) hosting does not have PDO support in the CLI PHP (they
> have it using http) so i cant run the tasks that need pdo from it
> (like doctrine:build-all-reload --env=dev --no-confirmation).
> We use the server to have a (private) snapshot of our svn repository,
> after each commit a hook exports a fresh copy of the repository to be
> tested.
> I would like to be able to run the doctrine:build-all-reload task in
> the same post commit hook so that the DB gets initialized as well.
>
> my hoster said that there is no support for PDO from the CLI so I
> thought to write a php script to execute the task.
> Looking at some tasks I came up with something like this:
>
> <?php
> ini_set('include_path', ini_get('include_path').':/home/fotolion/
> nosoapnobubbles/dev/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
> lib/task/');
>
> require_once('sfDoctrineBuildAllReloadTask.class.php');
>
> $task = new sfDoctrineBuildAllReloadTask($this->dispatcher, $this->formatter);
>
> $ret = $task->run(array(), array('--env=dev', '--no-confirmation'));
> ?>
>
> now my problem is what 2 parameters to pass
> sfDoctrineBuildAllReloadTask($this->dispatcher, $this->formatter).
> The file would then be in the (password protected) web folder (like a
> controller) and executed via http after each commit.
>
> Any help?
> Cheers Marco Bernasocchi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---