Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.16

Bug #6904 2 tests in PEAR_Config over FTP fail (missing constant FTP_BINARY)
Submitted: 2006-02-23 13:31 UTC
From: toggg Assigned: cellog
Status: Closed Package: PEAR (version CVS)
PHP Version: 5_1 CVS-2006-02-23 OS: fc3
Roadmaps: (Not assigned)    
Subscription  


 [2006-02-23 13:31 UTC] toggg (bertrand Gugger)
Description: ------------ FAIL PEAR_Installer->install() with simple local package.xml, remote ftp install[PEAR_Installer/test_install_simplelocalpackage_ftp.phpt] FAIL PEAR_Installer->uninstall() with simple local package.xml, remote ftp uninstall[PEAR_Installer/test_uninstall_simplelocalpackage_ftp.phpt] They fail because of a notice: Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY' in /usr/share/pear/PEAR/Config.php on line 711 Indeed: # echo '<?php echo FTP_BINARY;' | /usr/bin/php Content-type: text/html X-Powered-By: PHP/4.3.11 1 # echo '<?php echo FTP_BINARY;' | php5 PHP Notice: Use of undefined constant FTP_BINARY - assumed 'FTP_BINARY' in - on line 1 X-Powered-By: PHP/5.1.3-dev Content-type: text/html This php5 is a "nacked" one, with a minimal configure: ./configure --with-zlib --without-pear --without-xmlrpc --program-suffix=5 --enable-cli --enable-cgi Also, the package Net_FTP is not installed there A work around is to define it case inexistant in tests/PEAR_Installer/ftp_test_files/FTP.php.inc Which finally leads to: For this "naked" php 5.1.3 from cvs loaded with the phar pear: # pear5 run-tests -rq Running 668 tests TOTAL TIME: 03:38 660 PASSED TESTS 8 SKIPPED TESTS and for this fc3 php 4.3.11 loaded with the cvs pear: # pear run-tests -rq Running 668 tests TOTAL TIME: 06:34 660 PASSED TESTS 8 SKIPPED TESTS :) Test script: --------------- --- tests/PEAR_Installer/ftp_test_files/FTP.php.incsav 2006-02-23 05:58:46.000000000 +0100 +++ tests/PEAR_Installer/ftp_test_files/FTP.php.inc 2006-02-23 13:55:27.000000000 +0100 @@ -5,6 +5,9 @@ define('NET_FTP_ERR_CREATEDIR_FAILED', 1); define('NET_FTP_ERR_OVERWRITELOCALFILE_FORBIDDEN', 32); define('NET_FTP_ERR_UPLOADFILE_FAILED', 5); +if (!defined('FTP_BINARY')) { + define('FTP_BINARY', 1); +} function Net_FTP_setup(&$t) { $a = &Net_FTP::singleton();

Comments

 [2006-03-23 04:24 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.