#44351 [Opn]: PHP 5.2.6RC1 mysqli fails to build with mysql 5.1.23, gcc 4.3.0

2008-03-06 Thread bero at arklinux dot org
 ID:   44351
 User updated by:  bero at arklinux dot org
 Reported By:  bero at arklinux dot org
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Ark Linux
 PHP Version:  5.2.6RC1
 New Comment:

last_error and last_errno have been renamed to client_last_error and
client_last_errno respectively in current mysql 5.1.x builds, causing
this.

Here's a fix:

--- php-5.2.6RC1/ext/mysqli/mysqli_api.c.ark2008-03-06
17:47:10.0 +
+++ php-5.2.6RC1/ext/mysqli/mysqli_api.c2008-03-06
17:57:43.0 +
@@ -1373,8 +1373,13 @@
stmt->stmt = NULL;

/* restore error messages */
+#if MYSQL_VERSION_ID >= 50123
+   mysql->mysql->net.client_last_errno =
last_errno;
+   memcpy(mysql->mysql->net.client_last_error,
last_error, MYSQL_ERRMSG_SIZE);
+#else
mysql->mysql->net.last_errno = last_errno;
memcpy(mysql->mysql->net.last_error,
last_error, MYSQL_ERRMSG_SIZE);
+#endif
memcpy(mysql->mysql->net.sqlstate, sqlstate,
SQLSTATE_LENGTH+1);
}
}
@@ -1453,8 +1458,13 @@

