Reply to Re: php ->sh ->php

Your name:

Reply:


Posted by Andy Hassall on 10/04/06 00:46

On Tue, 03 Oct 2006 13:27:23 +0200, Georg Weiler <georg116@gmx.at> wrote:

>I'm trying the following without success:
>
>I start a php script in the browser, that starts a shellscript, which
>starts a second php script. As a result, I want to show the output of
>the second php script in my browser. It works perfect on the shell
>command line, but in the browser, the shellscript hangs!?!

Hangs? Or just doesn't output anything?
>
>I start the whole thing with the file file 'first.php':
>
>
>first.php:
><?
>$shell_output = shell_exec("/my_path/shellskript.sh");
>?>

This script doesn't output anything - you'd need to print out the
$shell_output variable.

>shellskript.sh:
>#!/bin/bash
>/usr/bin/php /my_path/second.php
>
>
>second.php:
><?
>echo "Hello World";
>?>
>
>Anyone with ideas, why this is not working?
>
>regards,georg.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация