|
From: "Belinda" on 19 Jul 2008 03:41 Good morning I have just been browsing the web for help with a php problem that is driving me mad. I didn't want to post to the site so hope that this email may get a response. I thank you in advance. I am learning php myself(self-learning) but just can get me head around this error.(lack of knowledge L) With regard to [function.file-get-contents] can anyone explain this error to me...please :-) Warning: file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_t opics&forum=Bea-Tropical&trans=1) [function.file-get-contents]: failed to open stream: Connection refused in /home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on line 419. I cannot resolve this issue. any help will be gratefully appreciated. With Kindest Regards Belinda Marsh
From: Venky K Shankar on 19 Jul 2008 07:28 On Saturday 19 July 2008 01:11:38 pm Belinda wrote: > Good morning > > I have just been browsing the web for help with a php problem that is > driving me mad. I didn't want to post to the site so hope that this email > may get a response. I thank you in advance. > > I am learning php myself(self-learning) but just can get me head around > this error.(lack of knowledge L) > > > > With regard to [function.file-get-contents] can anyone explain this error > to me...please :-) > > > > Warning: > file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_ >t opics&forum=Bea-Tropical&trans=1) [function.file-get-contents]: failed to > open stream: Connection refused in > /home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on line > 419. >> i think you are missing " " in the function : >> see below : >>venky(a)linux-ujq3:~/py> php -r ' file_get_contents("http://www.ecofriendz.com/groups/orca/?action=group_last_t"); ' >>venky(a)linux-ujq3:~/py> >> the URL must be inside " " > > > > I cannot resolve this issue. any help will be gratefully appreciated. > > > > With Kindest Regards > > > > Belinda Marsh
From: Jim Lucas on 19 Jul 2008 17:09 Belinda wrote: > Good morning > > I have just been browsing the web for help with a php problem that is > driving me mad. I didn't want to post to the site so hope that this email > may get a response. I thank you in advance. > > I am learning php myself(self-learning) but just can get me head around this > error.(lack of knowledge L) > > > > With regard to [function.file-get-contents] can anyone explain this error to > me...please :-) > > > > Warning: > file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_t > opics&forum=Bea-Tropical&trans=1) [function.file-get-contents]: failed to > open stream: Connection refused in > /home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on line > 419. > > > > I cannot resolve this issue. any help will be gratefully appreciated. > > > > With Kindest Regards > > > > Belinda Marsh > > sounds like you are not allowed to access URL on the internet. There is a setting within PHP that either allows or denies you the ability to access remote URLs like the one in your example. You will need to make sure that in your php.ini configuration file that you have allow_url_fopen set to '1' and that it is not diabled. Here is the page that references these settings: http://us2.php.net/manual/en/ini.php#ini.list It is the second one in the big list of things. I noticed that they also added a new one as of v5.2.0 It is for the allow_url_include You might need to do something with this also. Not sure. But, I would start with making sure that the allow_url_fopen is set to '1'. If you need to change the value, make sure that you restart your web server so the settings will take effect. Hope this helps. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare
From: Jochem Maas on 20 Jul 2008 16:43 Jim Lucas schreef: > Belinda wrote: >> Good morning >> >> I have just been browsing the web for help with a php problem that is >> driving me mad. I didn't want to post to the site so hope that this email >> may get a response. I thank you in advance. >> >> I am learning php myself(self-learning) but just can get me head >> around this >> error.(lack of knowledge L) >> >> >> >> With regard to [function.file-get-contents] can anyone explain this >> error to >> me...please :-) >> >> >> >> Warning: >> file_get_contents(http://www.ecofriendz.com/groups/orca/?action=group_last_t >> >> opics&forum=Bea-Tropical&trans=1) [function.file-get-contents]: failed to >> open stream: Connection refused in >> /home/sites/ecofriendz.com/public_html/inc/classes/BxDolGroups.php on >> line >> 419. >> >> >> >> I cannot resolve this issue. any help will be gratefully appreciated. >> >> >> >> With Kindest Regards >> >> >> >> Belinda Marsh >> >> > > sounds like you are not allowed to access URL on the internet. this is indeed more likely than having missed quotes around the URL (someone else mentioned that possibility). chances are that Belinda's using shared hosting and that allow_url_fopen is turned off server wide ... I'll bet money the sys admins won't turn it on for her. now the real question! why is code that blatantly belongs to ecofriendz.com trying to grab output from a 'page script' that exists in the same site ... it's just plain wrong to have site screen scraping it's own output, the underlying data should be retrieved from the datasource directly. maybe you'd care to explain what it is your trying to achieve? > > There is a setting within PHP that either allows or denies you the > ability to access remote URLs like the one in your example. > > You will need to make sure that in your php.ini configuration file that > you have allow_url_fopen set to '1' and that it is not diabled. > > Here is the page that references these settings: > http://us2.php.net/manual/en/ini.php#ini.list > > It is the second one in the big list of things. I noticed that they > also added a new one as of v5.2.0 It is for the allow_url_include You > might need to do something with this also. Not sure. > > But, I would start with making sure that the allow_url_fopen is set to > '1'. If you need to change the value, make sure that you restart your > web server so the settings will take effect. > > Hope this helps. >
|
Pages: 1 Prev: Search thoughts Next: Modifying Arbitrarily Deep Arrays with SPL |