<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 26, 2013 at 8:47 AM, Joel Goldstick <span dir="ltr"><<a href="mailto:joel.goldstick@gmail.com" target="_blank">joel.goldstick@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Sat, Jan 26, 2013 at 6:19 AM, nobody <span dir="ltr"><<a href="mailto:jupiter.hce@gmail.com" target="_blank">jupiter.hce@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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.<br>
<br>
I am puzzled because I can run Client.py from command line in my user account or apache user account without any problems.<br>
<br>
But if I run it from a web page <a href="http://localhost/client.php" target="_blank">http://localhost/client.php</a>, the client.php called exec("Client.py"), </blockquote><div><br><br></div></div><div>Check the arguments to exec.  I think it has to be an open file object.<br>

<br> <br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">then it got an exception of sockobj.connect Errno 13 Permission denied.<br>
<br>
Why it can run from command line, but cannot make connection from a web file? Appreciate any tips and clues.<br>
<br>
Thank you.<br>
<br>
Kind regards.<br>
<span><font color="#888888"><br>
<br></font></span></blockquote></div></div></div></div></blockquote><div><br></div><div>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. <br>
<br></div><div>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<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font color="#888888">
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br>
</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div>