2, December 2008

Using exec() func problem - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  PHP Whois script (Moderator: Olaf)
Topic: Using exec() func problem
« previous next »
Pages: [1] Print

Author 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">Visit through proxy">http://www.araby-host.com/new/whois/whois_example.php Visit through proxy " title="Visit through proxy">Visit through proxy" title="Visit through proxy">Visit through proxy
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
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.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6479
39706 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Feb 17, 2007, 04:01:03 PM »

hi and welcome at webdigity

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


Last blog : Just a better Internet portal provided by Google
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: Male
Posts: 6479
39706 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Feb 17, 2007, 10:23:55 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.



you should switch to a "mature" webhost (I know hosting companies offering real packages for only $12 a year)


Last blog : Just a better Internet portal provided by Google
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: Male
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.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
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: Male
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....

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6037
Tags : whois usage exec() hange page Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  PHP Whois script (Moderator: Olaf)
Topic: Using exec() func problem
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Dec 02, 2008, 08:26:51 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 37.937
Total Topics: 7.679
Total Members: 4.444
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: Naviator

29 Guests, 4 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.