#39883 [Fbk->Opn]: ftp_get - coredump
| From: | youza at post dot cz | Date: | Wed, 20 Dec 2006 13:49:43 +0000 |
| Subject: | #39883 [Fbk->Opn]: ftp_get - coredump | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106644@lists.php.net to get a copy of this message | ||
ID: 39883
User updated by: youza at post dot cz
Reported By: youza at post dot cz
-Status: Feedback
+Status: Open
Bug Type: FTP related
Operating System: Fedora Core 4
PHP Version: 4.4.4
New Comment:
Hmm I run this command with my version PHP 4.4.4 (no CVS)and this
command is ok -file transferred.
/usr/bin/php -c ./etc/php.ini test.php
But access this page over www http:/my.server/test.php
is buggy and produce coredump.
cli version is ok byt apache module is bad ?
Previous Comments:
------------------------------------------------------------------------
[2006-12-20 10:30:28] tony2001@php.net
>Use the last CVS is problematic - the server is a production server.
You don't have to run
make install. In fact, you don't have to run it
through Apache at all, just build a CLI binary in your home directory
and run sapi/cli/php /path/to/script.php.
------------------------------------------------------------------------
[2006-12-20 08:56:44] youza at post dot cz
Use the last CVS is problematic - the server is a production server.
I test command ftp_nb_get and this is right.
I don't get it why ftp_get is bad and ftp_ng_get is right ?
------------------------------------------------------------------------
[2006-12-19 12:46:22] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2006-12-19 12:41:10] youza at post dot cz
Description:
------------
The ftp_get file transfer generate core dump -
[notice] child pid 5999 exit signal Segmentation fault (11), possible
coredump in /usr/tmp
after reloading WWW this file transfered, but next reload
generate new core dump etc....
php = 4.4.4
apache = httpd-2.0.54-10.4 (fedora RPM)
Reproduce code:
---------------
$ftp_server = 'my_server';
$ftp_user_name = 'my_name';
$ftp_user_pass = 'my_pass';
// define some variables
$local_file = 'test_l.dat';
$server_file = 'test.dat';
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// try to download $server_file and save to $local_file
$res = ftp_get($conn_id, $local_file, $server_file, FTP_BINARY);
if ($res) {
echo "<br>Successfully written to $local_file\n";
} else {
echo "<br>There was a problem\n";
}
// close the connection
ftp_close($conn_id);
Expected result:
----------------
Transfer the files.
Actual result:
--------------
gdb /usr/lib/debug/usr/sbin/httpd.debug /usr/tmp/core.5999
..
#0 0x00ff32f4 in ?? () from /etc/httpd/modules/libphp4.so
(gdb) bt
#0 0x00ff32f4 in ?? () from /etc/httpd/modules/libphp4.so
#1 0x01028920 in zif_ftp_get (ht=4, return_value=0xad4d0cc,
this_ptr=0x0, return_value_used=1)
at /usr/src/debug/php-4.4.4/ext/ftp/php_ftp.c:648
#2 0x010ffb85 in execute (op_array=0xad48c8c) at
/usr/src/debug/php-4.4.4/Zend/zend_execute.c:1675
#3 0x010e6139 in zend_execute_scripts (type=8, retval=Variable
"retval" is not available.
) at /usr/src/debug/php-4.4.4/Zend/zend.c:934
#4 0x010b72f5 in php_execute_script (primary_file=0xbfc36408) at
/usr/src/debug/php-4.4.4/main/main.c:1752
#5 0x0110576e in php_handler (r=0xad417f8) at
/usr/src/debug/php-4.4.4/sapi/apache2handler/sapi_apache2.c:596
#6 0x002fde8c in ap_run_handler (r=0xad417f8) at
/usr/src/debug/httpd-2.0.54/server/config.c:157
#7 0x002fe227 in ap_invoke_handler (r=0xad417f8) at
/usr/src/debug/httpd-2.0.54/server/config.c:369
#8 0x002fad6b in ap_process_request (r=0xad417f8) at
/usr/src/debug/httpd-2.0.54/modules/http/http_request.c:249
#9 0x002f5683 in ap_process_http_connection (c=0xad3b5b0) at
/usr/src/debug/httpd-2.0.54/modules/http/http_core.c:251
#10 0x00308a2b in ap_run_process_connection (c=0xad3b5b0) at
/usr/src/debug/httpd-2.0.54/server/connection.c:43
#11 0x00308d60 in ap_process_connection (c=0xad3b5b0, csd=0xad3b4d8) at
/usr/src/debug/httpd-2.0.54/server/connection.c:176
#12 0x002fbcfe in child_main (child_num_arg=Variable "child_num_arg" is
not available.
) at /usr/src/debug/httpd-2.0.54/server/mpm/prefork/prefork.c:610
#13 0x002fbfba in make_child (s=0x9cc9e88, slot=24) at
/usr/src/debug/httpd-2.0.54/server/mpm/prefork/prefork.c:704
#14 0x002fc090 in startup_children (number_to_start=6) at
/usr/src/debug/httpd-2.0.54/server/mpm/prefork/prefork.c:722
#15 0x002fca52 in ap_mpm_run (_pconf=0x9cc80a8, plog=0x9cf4158,
s=0x9cc9e88)
at /usr/src/debug/httpd-2.0.54/server/mpm/prefork/prefork.c:941
#16 0x0030377e in main (argc=2, argv=0xbfc368b4) at
/usr/src/debug/httpd-2.0.54/server/main.c:619
frame 2
#2 0x010ffb85 in execute (op_array=0xad48c8c) at
/usr/src/debug/php-4.4.4/Zend/zend_execute.c:1675
1675
((zend_internal_function *)
EX(function_state).function)->handler(EX(opline)->extended_value,
EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr,
return_value_used TSRMLS_CC);
(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$1 = 0x110efc5 "ftp_get"
(gdb) print (char *)executor_globals.active_op_array->function_name
$2 = 0x0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39883&edit=1