|
Posted by Jerry Stuckle on 07/04/07 03:06
steven.rojas@gmail.com wrote:
> On 3 jul, 22:11, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> steven.ro...@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.
>> jstuck...@attglobal.net
>> ==================
>
> Thanks, but I'm not sure that is a problem server because I'm using
> the approach that is describe in the php.net examples, so I think that
> the implementation is correct. Also I didn't have problems with
> timeout in the server, I just prove that.
>
Actually, no, you haven't proven you don't have a timeout problem. All
you've proven is that you don't get a message back - which can also
occur if you have disabled message display.
The reason I suggest a new host is because you DO have a problem with
this host. The chat program is meant to run via ssh (or similar), and
you don't have that access.
You can try to work around your problems with this host until hell
freezes over, or you can get a host who can meet your needs.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|