Path getting messed up - cannot find a file



If I run the following code:

exec ("swetest -edir$sweph -b$utdatenow -ut$utnow -p012 -eswe -flsj -g, -head", $out);

all is well - PHP finds the program swetest and makes the calculations.


But if I then insert this beforehand:

$NetGeoHTML = file_get_contents($NetGeoURL, 99000);

exec ("swetest -edir$sweph -b$utdatenow -ut$utnow -p012 -eswe -flsj -g, -head", $out);

I get no output because apparently PHP does not know where to find the program called swetest. Why does "file_get_contents" mess up my "path" and how do I get this to work?

Thank you.



Otis
.



Relevant Pages

  • Re: [PHP] SimpleXML addChild() namespace problem
    ... $xml = new SimpleXMLElement; ... <root xmlns:itunes="http://apple.com"</a>;>Musical ...
    (php.general)
  • Re: [PHP] SimpleXML addChild() namespace problem
    ... based upon information from bug #43221, if you define the namespace ... $xml = new SimpleXMLElement; ...
    (php.general)
  • Re: Autofill data from a php form...
    ... You did not say that you want to make any PHP integrations. ... Javascript is run client-side and they have no native runtime ... calculations then such approach is hugely ineffective IMO. ... Other option is to keep everything server-side and ...
    (comp.lang.javascript)
  • Re: misunderstanding
    ... Well, if it wouldn't be significant, why would PHP hide that inaccuracy as a default? ... floating-point numbers are 1) accurate enough for almost all applications and 2) supported by hardware, which means they are very fast. ... The calculations made with PHP are faster even if PHP also need to also hide that inaccuracy. ...
    (perl.beginners)
  • Re: Real-time form-field updating
    ... > I have a form that is using HTML and PHP to make calculations for an ... > order form. ...
    (comp.lang.javascript)