Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell drive driver drivers email error ethernet excel firefox firefox 3 freeze hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition password problem router slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Error on ping script.


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
vipernet's Avatar
Senior Member with 109 posts.
 
Join Date: Aug 2007
06-Oct-2007, 10:43 AM #1
Error on ping script.
Good day all,

I have a php script that pings an IP address, but i get an error
"Warning: shell_exec() has been disabled for security reasons in /home/ancientc/public_html/dt08/pinger/includes/main.php on line 14"

In my script im using Shell_exec

PHP Code:
$cmd shell_exec("ping -n ".$times." -w ".($tout 1000)." $ip"); 
Would i be getting this error becuase my hosting service might have this turned off or something?

Becuase i have also tried

PHP Code:
system ("ping -w 10 -c 5 $_domain"); 
For a code and still getting system warning error.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
06-Oct-2007, 02:22 PM #2
Yeah, talk to your hosting.
haswalt's Avatar
Computer Specs
Senior Member with 416 posts.
 
Join Date: Nov 2004
Location: South Coast, UK
Experience: Advanced
08-Oct-2007, 12:58 PM #3
Most concienicous hosts will disable all shell and system code from php, these built in functions are a major security issue as they allow direct access from the page to the system.

It's very likely that your host will not allow these functions to be enabled as it's too risky but there are ways round it. I ping ips using this:

I'm not at my home pc so can't find the script but here are some examples using sockets instead of system (which you shouldn't use anyway):

http://www.planet-source-code.com/vb...txtCodeId=1786

http://articles.techrepublic.com.com...2-5234592.html

Thanks

Harry
__________________
LQD Internet Limited
We've just got better! With the launch of our new site we have SLASHED our prices and upped the offering. Check it out!

10% Discount for ALL Tech Support Guy Members
Simply use the promo code of "T3CHGUY" when ordering to recieve your 10% discount on all shared and reseller hosting packages.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:49 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.