[PHP-DEV] PHP 4.0 Bug #7880 Updated: PHP_URL_FOPEN doesn't work From: Alan <email protected>
Date: 11/20/00

ID: 7880
User Update by: Alan <email protected>
Old-Status: Feedback
Status: Open
Bug Type: *URL Functions
Description: PHP_URL_FOPEN doesn't work

1)
truss -feal -o /tmp/output /usr/local/bin/httpd -X
[ Attached as output.tar.gz - Look for filetest.php ]

2)
#gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
                                                                                
#uname -a
SunOS egotist 5.8 Generic_108528-01 sun4u sparc SUNW,Ultra-5_10

3)I've recompiled almost half a dozen times... I've razed the directory and
tar zxvf'ed twice. I'm pretty sure it's a good binary.
                                                                                
php-de>Check your php_config.h to verify that
php-de>#define PHP_URL_FOPEN 1 exists.
                                                                                
--- snip ---
#define DEFAULT_SHORT_OPEN_TAG 1
                                                                                
/* */
#define DEFAULT_SHORT_OPEN_TAG 1
                                                                                
/* */
#define PHP_URL_FOPEN 1
                                                                      
/* */
#define PHP_URL_FOPEN 1
                                                                                
/* Whether you have dmalloc */
/* #undef HAVE_DMALLOC */
--- snip ---

4)
Yup... Worked that way. (under cgi php)

Previous Comments:
---------------------------------------------------------------------------

[2000-11-20 03:35:27] jason <email protected>
I just noticed your update about the cgi version working. When you build php 4.0.3pl1 for apxs, can you verify
the define statement I listed above exists in php_config.h? I just want to rule out the possibility of a build problem. The other information I requested would be helpful as well

-Jason

---------------------------------------------------------------------------

[2000-11-20 03:19:00] jason <email protected>
Can you try trussing apache in single process mode ( truss ./httpd -X ). Request the script, and see if it actually makes a socket connect request. From your description, it most likely will not.

Also can you give me the details of your compile environment( what make and cc you are using)

Im sure you have thought of this, but is there a possibility of a corrupt build? Have you tried removing config.cache, reconfiguring, and rerunning?

Check your php_config.h to verify that
#define PHP_URL_FOPEN 1 exists.

If all of these check out try building a seperate tree as a standalone cgi, run ./php < test-furl.php and see if you get the same results.

-Jason

---------------------------------------------------------------------------

[2000-11-20 03:11:55] Alan <email protected>
I compiled the CGI version of 4.0.3pl1 and the scripts noted in this bug DOES run in the CGI version.

---------------------------------------------------------------------------

[2000-11-20 02:38:06] jason <email protected>
Sorry, I was wrong, the ini directive did not make 4.0.3pl1
Ill take a look into this.

-Jason

---------------------------------------------------------------------------

[2000-11-20 02:02:46] Alan <email protected>
I have added the following line to my php.ini file, as it was not included
in the php.ini-dist for 4.0.3pl1:
allow_url_fopen = On;
                                                                                
This did not change the behavior or the error. I ran a truss to ensure
that the apxs was loaded the correct php.ini file and the correct
libs. From the output of truss, I am certain that the correct DSO and
php.ini are being read.

---------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=7880

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>