• You are not logged in. | Login

Post a reply

  • Index
  •  » Help me!
  •  » Functions fopen() and file() don??™t work with URL any more

March 13, 2007 8:02 am

R@mzess
Member
Ranks

Functions fopen() and file() don??™t work with URL any more

The problem is following:

- function file() has been used for checking back link on the catalogue??™s sites

- it has been working properly up to the moment but last auto updating of PHP-version up to 4.4.1 seems to have changed something

- when calling function file or fopen with file name parameter in form of URL:

$flpth="http://my_site";
$fl=file($flpth);

Following is displayed:

Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/.......

Warning: file(http://my_site): failed to open stream: Success in /home/........

- calling functions with local files instead of URL works properly.

- parameter allow_url_fopen is switched on

As far as I understand, there is some problem with wrapper, isn??™t it? Or what could be the matter at all?

Give me some advice about what could be changed in php.ini or in the program or if there is some alternative way to check back links which is not more complicated than the former one.


 

 

March 13, 2007 8:04 am

bandlist12
Member
Ranks

Re: Functions fopen() and file() don??™t work with URL any more

Hoster has got a problem with resolver.


 

 

March 13, 2007 8:09 am

n00bphp
Member
Ranks

Re: Functions fopen() and file() don??™t work with URL any more

Hoster has got a problem with resolver.

Could you explain it more detailed? He is to change all configurations as far as we are in VPS. Is there some problem with DNS? How to find it there?


 

 

March 13, 2007 8:16 am

senjor_itc
Member
Ranks

Re: Functions fopen() and file() don??™t work with URL any more

Address the hosting support service.


 

 

March 13, 2007 8:23 am

bandlist12
Member
Ranks

Re: Functions fopen() and file() don??™t work with URL any more

R@mzess, try to restart Apache. This question has nothing to do with PHP. Try to do file_get_contents('http://64.233.167.99');


 

 

March 13, 2007 8:29 am

R@mzess
Member
Ranks

Re: Functions fopen() and file() don??™t work with URL any more

senjor_itc, I??™m on VPS and so I change all (!) the connections myself. Hoster demands payment for this and this payment is high enough

try to restart Apache. This question has nothing to do with PHP. Try to do file_get_contents('http://64.233.167.99');

Apache, DNS, the whole server ??“ I??™ve restarted them all many times. Actually, I??™ve started with it.  smile

With Google file_get_contents functions properly. file and the rest also work. But they work with IPs only not with sites??™ names.

At this it enters Google on name http://64.233.167.99 (in browser) but it doesn??™t enter my site.

The reason proves to be DNS not PHP. Has anyone faced such a problem and what could be done?

P.S. I don??™t receive any mails from our server.  sad  The problems seem to be connected, aren??™t they?


 

 

March 13, 2007 8:34 am

bandlist12
Member
Ranks

Re: Functions fopen() and file() don??™t work with URL any more

R@mzess, you need to hire a professional for server setting.

At this it enters Google on name http://64.233.167.99 (in browser) but it doesn??™t enter my site.

Details, please. Which DNS-address of the server is indicated? You haven??™t installed bind for yourself and use the hoster??™s one, don??™t you?


 

 
  • Index
  •  » Help me!
  •  » Functions fopen() and file() don??™t work with URL any more
  • Actions
  • Top