sockobj.connect Errno 13 Permission denied

Joel Goldstick joel.goldstick at gmail.com
Sat Jan 26 14:52:37 CET 2013


On Sat, Jan 26, 2013 at 8:47 AM, Joel Goldstick <joel.goldstick at gmail.com>wrote:

>
>
>
> On Sat, Jan 26, 2013 at 6:19 AM, nobody <jupiter.hce at gmail.com> wrote:
>
>> Hi,
>>
>> I have a client program Client.py which has a statement of
>> sockobj.connect(), the port number 60000 is used, so no problem from port
>> permission.
>>
>> I am puzzled because I can run Client.py from command line in my user
>> account or apache user account without any problems.
>>
>> But if I run it from a web page http://localhost/client.php, the
>> client.php called exec("Client.py"),
>
>
>
> Check the arguments to exec.  I think it has to be an open file object.
>
>
>
>> then it got an exception of sockobj.connect Errno 13 Permission denied.
>>
>> Why it can run from command line, but cannot make connection from a web
>> file? Appreciate any tips and clues.
>>
>> Thank you.
>>
>> Kind regards.
>>
>>
>>
Maybe I spoke too soon.  You should probably be asking in a php forum since
what you are doing is running a php exec.  If you are actually getting a
python error you should show the code and the traceback so that someone can
look at your code.

In either case (py and php) it looks like exec needs either a string of
executable text or (in py case) an open file handle.  So the code you
describe isn't really what you are running

>
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
>
>
> --
> Joel Goldstick
> http://joelgoldstick.com
>



-- 
Joel Goldstick
http://joelgoldstick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130126/70636f15/attachment.html>


More information about the Python-list mailing list