if
(mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,flags)
== NULL) {
php_mysqli_set_error(mysql_errno(mysql->mysql), (char
*) mysql_error(mysql->mysql) TSRMLS_CC);
+#if MYSQL_VERSION_ID >= 50123
+   php_mysqli_throw_sql_exception(
mysql->mysql->net.sqlstate, mysql->mysql->net.client_last_errno
TSRMLS_CC,
+  
"%s", mysql->mysql->net.client_last_error);
+#else
php_mysqli_throw_sql_exception(
mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC,
   
"%s", mysql->mysql->net.last_error);
+#endif

/* change status */
MYSQLI_SET_STATUS(&mysql_link,
MYSQLI_STATUS_INITIALIZED);
--- php-5.2.6RC1/ext/mysqli/mysqli_nonapi.c.ark 2008-03-06
17:58:00.0 +
+++ php-5.2.6RC1/ext/mysqli/mysqli_nonapi.c 2008-03-06
17:59:37.0 +
@@ -106,8 +106,13 @@
if
(mysql_real_connect(mysql->mysql,hostname,username,passwd,dbname,port,socket,CLIENT_MULTI_RESULTS)
== NULL) {
/* Save error messages */

+#if MYSQL_VERSION_ID >= 50123
+   php_mysqli_throw_sql_exception(
mysql->mysql->net.sqlstate, mysql->mysql->net.client_last_errno
TSRMLS_CC,
+  
"%s", mysql->mysql->net.client_last_error);
+#else
php_mysqli_throw_sql_exception(
mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC,
   
"%s", mysql->mysql->net.last_error);
+#endif

php_mysqli_set_error(mysql_errno(mysql->mysql), (char
*) mysql_error(mysql->mysql) TSRMLS_CC);

@@ -212,9 +217,14 @@
MYSQLI_DISABLE_MQ;

/* restore error information */
+#if MYSQL_VERSION_ID >= 50123
+   strcpy(mysql->mysql->net.client_last_error, s_error);
+   mysql->mysql->net.client_last_errno = s_errno;
+#else
strcpy(mysql->mysql->net.last_error, s_error);
-   strcpy(mysql->mysql->net.sqlstate, s_sqlstate);
mysql->mysql->net.last_errno = s_errno;
+#endif
+   strcpy(mysql->mysql->net.sqlstate, s_sqlstate);

RETURN_FALSE;
}
@@ -266,8 +276,13 @@
result = (resultmode == MYSQLI_USE_RESULT) ?
mysql_use_result(mysql->mysql) : mysql_store_result(mysql->mysql);

if (!result) {
+#if MYSQL_VERSION_ID >= 50123
+  
php_mysqli_throw_sql_exception(mysql->mysql->net.sqlstate,
mysql->mysql->net.client_last_errno TSRMLS_CC,
+  
"%s", mysql->mysql->net.client_last_error);
+#else
   
php_mysqli_throw_sql_exception(mysql->mysql->net.sqlstate,
mysql->mysql->net.last_errno TSRMLS_CC,
   
"%s", mysql->mysql->net.last_error);
+#endif
RETURN_FALSE;
}

--- php-5.2.6RC1/ext/mysqli/php_mysqli.h.ark2008-03-06
17:53:55.0 +
+++ php-5.2.6RC1/ext/mysqli/php_mysqli.h2008-03-06
17:55:42.0 +
@@ -291,10 +291,17 @@
 #define MYSQLI_REPORT_CLOSE8
 #define MYSQLI_REPORT_ALL255

+#if MYSQL_VERSION_ID >= 50123
+#define MYSQLI_REPORT_MYSQL

#44351 [NEW]: PHP 5.2.6RC1 mysqli fails to build with mysql 5.1.23, gcc 4.3.0

2008-03-06 Thread bero at arklinux dot org
From: bero at arklinux dot org
Operating system: Ark Linux
PHP version:  5.2.6RC1
PHP Bug Type: Compile Failure
Bug description:  PHP 5.2.6RC1  mysqli fails to build with mysql 5.1.23, gcc 
4.3.0

Description:

/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_change_user':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:420: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:420: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:420: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_kill':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1152: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1152: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1152: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_ping':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1333: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1333: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1333: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_prepare':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1376: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1377: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1383: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1383: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1383: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_real_connect':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1456: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1457: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_real_query':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1495: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1495: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1495: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_select_db':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1764: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1764: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:1764: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_store_result':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:2061: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:2061: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:2061: error:
'NET' has no member named 'last_error'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c: In function
'zif_mysqli_use_result':
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:2115: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:2115: error:
'NET' has no member named 'last_errno'
/usr/src/ark/BUILD/php-5.2.6RC1/ext/mysqli/mysqli_api.c:2115: error:
'NET' has no member named 'last_error'



-- 
Edit bug report at http://bugs.php.net/?id=44351&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44351&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44351&r=trysna

#36168 [NEW]: 5.1.2 "make install" locks up with INSTALL_ROOT (5.1.1 works perfectly)

2006-01-26 Thread bero at arklinux dot org
From: bero at arklinux dot org
Operating system: Linux (Ark Linux 2005.2)
PHP version:  5.1.2
PHP Bug Type: Reproducible crash
Bug description:  5.1.2 "make install" locks up with INSTALL_ROOT (5.1.1 works 
perfectly)

Description:

Running 
 
make install install-su INSTALL_ROOT=/var/tmp/php-root 
 
in 5.1.2 after building it locks up after saying 
Installing PEAR 
environment:  /var/tmp/php-root/usr/share/pear/ 
 
The command being run by make install is 
/usr/src/ark/BUILD/php-5.1.2/build-cgi/sapi/cli/php -n 
-dshort_open_tag 0 -dsafe_mode 0 -derror_reporting E_ALL 
-ddetect_unicode 0 pear/install-pear-nozlib.phar 
-d /usr/share/pear -b /usr/bin 
 
strace shows it's waiting for a lock it never gets: 
$ strace -p 5294 
Process 5294 attached - interrupt to quit 
flock(4, LOCK_SH 
[No progress being made]
$ ls -l /proc/5294/fd/4
lr-x-- 1 root root 64 Jan 26 16:29 /proc/5294/fd/4
-> /var/tmp/php-root/usr/share/pear/.lock
$ lsof |grep pear/.lock  
php5294 root3wW  REG8,2  0 
9159776 /var/tmp/php-root/usr/share/pear/.lock  
php5294 root4rW  REG8,2  0 
9159776 /var/tmp/php-root/usr/share/pear/.lock  
 
 
It works perfectly in 5.1.1, and in 5.1.2 if I leave out 
the INSTALL_ROOT part (First guess: Something is locking 
$INSTALL_ROOT/usr/share/pear/.lock and 
unlocking /usr/share/pear/.lock) 

Reproduce code:
---
./configure --enable-pear --with-pear=/usr/share/pear
make
make install install-su INSTALL_ROOT=/var/tmp/php-root


Expected result:

php is installed properly to /var/tmp/php-root for 
packaging 

Actual result:
--
make install hangs until I Ctrl-C it 

-- 
Edit bug report at http://bugs.php.net/?id=36168&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36168&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36168&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36168&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36168&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36168&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36168&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36168&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36168&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36168&r=support
Expected behavior:http://bugs.php.net/fix.php?id=36168&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36168&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36168&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36168&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36168&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36168&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36168&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36168&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36168&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36168&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36168&r=mysqlcfg


#28793 [NEW]: php.ini settings should be able to read other php.ini settings

2004-06-15 Thread bero at arklinux dot org
From: bero at arklinux dot org
Operating system: Linux
PHP version:  5.0.0RC3
PHP Bug Type: Feature/Change Request
Bug description:  php.ini settings should be able to read other php.ini settings

Description:

This may not make a lot of sense at first look, but it 
makes perfect sense if you're using a CONFIG_FILE_SCAN_DIR 
and trying to install a number of 3rd party modules: 
 
php.ini settings should be able to reference other php.ini 
settings 
 
Example: 
[CONFIG_FILE_SCAN_DIR is set to /etc/php.d] 
 
 
/etc/php.ini has 
include_path=.;/usr/local/php-includes 
 
/etc/php.d/3rdpartymodule.ini has 
include_path=/opt/3rdpartymodule 
 
/etc/php.d/anothermodule.ini has 
include_path=/usr/local/anothermodule 
 
These are mutually exclusive --- to reduce the 
administrator workload of changing include_path for every 
3rd party module (what CONFIG_FILE_SCAN_DIR was all about 
in the first place), it would be really nice if a 3rd 
party config file could just do 
 
include_path += /opt/3rdpartymodule 
 
or 
 
include_path = $include_path:/opt/3rdpartymodule 


-- 
Edit bug report at http://bugs.php.net/?id=28793&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28793&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28793&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=28793&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=28793&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28793&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=28793&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=28793&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=28793&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=28793&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=28793&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=28793&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=28793&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28793&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=28793&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=28793&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=28793&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28793&r=float


#27663 [Com]: compile fails with cURL 7.11.1

2004-04-24 Thread bero at arklinux dot org
 ID:   27663
 Comment by:   bero at arklinux dot org
 Reported By:  toni dot viemero at iki dot fi
 Status:   Closed
 Bug Type: Compile Failure
 Operating System: Debian Woody
 PHP Version:  *
 Assigned To:  iliaa
 New Comment:

The fix will break again with curl 7.12.x, when the 
defines of obsolete functions to 0 will be removed. 
 
Please consider changing 
 
#if CURLOPT_PASSWDFUNCTION != 0 
 
to 
 
#if defined(CURLOPT_PASSWDFUNCTION) && 
CURLOPT_PASSWDFUNCTION != 0 
 
(and the same for CURLOPT_MUTE of course)


Previous Comments:


[2004-04-14 10:14:20] bchesneau at mac dot com

Thks :)

Here is the patch I've made from diff between 4.3.6RC3 
and 4.3.5 :

http://cvs.opendarwin.org/index.cgi/dports/www/php4/
files/patch-curl?rev=1.1&content-type=text/x-cvsweb-
markup

It works well on macosx 10.3/10.2



[2004-04-14 06:57:51] toni dot viemero at iki dot fi

I've submitted patch for FreeBSD PHP port, for which I pulled only
latest PHP_4_3 ext/curl/curl.c from CVS.
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/65422



[2004-04-14 06:40:20] bchesneau at mac dot com

how did you fix it ? I'm the maintener of the port on 
macosx with darwinports packaging system, and I would 
like to patch current stable version if it's possible.

Thanks for advance :)

Benoit



[2004-03-26 13:59:03] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





[2004-03-26 11:05:57] [EMAIL PROTECTED]

This also applies to PHP 5.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27663

-- 
Edit this bug report at http://bugs.php.net/?id=27663&edit=1