Hi Folks
I wrote a little cli-app. No Problems so far on localhost (apache on windows), but it won't run on my hosting account (apche on linux).
I figured out, that's because the first if-statement in the contructor of JApplicationCli (wich is inherited from my cli class):
if (!defined('STDOUT') || !defined('STDIN') || !isset($_SERVER['argv']))
{
$this->close();
}
On my linux-account, it seems that STDIN and STDOUT are not defined explicit by the php-cli-environment. If I commented this statement out, the script works.
So, the question (to the server-experts out there) now is:
- Is that a exception, is my hosting-account not properly configuratetd? That would be no problem, then I do a workaround in the script and/or talk to my hosting-provider.
- Or is that a common possible environment configuration? If so, then we have to change that statement in JApplicationCli, I think, to deal with those cases of server-configs too.
Any toughts, tipps and hints are welcome,
as I am not a server geek ;)
Cheers
Roger
--
You received this message because you are subscribed to the Google Groups "Joomla! Platform Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-plat...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-platform+unsub...@googlegroups.com.
Hi Folks
I wrote a little cli-app. No Problems so far on localhost (apache on windows), but it won't run on my hosting account (apche on linux).
I figured out, that's because the first if-statement in the contructor of JApplicationCli (wich is inherited from my cli class):
if (!defined('STDOUT') || !defined('STDIN') || !isset($_SERVER['argv']))
{
$this->close();
}
On my linux-account, it seems that STDIN and STDOUT are not defined explicit by the php-cli-environment. If I commented this statement out, the script works.
So, the question (to the server-experts out there) now is:
- Is that a exception, is my hosting-account not properly configuratetd? That would be no problem, then I do a workaround in the script and/or talk to my hosting-provider.
- Or is that a common possible environment configuration? If so, then we have to change that statement in JApplicationCli, I think, to deal with those cases of server-configs too.
Any toughts, tipps and hints are welcome,
as I am not a server geek ;)
Cheers
Roger
--
You received this message because you are subscribed to the Google Groups "Joomla! Platform Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-plat...@googlegroups.com.
I would guess that php is compiled as cgi where stdin and stdout are not defined.
I would guess that php is compiled as cgi where stdin and stdout are not defined.
On Mar 24, 2013 7:01 PM, "Andrew Eddie" <mamb...@gmail.com> wrote:
Sounds like it's a buggy PHP implementation on your host.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - free tutorials and videos on Joomla development
On 25 March 2013 02:38, Roger Abt <klamm...@gmail.com> wrote:
Hi Folks
I wrote a little cli-app. No Problems so far on localhost (apache on windows), but it won't run on my hosting account (apche on linux).
I figured out, that's because the first if-statement in the contructor of JApplicationCli (wich is inherited from my cli class):
if (!defined('STDOUT') || !defined('STDIN') || !isset($_SERVER['argv']))
{
$this->close();
}
On my linux-account, it seems that STDIN and STDOUT are not defined explicit by the php-cli-environment. If I commented this statement out, the script works.
So, the question (to the server-experts out there) now is:
- Is that a exception, is my hosting-account not properly configuratetd? That would be no problem, then I do a workaround in the script and/or talk to my hosting-provider.
- Or is that a common possible environment configuration? If so, then we have to change that statement in JApplicationCli, I think, to deal with those cases of server-configs too.
Any toughts, tipps and hints are welcome,
as I am not a server geek ;)
Cheers
Roger
--
You received this message because you are subscribed to the Google Groups "Joomla! Platform Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-platform+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Joomla! Platform Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-platform+unsub...@googlegroups.com.