[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-04-02 Thread Tomasz Ignatiuk
for $last_line = system(dir \\, $retval); there is FusionCharts frontend.php js sfProtoculousPlugin backend.php frontend_dev.php robots.txt sf_cc_webscript.php backend_dev.php imagessfFormExtraPlugin uploads css index.php

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-04-02 Thread Tomasz Ignatiuk
OK, It's working :) Thank you Yevgeniy for your help and your patience :) ?php require_once '/home/users/iwitch/public_html/pd/lib/symfony/autoload/ sfCoreAutoload.class.php'; sfCoreAutoload::register(); ? ?php chdir('../'); $fs = new sfFilesystem(); $res = $fs-sh('php symfony cc'); echo

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-04-01 Thread Tomasz Ignatiuk
For the first line there is Last line of the output: -- Return value: 1 for second nothing, because \ just escapes ' I don't think this method will work out. Don't know why sh cut off slashes, path to php is good because admin gave it to me.

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-04-01 Thread Yevgeniy A. Viktorov
Ok, but how about this: $last_line = system('dir \\', $retval); p.s. it's not yet time to stop, ideas still coming... :) passthru and system seems to be allowed on your system, the only issues I see so far is back slash problem and wrong path to php(or maybe we writing it wrong). for now we can

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-04-01 Thread Tomasz Ignatiuk
FusionCharts frontend.php js sfProtoculousPlugin backend.php frontend_dev.php robots.txt sf_cc_webscript.php backend_dev.php imagessfFormExtraPlugin uploads css index.php sfPropelPlugin -- Last

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-04-01 Thread Yevgeniy A. Viktorov
Hm, backslash problem... Can you also check how phpinfo looks like: echo phpinfo(); Mainly how others paths looks like, e.g. with back or forward slash? Oh, and just try this one $last_line = system(dir \\, $retval); // Double quotes, pls! Thanks. Tomasz Ignatiuk wrote: FusionCharts

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
This looks nice, but not working. Maybe because this is Windows server and it has something to do with shell commands? Fatal error: Uncaught exception 'sfException' with message 'Problem executing command sh: line 1: /etc/php5/apache2: is a directory ' in /

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Yevgeniy A. Viktorov
Fatal error: Uncaught exception 'sfException' with message 'Problem executing command sh: line 1: */etc/php5/apache2: is a directory* Make sure you have correct command, for example first parameters must be full path to php binary, NOT directory. Let me know how your $command var finally looks,

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
Command: c:\php5\php.exe -c -n c:\windows\php-isapi.ini /home/users/iwitch/ public_html/pd cc My project is in /home/users/iwitch/public_html/pd I use '/' because this is how symfony shows errors This is for PHP5 on my server. Asmin gave me this path: c: \php5\php.exe -c -n

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Yevgeniy A. Viktorov
Yes, now I see windows :) And now it's another error: Fatal error: Uncaught exception 'sfException' with message 'Problem executing command sh: line 1: c:php5php.exe: command not found ' See line 1: c:php5php.exe: command not found? This is actual error. It lost \ from $command var. Try to use

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
I thought it should be a path to project, hehe. So now there is c:/php5/php.exe -c c:/windows/php-isapi.ini /home/users/iwitch/public_html/pd/lib/symfony/command/cli.php cc *Fatal error*: Uncaught exception 'sfException' with message 'Problem executing command sh: line 1: c:/php5/php.exe: No

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Yevgeniy A. Viktorov
c:/php5/php.exe will not work for windows: But c:\\php5\\php.exe a must. Let's simplify, for example: ?php require_once 'path/to/symfony/autoload/sfCoreAutoload.class.php'; sfCoreAutoload::register(); $fs = new sfFilesystem(); $res = $fs-sh('c:\\php5\\php.exe -v'); echo $res; Let me know

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
I used \, then \\ and each time it is stripped out *Fatal error*: Uncaught exception 'sfException' with message 'Problem executing command sh: line 1: c:php5php.exe: command not found ' in /home/users/iwitch/public_html/pd/lib/symfony/task/sfFilesystem.class.php:291 Stack trace: #0

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Yevgeniy A. Viktorov
Ok, try this: ?php echo 'pre'; $last_line = system('c:\\php5\\php.exe -v', $retval); echo ' /pre hr /Last line of the output: ' . $last_line . ' hr /Return value: ' . $retval; Tomasz Ignatiuk wrote: I used \, then \\ and each time it is stripped out *Fatal error*: Uncaught exception

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
It returned -- Last line of the output: -- Return value: 127 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
FusionCharts frontend.php js sfProtoculousPlugin backend.php frontend_dev.php robots.txt sf_cc_webscript.php backend_dev.php imagessfFormExtraPlugin uploads css index.php sfPropelPlugin -- Last

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Yevgeniy A. Viktorov
Cool, it works Still to find php.exe ;) Try this: ?php echo 'pre'; $last_line = system('php.exe -v', $retval); echo ' /pre hr /Last line of the output: ' . $last_line . ' hr /Return value: ' . $retval; Can you verify anyhow if this is correct path? c:\\php5\\php.exe Or, try also this: ?php

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
for $last_line = system('php.exe -v', $retval); $last_line = system('dir c:\\php5', $retval); $last_line = system('dir c:\\php\\php5', $retval); there is -- Last line of the output: -- Return value: 127 -- Last

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Yevgeniy A. Viktorov
How about $last_line = system('dir c:\\', $retval); or maybe $last_line = system('dir c:\', $retval); Tomasz Ignatiuk wrote: for $last_line = system('php.exe -v', $retval); $last_line = system('dir c:\\php5', $retval); $last_line = system('dir c:\\php\\php5', $retval); there is

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Steve Browett
I usually create a module in the backend called 'tools', with a bunch of actions in there for maintenance tasks which I can call from the browser. All you need to do is make an action which clears out the cache directory recursively (make sure you use use sfConfig::get('sf_cache_dir')). This

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Pablo Godel
On Mon, Mar 30, 2009 at 10:34 AM, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote: Did anyone tried to clear cache without CLI anf FTP? It takes some time for FTP client to log in, go to symfony project, list all catalogs and subdirectories in cache and delete them. So I am thinking how about

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Tomasz Ignatiuk
Pablo, this is a great tool, but not for use. It is only installed on this hosting. Steve, that is a good idea, but clearing cache task is a normal php class, so that it can be done by creating a new object for this task and use some methodsI think

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Eno
On Mon, 30 Mar 2009, Steve Browett wrote: This should take no more than a few seconds to run. Depends on the site really. We couldn't do that for our project because the cache is several Gb and calling an action from a browser would probably time out :-) --

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Tomasz Ignatiuk
Oh wow ;P 2009/3/30 Eno symb...@gmail.com On Mon, 30 Mar 2009, Steve Browett wrote: This should take no more than a few seconds to run. Depends on the site really. We couldn't do that for our project because the cache is several Gb and calling an action from a browser would probably

[symfony-users] Re: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Yevgeniy A. Viktorov
It's might looks like this: http://gist.github.com/88008 Thanks. Tomasz Ignatiuk wrote: Did anyone tried to clear cache without CLI anf FTP? It takes some time for FTP client to log in, go to symfony project, list all catalogs and subdirectories in cache and delete them. So I am thinking