PHP Install works except...

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

PHP Install works except...

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

works fine here...

Code: Select all

<?php echo file_get_contents('http://localhost'); ?>
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

RE: Thanks Tim, but I still need to fix this install

Post 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 :-D

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
irishmike2004
Forum Contributor
Posts: 119
Joined: Mon Nov 15, 2004 3:54 pm
Location: Lawrence, Kansas

A question, another thought...

Post by irishmike2004 »

If my machine (which is on a corporate server) goes through a proxy, do I need to tweak something there?

Thanks
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

http://be2.php.net/manual/en/wrappers.http.php

Table L-3. Context options (as of PHP 5.0.0)

proxy option...
Post Reply