Summary: | dev-lang/php-5.1.2: fopen() of an FTP file + fwrite to it broken | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergey Okhapkin <sos> |
Component: | New packages | Assignee: | PHP Bugs <php-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Sergey Okhapkin
2006-03-25 10:53:59 UTC
In Gentoo we set the allow_url_fopen setting in php.ini to Off by default, for security reasons, I think that is what's causing the problem you're experiencing, try changing that setting to On and reopen the bug if the problem persists. Best regards, CHTEKK. Please don't expect all users are idiots. Just try to reproduce the bug first. The setting in php.ini is allow_url_fopen = On The error message is "fopen(): URL file-access is disabled in the server configuration" if the setting is off. FTP upload worked fine with emerged php-4.4.2.ebuild, the same code fragment fails with emerged php-5.0.5-r5.ebuild. "strace php ftp.php" shows that the problem happen because 0 timeout is passed to poll syscall on attempt to read ftp server responce. You say it works correctly with a self-compiled 5.1.2, but not on an emerged dev-lang/php-5.1.2 ? Could you please post the exact configure-switches you used to compile your self-compiled PHP ? I'd think this is an upstream PHP bug, but I didn't notice any particular fixes applied for this or bugs opened about it, and I can reproduce this with both dev-lang/php-5.1.2 and dev-lang/php-5.1.3_rc1... But otoh you say it works on a self-compiled PHP, so this really is strange, please give more informations about how you created your self-compiled PHP and on how you emerged dev-lang/php (exact USE flags as shown in emerge -pv dev-lang/php). Best regards, CHTEKK. I did not specify any configure options to self-compiled php. Just cd ~/php-5.1.2 ./configure make sapi/cli/php ~/ftp.php The USE flags are # emerge -pv dev-lang/php These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] dev-lang/php-5.1.2 -adabas -apache -apache2 +bcmath +berkdb -birdstep +bzip2 +calendar -cdb -cgi +cjk +cli +crypt +ctype +curl +curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob +exif -fastbuild -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase +ftp +gd -gd-external +gdbm -gmp -hardenedphp -hash -hyperwave-api +iconv +imap -informix -inifile -interbase -iodbc +ipv6 -java-external +kerberos +ldap -libedit -mcve -memlimit +mhash -ming -msql -mssql +mysql -mysqli +ncurses +nls -oci8 -oci8-instant-client -odbc +pcntl +pcre +pdo -pdo-external -pic +posix -postgres -qdbm +readline -recode -reflection -sapdb -sasl +session -sharedext -sharedmem -simplexml -snmp +soap +sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct +sysvipc -threads -tidy -tokenizer +truetype -vm-goto -vm-switch -wddx +xml -xmlreader +xmlrpc -xmlwriter +xpm -xsl -yaz +zip +zlib 0 kB It would be nice to know which USE flag breakes ftp upload capability, I have multiple php-5.1.2 emerged installations on several boxes (the USE flags could be different a bit), but all installations have this ftp upload problem. The only I know, "sharedext" USE flag do NOT affect the misbehavior, the problem exists in both cli and apache2 module php. Just reemerged php 5.1.2 with USE="-ftp". The same problem. Is there any way to NOT apply gentoo patches to a package? You're right, it's an upstream PHP bug. The problem is in curl wrappers. Disabled "curlwrappers" USE flag fixed the problem. Ok, good to hear that. Is a bug already opened on bugs.php.net about this? (Couldn't find anything relevant at a quick glance) If not, could you open it and post the link here so we may track it, eventually help, and then include the patch in our PHP packages. Thanks and best regards, CHTEKK. |