Sublime directory Surf the web anonymous Pagerank Monitor


Using exec() func problem

AbuOways
Sat 17 February 2007, 02:22 pm GMT +0100
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.


http://www.araby-host.com/new/whois/whois_example.php

Nikolas
Sat 17 February 2007, 02:26 pm GMT +0100
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.

olaf
Sat 17 February 2007, 03:01 pm GMT +0100
hi and welcome at webdigity

use the the "win" mode on the hosting with problem (it's var inside the class file)

AbuOways
Sat 17 February 2007, 08:03 pm GMT +0100
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.

olaf
Sat 17 February 2007, 09:23 pm GMT +0100
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)

AbuOways
Sat 17 February 2007, 09:59 pm GMT +0100
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.

Nikolas
Sun 18 February 2007, 01:49 am GMT +0100
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.

AbuOways
Sun 18 February 2007, 05:03 am GMT +0100
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

AbuOways
Mon 19 February 2007, 12:52 pm GMT +0100
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?!

Nikolas
Mon 19 February 2007, 01:08 pm GMT +0100
If you can't use the whois port, then there is nothing you can do no matter if exec() is allowed or not....

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional