Re: [PHP] Re: remote fopen not working, despite allow_url_fopen = on SOLVED

2007-03-06 Thread alex handle

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] Session problems with 4.4.5?

2007-02-22 Thread alex handle

On 2/16/07, Jochem Maas [EMAIL PROTECTED] wrote:


Ken Williams wrote:
 Is anyone else having problems with session in 4.4.5?  I'm under apache
 1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5.  As soon
as a
 page tries to register a session variable with session_register apache
will
 segfault.  Has worked perfectly fine for the past 2 years and like 10
 version of PHP 4.4.X.

segfault probably indicates  problem. goto bugs.php.net and file a bug
with
details about your machine and a small reproduce script.

side note: use of session_register() is not recommended - reading the
following
page may help you understand why, help you work around your current
problem and
hopefully get you on the path of using $_SESSION:

http://php.net/session_register


 [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Will there be a 4.4.6 release soon?
A lot of users run OsCommerce and i  don't like to run  a unpatched php
4.4.4.

Thanks

Alex


Re: [PHP] Re: remote fopen not working, despite allow_url_fopen = on

2007-02-21 Thread alex handle

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


[PHP] Re: remote fopen not working, despite allow_url_fopen = on

2007-02-19 Thread alex handle

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?


[PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread alex handle

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/'));
?

phpinfo and configure.log of the freebsd-ports is attached

http://www.dict.cc/englisch-deutsch/Thanks+in+advance+TIA.htmlThanks in
advance!

Alex
System  FreeBSD  6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 
UTC 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP i386
Build Date  Feb 14 2007 17:04:14
Configure Command   './configure' '--enable-versioning' 
'--enable-memory-limit' '--with-layout=GNU' 
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' 
'--program-prefix=' '--disable-cgi' '--with-apxs2=/usr/local/sbin/apxs' 
'--with-regex=php' '--with-zlib=/usr' '--enable-zend-multibyte' 
'--prefix=/usr/local' 'i386-portbld-freebsd6.2'
Server API  Apache 2.0 Handler
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /usr/local/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/php
additional .ini files parsed/usr/local/etc/php/extensions.ini
PHP API 20020918
PHP Extension   20020429
Zend Extension  20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety   disabled
Registered PHP Streams  php, http, ftp, compress.zlib, compress.bzip2

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies




Configuration
PHP Core
Directive   Local Value Master Value
allow_call_time_pass_reference  On  On
allow_url_fopen Off Off
always_populate_raw_post_data   Off Off
arg_separator.input
arg_separator.output   
asp_tagsOff Off
auto_append_fileno valueno value
auto_prepend_file   no valueno value
browscapno valueno value
default_charset no valueno value
default_mimetypetext/html   text/html
define_syslog_variables Off Off
disable_classes no valueno value
disable_functions   no valueno value
display_errors  Off Off
display_startup_errors  Off Off
doc_rootno valueno value
docref_ext  no valueno value
docref_root no valueno value
enable_dl   On  On
error_append_string no valueno value
error_log   no valueno value
error_prepend_stringno valueno value
error_reporting 20392039
expose_php  Off Off
extension_dir   /usr/local/lib/php/20020429 /usr/local/lib/php/20020429
file_uploadsOn  On
gpc_order   GPC GPC
highlight.bg#FF #FF
highlight.comment   #FF8000 #FF8000
highlight.default   #BB #BB
highlight.html  #00 #00
highlight.keyword   #007700 #007700
highlight.string#DD #DD
html_errors On  On
ignore_repeated_errors  Off Off
ignore_repeated_source  Off Off
ignore_user_abort   Off Off
implicit_flush  Off Off
include_path.:/usr/local/share/pear .:/usr/local/share/pear
log_errors  On  On
log_errors_max_len  10241024
magic_quotes_gpcOn  On
magic_quotes_runtimeOff Off
magic_quotes_sybase Off Off
max_execution_time  30  30
max_input_time  60  60
memory_limit32M 32M
open_basedirno valueno value
output_bufferingno valueno value
output_handler  no valueno value
post_max_size   8M  8M
precision   12  12
register_argc_argv  On  On
register_globalsOff On
report_memleaks On  On
safe_mode   Off On
safe_mode_exec_dir  no valueno value
safe_mode_gid   Off Off
safe_mode_include_dir   no valueno value
sendmail_from   no valueno value
sendmail_path   /usr/sbin/sendmail -t -i/usr/sbin/sendmail -t -i 

Re: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread alex handle

On 2/15/07, Aras [EMAIL PROTECTED] wrote:


 Alex,

Either the domain you are trying to fetch data is unknown or your resolver
settings do not point to a regular resolving server. (check
/etc/resolv.conf)


Aras Koktas
[EMAIL PROTECTED]
Business Excellence Development
Phi.dot Internet Systems


-Original Message-
*From:* alex handle [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, February 15, 2007 3:52 PM
*To:* php-general@lists.php.net
*Subject:* [PHP] remote fopen not working, despite allow_url_fopen = on

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





Hello Aras!

my /etc/resolv.conf is ok - a host google.com works and i can reach
google.com with lynx.
There  are  no firewall or dns issues on the server.


Re: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread alex handle

On 2/15/07, cajbecu [EMAIL PROTECTED] wrote:



 Hello Aras!

 my /etc/resolv.conf is ok - a host google.com works and i can reach
 google.com with lynx.
 There  are  no firewall or dns issues on the server.


try: var_dump(file('http://ip_google/'));

replace ip_google with google`s main ip.

cajb.



Hi cajb,

I tried that before but, it doesn't even work with 127.0.0.1 or localhost.
Got this Error:

[Thu Feb 15 14:19:47 2007] [error] [client xxx] PHP Warning:  file(
http://72.14.207.99/) [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

Alex