View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000020 | Xdebug | Installation | public | 2003-10-08 10:10 | 2003-10-09 09:07 |
Reporter | tony2001 | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | open | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000020: fail to build because of php_setcookie() | ||||
Description | make /bin/sh /root/CVS/xdebug_build/libtool --mode=compile gcc -I. -I/root/CVS/xdebug_build -DPHP_ATOM_INC -I/root/CVS/xdebug_build/include -I/root/CVS/xdebug_build/main -I/root/CVS/xdebug_build -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM -DHAVE_CONFIG_H -g -O2 -prefer-pic -c /root/CVS/xdebug_build/xdebug.c -o xdebug.lo gcc -I. -I/root/CVS/xdebug_build -DPHP_ATOM_INC -I/root/CVS/xdebug_build/include -I/root/CVS/xdebug_build/main -I/root/CVS/xdebug_build -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM -DHAVE_CONFIG_H -g -O2 -c /root/CVS/xdebug_build/xdebug.c -fPIC -DPIC -o .libs/xdebug.o /root/CVS/xdebug_build/xdebug.c: In function `xdebug_execute': /root/CVS/xdebug_build/xdebug.c:781: error: too few arguments to function `php_setcookie' /root/CVS/xdebug_build/xdebug.c:794: error: too few arguments to function `php_setcookie' | ||||
Additional Information | I can propose such patch: Index: xdebug.c =================================================================== RCS file: /dat/cvs/xdebug/xdebug.c,v retrieving revision 1.160 diff -u -r1.160 xdebug.c --- xdebug.c 7 Oct 2003 10:56:42 -0000 1.160 +++ xdebug.c 8 Oct 2003 08:07:43 -0000 @@ -754,9 +754,9 @@ } #if PHP_API_VERSION > 20030820 -#define COOKIE_ENCODE , 1 +#define COOKIE_ENCODE 1 #else -#define COOKIE_ENCODE +#define COOKIE_ENCODE 0 #endif void xdebug_execute(zend_op_array *op_array TSRMLS_DC) @@ -778,7 +778,7 @@ zend_hash_find(PG(http_globals)[TRACK_VARS_COOKIE]->value.ht, "xdebug_session", sizeof("xdebug_session"), (void **) &dummy) == SUCCESS ) ) { - php_setcookie("xdebug_session", 13, "yes", 3, time(NULL) + 3600, "/", 1, NULL, 0, 0 COOKIE_ENCODE TSRMLS_CC); + php_setcookie("xdebug_session", 13, "yes", 3, time(NULL) + 3600, "/", 1, NULL, 0, 0, COOKIE_ENCODE TSRMLS_CC); } /* Remove session cookie if requested */ @@ -791,7 +791,7 @@ zend_hash_find(PG(http_globals)[TRACK_VARS_POST]->value.ht, "XDEBUG_SESSION_STOP", sizeof("XDEBUG_SESSION_STOP"), (void **) &dummy) == SUCCESS ) ) { - php_setcookie("xdebug_session", 13, "", 0, time(NULL) + 3600, "/", 1, NULL, 0, 0 COOKIE_ENCODE TSRMLS_CC); + php_setcookie("xdebug_session", 13, "", 0, time(NULL) + 3600, "/", 1, NULL, 0, 0, COOKIE_ENCODE TSRMLS_CC); } /* Start context if requested */ | ||||
Tags | No tags attached. | ||||
Operating System | Any | ||||
PHP Version | 5.0.0-dev | ||||
|
I don't think your patch is correct, as it will break with PHP 4.3 (that's why I made this change in the first place). Which version of xdebug.c do you have? |
|
Oops. Rather stupid patch =( Will try to find a real solution.. |
|
Yep, I've already found it myself =( I just have checked xdebug from CVS. The real reason is: in PHP-HEAD PHP_API_VERSION == 20030820 and this check: #if PHP_API_VERSION > 20030820 should look like: #if PHP_API_VERSION >= 20030820 |
|
Reminder sent to derick Derick, current CVS version of xdebug still fails to build with CVS version of PHP because of error in php_setcookie() call. Am I wrong with my proposition to change #if PHP_API_VERSION > 20030820 to #if PHP_API_VERSION >= 20030820 ? Or this error is my fault? Thanx. |
|
Yeah, that's wrong too as we need to change the > to >= and not the other way around. I'll be commiting a patch in a minute. |
|
Fixed in CVS. |
Date Modified | Username | Field | Change |
---|---|---|---|
2003-10-08 10:10 | tony2001 | New Issue | |
2003-10-08 10:14 | derick | Note Added: 0000017 | |
2003-10-08 10:14 | derick | Status | new => feedback |
2003-10-08 10:15 | tony2001 | Note Added: 0000018 | |
2003-10-08 10:20 | tony2001 | Note Added: 0000019 | |
2003-10-08 14:39 | tony2001 | Note Added: 0000020 | |
2003-10-09 09:05 | derick | Note Added: 0000021 | |
2003-10-09 09:07 | derick | Note Added: 0000022 | |
2003-10-09 09:07 | derick | Status | feedback => closed |