Re: [PHP] Re: remote fopen not working, despite allow_url_fopen = on SOLVED
On 2/21/07, alex handle [EMAIL PROTECTED] wrote: On 2/21/07, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, February 19, 2007 9:43 am, alex handle wrote: A minute ago i tried to run my test script (remote.php) on the shell and the remote fopen works!! The problem must be within the php apache module or apache self. Is there a way to debug the php apache module? Step #1. Create a page with ?php phpinfo();? in it, surf to it, and find the allow_url_fopen setting within that output. I'm betting dollars to donuts that the php.ini you changed has not yet been read by your webserver, because it isn't the right php.ini, or because you forgot to re-start Apache. Step #2. It's possible that your httpd.conf is messed up so that Apache (and thus PHP module) cannot manage to do a hostname lookup. If that's the case, you probably need to be checking in httpd.conf and asking on the Apache list... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? When i disable allow_url_fopen, i get this error mesage: [Wed Feb 21 13:12:20 2007] [error] [client xxx] PHP Warning: file() [a href='function.file'function.file/a]: URL file-access is disabled in the server configuration in /home/domains/x//tmp/remote.php on line 2. With allow_url_fopen = on i get a different error message (see my previous posts). Thank you for the tip i will check my httpd.conf. Alex Hi, i found a solution on this site: http://danger.rulez.sk/articles/php-http-request-fails.php PHP4 does not work reliable with more than 1024 filedescriptors (incl. apache logfiles). Alex
Re: [PHP] Re: remote fopen not working, despite allow_url_fopen = on
On 2/21/07, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, February 19, 2007 9:43 am, alex handle wrote: A minute ago i tried to run my test script (remote.php) on the shell and the remote fopen works!! The problem must be within the php apache module or apache self. Is there a way to debug the php apache module? Step #1. Create a page with ?php phpinfo();? in it, surf to it, and find the allow_url_fopen setting within that output. I'm betting dollars to donuts that the php.ini you changed has not yet been read by your webserver, because it isn't the right php.ini, or because you forgot to re-start Apache. Step #2. It's possible that your httpd.conf is messed up so that Apache (and thus PHP module) cannot manage to do a hostname lookup. If that's the case, you probably need to be checking in httpd.conf and asking on the Apache list... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? When i disable allow_url_fopen, i get this error mesage: [Wed Feb 21 13:12:20 2007] [error] [client xxx] PHP Warning: file() [a href='function.file'function.file/a]: URL file-access is disabled in the server configuration in /home/domains/x//tmp/remote.php on line 2. With allow_url_fopen = on i get a different error message (see my previous posts). Thank you for the tip i will check my httpd.conf. Alex
Re: [PHP] Re: remote fopen not working, despite allow_url_fopen = on
On Mon, February 19, 2007 9:43 am, alex handle wrote: A minute ago i tried to run my test script (remote.php) on the shell and the remote fopen works!! The problem must be within the php apache module or apache self. Is there a way to debug the php apache module? Step #1. Create a page with ?php phpinfo();? in it, surf to it, and find the allow_url_fopen setting within that output. I'm betting dollars to donuts that the php.ini you changed has not yet been read by your webserver, because it isn't the right php.ini, or because you forgot to re-start Apache. Step #2. It's possible that your httpd.conf is messed up so that Apache (and thus PHP module) cannot manage to do a hostname lookup. If that's the case, you probably need to be checking in httpd.conf and asking on the Apache list... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: remote fopen not working, despite allow_url_fopen = on
On 2/15/07, alex handle [EMAIL PROTECTED] wrote: Hi all, i recently upgraded a server from freebsd 5.x to 6.2 php 4.4.2 - php 4.4.4 apache 1.3 - apache 2.2.4. It worked all great till i noticed that the remote fopen()/file() did not work. allow_url_fopen is set to On and the httpd-error.log shows this error message: [Thu Feb 15 14:15:42 2007] [error] [client xxx] PHP Warning: file() [a href='function.file'function.file /a]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /home/domains/x/xxx/tmp/remote.php on line 2 [Thu Feb 15 14:15:42 2007] [error] [client xxx] PHP Warning: file( http://google.com/) [a href='function.file'function.file/a]: failed to open stream: Invalid argument in /home/domains/x/xxx/tmp/remote.php on line 2 A lynx from the server to google.com works. Then i put google.com in the /etc/hosts file and i got this message: [Thu Feb 15 14:19:47 2007] [error] [client xxx] PHP Warning: file( http://google.com/) [a href='function.file'function.file/a]: failed to open stream: HTTP request failed! in /home/domains/x/xxx/tmp/remote.php on line 2 With curl i can fetch remote content, but i have to put the domainname in the hosts file. Verry strange!? Here my test file: ?php var_dump(file('http://google.com/') http://google.com/%27%29); ? phpinfo and configure.log of the freebsd-ports is attached http://www.dict.cc/englisch-deutsch/Thanks+in+advance+TIA.htmlThanks in advance! Alex A minute ago i tried to run my test script (remote.php) on the shell and the remote fopen works!! The problem must be within the php apache module or apache self. Is there a way to debug the php apache module?