From: Richard L. <ce...@l-...> - 2010-01-07 06:03:50
|
Use exec. The big reason is that exec() lets you pass in two more parameters, and it fills them up with a) the output from the shell and b) the error code returned from the shell. Said error code can be researched to guess what went wrong. $command = "nohup /home/content/t/e/x/textconn/html/sms/sendmessages.pl &"; exec($command, $output, $error); if ($error){ echo "<pre>"; var_dump($output); echo "</pre>"; echo "OS Error: $error"; } If you have an SSH shell, you can do "perror ####" where the #### is the $error code. Or, if you're really bored, I wrote a PHP extension that lets you lookup the error message from PHP itself: http://l-i-e.com/perror/ On Wed, January 6, 2010 9:26 pm, Tom Printy wrote: > Hi, > > I didn't choose the server/account I am just trying to support the > code > that is running there. I would much rather run this on my own hosted > server. > > I just thought I would ask the question to see if anyone had any > suggestions. > > -Tom > > > matt donohue wrote: >> The main difference is a root account allows you install/configure >> any software you want. >> You set the all that up. So- the downside is you are expected to >> manage your own server. >> GoDaddy is a managed server and a root account (or 'shared' server) >> is not. That may seem like the wrong option for a newbie but >> I've never had an issue that support wouldn't answer or help with. >> The support in one of these accounts is usually much better than >> a so called 'managed' account probably because the techs have more >> time. >> The set-ups will be remarkably similar with the same basic install >> you see at every ISP. PHP, APACHE and MySQL already installed. >> These are both vitual machines with many hosts on the same box- the >> only difference is the un-managed root account allows you to log >> into your VM as root with full privileges to change that >> environment. >> Both will have the same plesk management options so- if you are used >> to that with GoDaddy it's the same. >> Lastly- any mail systems on GoDaddy will suck (to configure and >> manage)- so, if you have email apps that would be my reason to bail. >> >> I'm not sure what your long term plans are but I haven't seen many >> PHP jobs that did not require you to know how to manage a server on >> your own so you might as well jump in at some point. >> >> Matt >> >> >> >> >> >> >> >> >> ________________________________ >> From: Steve E. <set...@at...> >> To: Chicago PHP User Group <chi...@li...> >> Sent: Wed, January 6, 2010 7:53:55 AM >> Subject: Re: [chiPHPug-discuss] GoDaddy hosting - (no subject) >> >> Good day - >> >> Newbie here - I currently use GoDaddy for a small database-driven >> site >> without significant trouble (hate their help system, though). I am >> interested in Matt D.'s comment about getting a host that has >> "root". Can >> someone explain what this means and any obvious (or hidden) benefits >> that a >> change of hosts might provide? Many thanks. >> >> >> Steve E. >> Chicago, IL >> >> >> >> -----Original Message----- >> From: matt donohue [mailto:mm_...@ya...] >> Sent: Tuesday, January 05, 2010 10:45 PM >> To: Chicago PHP User Group >> Subject: Re: [chiPHPug-discuss] (no subject) >> >> >> You can check your php.ini file and if it's running safe mode no >> dice. echo >> phpinfo(); >> ini_set("safe_mode",0) works for some php installs (see manual). >> >> Or- ditch GoDaddy and get a real hosting solution that has root. It >> costs >> the same. >> >> Matt >> >> >> >> >> ________________________________ >> From: Sara Trice <sa...@sa...> >> To: Chicago PHP User Group <chi...@li...> >> Sent: Tue, January 5, 2010 5:54:26 PM >> Subject: Re: [chiPHPug-discuss] (no subject) >> >> I'm 99% sure shell_exec() is disabled on GoDaddy because ... well, >> it's a >> cheap webhost, and rather than secure their servers, they eliminate >> problems >> by not offering features. >> >> -Sara >> >> On Tue, Jan 5, 2010 at 5:35 PM, Tom Printy >> <tp...@ma...> >> wrote: >> >>> Hey Guys/Gals, >>> >>> I have some software that I am working with that is running on >>> GoDaddy. I am attempting to have PHP call another script to run in >>> the >>> background. However I am running into so troubles and I was >>> wondering >>> if anyone else has had any success with this. Here is what I am >>> doing: >>> >>> shell_exec("nohup >>> /home/content/t/e/x/textconn/html/sms/sendmessages.pl >>> 2> /dev/null &"); >>> >>> The php scipt seems to hang at this point and the browser then >>> times >>> out. >>> >>> Any advice? >>> >>> Thanks >>> -Tom Printy >>> www.edisonave.com >>> >>> >>> ---------------------------------------------------------------------- >>> -------- >>> This SF.Net email is sponsored by the Verizon Developer Community >>> Take advantage of Verizon's best-in-class app development support >>> A streamlined, 14 day to market process makes app distribution fast >>> and >>> >> easy >> >>> Join now and get one step closer to millions of Verizon customers >>> http://p.sf.net/sfu/verizon-dev2dev >>> _______________________________________________ >>> chiPHPug-discuss mailing list >>> chi...@li... >>> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >>> >>> >>> >> >> ---------------------------------------------------------------------------- >> -- >> This SF.Net email is sponsored by the Verizon Developer Community >> Take >> advantage of Verizon's best-in-class app development support A >> streamlined, >> 14 day to market process makes app distribution fast and easy Join >> now and >> get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> chiPHPug-discuss mailing list chi...@li... >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >> ---------------------------------------------------------------------------- >> -- >> This SF.Net email is sponsored by the Verizon Developer Community >> Take >> advantage of Verizon's best-in-class app development support A >> streamlined, >> 14 day to market process makes app distribution fast and easy Join >> now and >> get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> chiPHPug-discuss mailing list chi...@li... >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> chiPHPug-discuss mailing list >> chi...@li... >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> chiPHPug-discuss mailing list >> chi...@li... >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >> > > > -- > -Tom Printy > Office Hours: M-F 9:00am CT to 12:00pm CT > www.edisonave.com > 847-558-9154 > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch |