You are here: Re: Help with a socket script execution « PHP Programming Language « IT news, forums, messages
Re: Help with a socket script execution

Posted by Jerry Stuckle on 07/04/07 02:11

steven.rojas@gmail.com wrote:
> On 3 jul, 21:47, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> steven.ro...@gmail.com wrote:
>>> On 3 jul, 21:14, Iván Sánchez Ortega <ivansanchez-...@rroba-
>>> escomposlinux.-.punto.-.org> wrote:
>>>> steven.ro...@gmail.com wrote:
>>>>> I have a chat application based on PHP and Flash, I know that is
>>>>> necessary execute the socket server script from the console (#!/usr/
>>>>> local/bin/php -q), but my problem is that I don't have SSH access to
>>>>> the server [...]
>>>> Meet your new friend, php.net/exec .
>>>> And, if you're out of luck (i.e. the server runs with safe_mode on), you can
>>>> always rely on the (very) dirty trick of using a "Connection: close" HTTP
>>>> request, along with some PHP magic so the script doesn't die when the HTTP
>>>> connection is actually closed. I suggest you to do some research about
>>>> that.
>>>> --
>>>> ----------------------------------
>>>> Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>>>> http://acm.asoc.fi.upm.es/~mr/;http://acm.asoc.fi.upm.es/~ivan/
>>>> MSN:i_eat_s_p_a_m_for_breakf...@hotmail.com
>>>> Jabber:ivansanc...@jabber.org ; ivansanc...@kdetalk.net
>>> I have luck!! my server is not compiled with safe_mode off... could
>>> you give me a few details about how to use exec command? This command
>>> only execute something and finish it execution or wait until the
>>> command finish? I try with the following doesn't work:
>>> <?php
>>> $command = $APP_PATH . "/controllers/chat.php";
>>> exec($command);
>>> echo("done...");
>>> ?>
>>> when I execute the script, the browser never finished the script I
>>> couldn't see "done..."
>> That means your chat.php script didn't complete before you PHP timeout
>> value.
>>
>> Is this script supposed to be running all the time?
>>

>
> Yeap... is a server chat so is necessary that it runs all the time. In
> order to avoid th timeout I'm using set_time_limit(0). The script is
> running inside a while(true){} loop.
>
> Steven
>

If your host is at all competent, they won't allow you to override the
timeout value.

Looks like you need to change hosts or get a different chat program.

Note: A lot of shared hosts won't let you run a program like this
because of all of the resources it takes. Even some of the VPS's I use
want to know about such scripts beforehand.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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