MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000020XdebugInstallationpublic2003-10-08 10:102003-10-09 09:07
Reportertony2001 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000020: fail to build because of php_setcookie()
Descriptionmake
/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 InformationI 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 */
TagsNo tags attached.
Operating SystemAny
PHP Version5.0.0-dev
Attached Files

- Relationships

-  Notes
(0000017)
derick (administrator)
2003-10-08 10:14

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?
(0000018)
tony2001 (reporter)
2003-10-08 10:15

Oops.
Rather stupid patch =(
Will try to find a real solution..
(0000019)
tony2001 (reporter)
2003-10-08 10:20

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
(0000020)
tony2001 (reporter)
2003-10-08 14:39

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.
(0000021)
derick (administrator)
2003-10-09 09:05

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.
(0000022)
derick (administrator)
2003-10-09 09:07

Fixed in CVS.

- Issue History
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker