Topic: Using exec() func problem (Read 1756 times)
Total Zero
Posts: 5
34 credits Members referred : 0
« on: Feb 17, 2007, 03:22:34 PM »
I tried the whois script, put when i check a domain name and click on whois submit, the page remain loading and didnt get any result, it seems to be hanged.
when i try the same script in another server it worked, and return the result in a second.
i tried to search in PHP help and community, and i found that the problem is may be in the exec() function in the class, but accuratly i dont know the resone specifically, please contact me with my email above if you have a solution for me.
" title="Visit through proxy">">http://www.araby-host.com/new/whois/whois_example.php " title="Visit through proxy">" title="Visit through proxy">
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8266
42583 credits Members referred : 3
« Reply #1 on: Feb 17, 2007, 03:26:50 PM »
Some host don't allow exec for security reasons, or the php user can't use the whois command using exec()
To prevent this you need to use sudo, but one way or another you should contact your host regarding that.
Total Zero
Posts: 5
34 credits Members referred : 0
« Reply #3 on: Feb 17, 2007, 09:03:38 PM »
I used the "win" mode but it didnt work, The functions (@fsockopen(), fputs(), feof(), fgets()) may also prevented from my host provider, I will go to support section.
thanks for replay, and if you have another solution plz post it.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6479
39706 credits Members referred : 374
I used the "win" mode but it didnt work, The functions (@fsockopen(), fputs(), feof(), fgets()) may also prevented from my host provider, I will go to support section.
you should switch to a "mature" webhost (I know hosting companies offering real packages for only $12 a year)
Total Zero
Posts: 5
34 credits Members referred : 0
« Reply #5 on: Feb 17, 2007, 10:59:36 PM »
Im using IXwebhosting.com and i search about it before registration and all rank sites show the best web hosting is it, and i ask my friends, and i need for ssh but it didnt provide it put i finally register with it.
and i talk with support and he didnt found any solution and i told hem about (allow_url_fopen) and he told me that they have php 4.4 and it should be enabled by default, and finally he told me to go to ticket section, the admin will help me.
Also when i try to include remote file using include() func it return error.
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8266
42583 credits Members referred : 3
« Reply #6 on: Feb 18, 2007, 02:49:22 AM »
Those are security measurements that your host take, and believe me they are very reasonable.
Remote includes can really harm you when you write code like include $_GET['something']; It is called cross site scripting and it is one of the most common ways that "hackers" use to deface sites. The same goes for exec() too, but the socket commands should be enabled.
Total Zero
Posts: 5
34 credits Members referred : 0
« Reply #7 on: Feb 18, 2007, 06:03:31 AM »
Hi.
Thanks for posting a solutions for me, i try the last method ( include $_GET['something']; ) to load the whois class from my another server which the script work on it (1and1) and it return errors:
Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/share/pear') in /hsphere/local/home/arabyhos/araby-host.com/new/whois/whois_example.php on line 2
its like the error appear when i use the normal include method for remote files, may i dont understand the syntex, but i use the form above and no way.
Realy thanks for helping me
Total Zero
Posts: 5
34 credits Members referred : 0
« Reply #8 on: Feb 19, 2007, 01:52:04 PM »
Hello,
I send a ticket to my host with the problem, then they replay me with the following: ==================================================== Hello, ......... Thank you for the word to support.
Note that 43 port (whois port) is closed by default on our firewalls. So please provide us list of remote hosts, prt number and protocol type (TCP or UDP). Also all functions which you mentioned above are allowed on our server, so provide us examples whee we can see a problems.
Respectfully, Igor Blumental Technical Support, 24*7 Helpdesk / Online Chat ==================================================== so i don't understand what they mean by "provide us list of remote hosts, prt number and protocol type", if there any solution for my problem?!
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8266
42583 credits Members referred : 3
« Reply #9 on: Feb 19, 2007, 02:08:06 PM »
If you can't use the whois port, then there is nothing you can do no matter if exec() is allowed or not....