Page 1 of 1
PHP Install works except...
Posted: Wed Apr 06, 2005 7:23 am
by irishmike2004
I have installed PHP 5.0.4 on a Windows XP Professional Box (this is one of my dev boxen) with Apache 2.0.53, to my knowledge, I have done the complete install, I get what looks fine when I run phpinfo() on the install.
I have an app that uses file_get_contents() and it is not working. I have turned off extranious error reporting, but it reported that it timed out contacting the URL. The "live" version of the page works just fine, but is on a slightly older install of PHP 5.0.2, I am not sure why this function is not working...
any ideas would be helpful, has anyone actually gotten PHP 5.0.4 to run successfully on Windows? My Macintosh installation works dandy
Thanks for your help,
Mike
Posted: Wed Apr 06, 2005 7:46 am
by timvw
works fine here...
Code: Select all
<?php echo file_get_contents('http://localhost'); ?>
RE: Thanks Tim, but I still need to fix this install
Posted: Wed Apr 06, 2005 9:36 am
by irishmike2004
Thanks for the vote of confidence that it works for you!
My server is still not functioning properly on some things, the biggest one is my weather application which uses file_get_contents() to get the XML... it errors with a timeout on this machine (which has a nice clear connection to the Internet)... I need to figure out where I went wrong or what I did not install that needs to be
Here is an excerpt from the error log:
06-Apr-2005 09:33:56] PHP Warning: file_get_contents(
http://xoap.weather.com/weather/local/6 ... bd7e&unit=) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
in C:\Program Files\Apache Group\Apache2\htdocs\weather5.php on line 172
[06-Apr-2005 09:33:57] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\weather5.php on line 172
Again,this php file runs flawlessly in the production environment which is a Windows XP with IIS and PHP 5.0.2 and the dev box (this box) is Apache 2 with PHP 5.0.4. Not sure what I am missing in the install
Thanks,
Mike
A question, another thought...
Posted: Wed Apr 06, 2005 9:38 am
by irishmike2004
If my machine (which is on a corporate server) goes through a proxy, do I need to tweak something there?
Thanks
Posted: Wed Apr 06, 2005 1:22 pm
by timvw
http://be2.php.net/manual/en/wrappers.http.php
Table L-3. Context options (as of PHP 5.0.0)
proxy option...