[PHP-DEV] Bug #14671: cyrus module does not compile at all?

2001-12-23 Thread hps

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 6.2
PHP version:  4.1.0
PHP Bug Type: Compile Failure
Bug description:  cyrus module does not compile at all?

I'm using cyrus-imapd 2.0.16 for E-Mail. I wanted to compile
the cyrus support into php for accessing the cyrus server
administartion. Compilation fails with various errors.

Reason for this is simple: The name of one constant is wrong, there is a
superflous _ in a constant registration and finally a void function is used
in an if(). This module has never compiled (or even tested) by anyone of
the PHP team.

Unfortunately, fixing this bug changes the name of one registered constant
in php. So a doc change may be needed,
too.

Patch to compile the cyrus module is attached

--- php-4.1.0/ext/cyrus/cyrus.c Fri Oct 12 01:51:14 2001
+++ php-4.1.0.p/ext/cyrus/cyrus.c   Sun Dec 23 14:36:22 2001
@@ -85,9 +85,9 @@
le_cyrus = zend_register_list_destructors_ex(cyrus_free, NULL, 
 le_cyrus_name,
module_number);
 
-   REGISTER_LONG_CONSTANT("CYRUS_CONN_NOSYNCLITERAL", 
-  IMCLIENT_CONN_NOSYNCLITERAL,
-  CONST_CS_ | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("CYRUS_CONN_NONSYNCLITERAL", 
+  IMCLIENT_CONN_NONSYNCLITERAL,
+  CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CYRUS_CONN_INITIALRESPONSE", 
   IMCLIENT_CONN_INITIALRESPONSE,
   CONST_CS | CONST_PERSISTENT);
@@ -464,8 +464,7 @@
ZEND_FETCH_RESOURCE(conn, php_cyrus *, z_conn, -1, le_cyrus_name,
le_cyrus);
convert_to_string_ex(query);
 
-   if (imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query)) !=
0) 
-   RETURN_FALSE;
+   imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query));

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14672: confusion about --enable-ucd-snmp-hack

2001-12-23 Thread hps

From: [EMAIL PROTECTED]
Operating system: RedHat Linux 6.2
PHP version:  4.1.0
PHP Bug Type: *Compile Issues
Bug description:  confusion about --enable-ucd-snmp-hack

In recent ucd-snmp versions, the function 

snmp_synch_setup(session *) is just a dummy:

/* synch_reset and synch_setup are no longer used. */
void snmp_synch_reset (struct snmp_session * notused) {}
void snmp_synch_setup (struct snmp_session * notused) {}

(ucd-snmp 4.2.1 as supplied by RedHat for RHL 6.2)

If you enable ucd-snmp-hack with this snmp-version, you 
get a resource leak, because you strdup() the session
community and the value is _not_ freed as stated in the
ext/snmp/snmp.c module.

The whole code seems pretty bogus to me, I'll try to get
a fix later. 


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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14679: Crash with RH ucd-snmp libs -- BUGFIX

2001-12-23 Thread hps

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0CVS-2001-12-23
PHP Bug Type: Reproducible crash
Bug description:  Crash with RH ucd-snmp libs -- BUGFIX

hi,

this is the fix for the snmp crash with recent red hat 
libraries. Compile fix is to check for binit() in libsnmp
and if yes, use the following calls. Addition of binit()
check in configure.in is left as an exercise for the 
reader. ;-)


--- php-4.1.0/ext/snmp/snmp.c   Mon Dec 24 03:11:23 2001
+++ /tmp/snmp.c Mon Dec 24 03:10:55 2001
@@ -158,8 +158,9 @@
 int name_length;
 int status, count,rootlen=0,gotroot=0;
oid root[MAX_NAME_LEN];
-   char buf[2048];
-   char buf2[2048];
+#define BUFSIZE 2048
+   char buf[BUFSIZE];
+   char buf2[BUFSIZE];
int keepwalking=1;
long timeout=SNMP_DEFAULT_TIMEOUT;
long retries=SNMP_DEFAULT_RETRIES;
@@ -315,7 +316,7 @@
}
 
if (st != 11) {
-  
sprint_value(buf,vars->name, vars->name_length, vars);
+   sprint_value(binit(NULL,
buf, BUFSIZE) ,vars->name, vars->name_length, vars);
}
 #if 0
Debug("snmp response is:
%s\n",buf);
@@ -325,7 +326,7 @@
} else if (st == 2) {
   
add_next_index_string(return_value,buf,1); /* Add to returned array */
} else if (st == 3)  {
-   sprint_objid(buf2,
vars->name, vars->name_length);
+   sprint_objid(binit(NULL,
buf2, BUFSIZE), vars->name, vars->name_length);
   
add_assoc_string(return_value,buf2,buf,1);
}
if (st >= 2 && st != 11) {
@@ -344,7 +345,7 @@
for (count=1, vars =
response->variables; vars && count != response->errindex;
vars = vars->next_variable,
count++);
if (vars) {
-  
sprint_objid(buf,vars->name, vars->name_length);
+  
sprint_objid(binit(NULL, buf, BUFSIZE), vars->name, vars->name_length);
}
php_error(E_WARNING,"This
name does not exist: %s\n",buf);
}

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14682: OpenSSH extension buildable as a loadable module only by chance

2001-12-24 Thread hps

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0CVS-2001-12-24
PHP Bug Type: *Configuration Issues
Bug description:  OpenSSH extension buildable as a loadable module only by chance

The openssl extension configuration queries a variable ($ext_shared) that
is set by a completely unrelated subsystem and builds as a loadable module
only by chance. This patch
is needed to query the correct setting.

+++ php-4.1.0/ext/openssl/config.m4 Mon Dec 24 02:00:51 2001
@@ -3,6 +3,6 @@
 dnl
 
 if test "$OPENSSL_DIR"; then
-  PHP_EXTENSION(openssl, $ext_shared)
+  PHP_EXTENSION(openssl, $openssl_ext_shared)
   AC_DEFINE(HAVE_OPENSSL_EXT,1,[ ])
 fi
--- php-4.1.0/configure.in~ Mon Dec 24 02:00:09 2001
+++ php-4.1.0/configure.in  Mon Dec 24 02:01:00 2001
@@ -561,6 +561,7 @@
 
 if test "$PHP_OPENSSL" != "no"; then
   PHP_SETUP_OPENSSL
+  openssl_ext_shared=$ext_shared
 fi
 
 PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,

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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14671 Updated: cyrus module does not compile at all?

2001-12-24 Thread hps

ID: 14671
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Compile Failure
Operating System: RedHat Linux 6.2
PHP Version: 4.1.0
New Comment:

That one is already fixed in the CVS. Please forget this
report. :-) 

Previous Comments:


[2001-12-23 08:50:19] [EMAIL PROTECTED]

I'm using cyrus-imapd 2.0.16 for E-Mail. I wanted to compile
the cyrus support into php for accessing the cyrus server
administartion. Compilation fails with various errors.

Reason for this is simple: The name of one constant is wrong, there is a superflous _ 
in a constant registration and finally a void function is used in an if(). This module 
has never compiled (or even tested) by anyone of the PHP team.

Unfortunately, fixing this bug changes the name of one registered constant in php. So 
a doc change may be needed,
too.

Patch to compile the cyrus module is attached

--- php-4.1.0/ext/cyrus/cyrus.c Fri Oct 12 01:51:14 2001
+++ php-4.1.0.p/ext/cyrus/cyrus.c   Sun Dec 23 14:36:22 2001
@@ -85,9 +85,9 @@
le_cyrus = zend_register_list_destructors_ex(cyrus_free, NULL, 
 le_cyrus_name, module_number);
 
-   REGISTER_LONG_CONSTANT("CYRUS_CONN_NOSYNCLITERAL", 
-  IMCLIENT_CONN_NOSYNCLITERAL,
-  CONST_CS_ | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("CYRUS_CONN_NONSYNCLITERAL", 
+  IMCLIENT_CONN_NONSYNCLITERAL,
+  CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CYRUS_CONN_INITIALRESPONSE", 
   IMCLIENT_CONN_INITIALRESPONSE,
   CONST_CS | CONST_PERSISTENT);
@@ -464,8 +464,7 @@
ZEND_FETCH_RESOURCE(conn, php_cyrus *, z_conn, -1, le_cyrus_name, le_cyrus);
convert_to_string_ex(query);
 
-   if (imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query)) != 0) 
-   RETURN_FALSE;
+   imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query));






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14671 Updated: cyrus module does not compile at all?

2001-12-24 Thread hps

ID: 14671
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Compile Failure
Operating System: RedHat Linux 6.2
PHP Version: 4.1.0
New Comment:

Closed the bug

Previous Comments:


[2001-12-24 04:25:41] [EMAIL PROTECTED]

That one is already fixed in the CVS. Please forget this
report. :-) 



[2001-12-23 08:50:19] [EMAIL PROTECTED]

I'm using cyrus-imapd 2.0.16 for E-Mail. I wanted to compile
the cyrus support into php for accessing the cyrus server
administartion. Compilation fails with various errors.

Reason for this is simple: The name of one constant is wrong, there is a superflous _ 
in a constant registration and finally a void function is used in an if(). This module 
has never compiled (or even tested) by anyone of the PHP team.

Unfortunately, fixing this bug changes the name of one registered constant in php. So 
a doc change may be needed,
too.

Patch to compile the cyrus module is attached

--- php-4.1.0/ext/cyrus/cyrus.c Fri Oct 12 01:51:14 2001
+++ php-4.1.0.p/ext/cyrus/cyrus.c   Sun Dec 23 14:36:22 2001
@@ -85,9 +85,9 @@
le_cyrus = zend_register_list_destructors_ex(cyrus_free, NULL, 
 le_cyrus_name, module_number);
 
-   REGISTER_LONG_CONSTANT("CYRUS_CONN_NOSYNCLITERAL", 
-  IMCLIENT_CONN_NOSYNCLITERAL,
-  CONST_CS_ | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("CYRUS_CONN_NONSYNCLITERAL", 
+  IMCLIENT_CONN_NONSYNCLITERAL,
+  CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CYRUS_CONN_INITIALRESPONSE", 
   IMCLIENT_CONN_INITIALRESPONSE,
   CONST_CS | CONST_PERSISTENT);
@@ -464,8 +464,7 @@
ZEND_FETCH_RESOURCE(conn, php_cyrus *, z_conn, -1, le_cyrus_name, le_cyrus);
convert_to_string_ex(query);
 
-   if (imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query)) != 0) 
-   RETURN_FALSE;
+   imclient_send(conn->client, NULL, NULL, Z_STRVAL_PP(query));






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14808: "mm" module for session saving uses hardcoded path

2002-01-02 Thread hps

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0CVS-2002-01-02
PHP Bug Type: Session related
Bug description:  "mm" module for session saving uses hardcoded path

The session saving module in ext/session uses a hardcoded
path for its session file (/tmp/mm_session). This is bad
in environments where lots of php interpreters run in 
different webservers and User IDs (and different php.ini)
files. the attached patch fixes this problem and uses
session.save_path for this file.


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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9406: if you don't have PHPRC set, php will try to load /php.ini

2001-02-22 Thread hps

From: [EMAIL PROTECTED]
Operating system: all OS
PHP version:  4.0.4pl1
PHP Bug Type: *Configuration Issues
Bug description:  if you don't have PHPRC set, php will try to load /php.ini

PHP tries to load a config file called "/php.ini" if you don't set the 
PHPRC environment variable. This is due to a bad path composition
in php_ini.c 

The environment definition is left empty and later, there is a "/php.ini"
tacked on unconditionally. This may lead to undesired behaviour if root
has its home not in /root but in / (as with some older OS).

Patch attached.

--- php-4.0.4pl1/main/php_ini.c.origThu Feb 22 17:55:44 2001
+++ php-4.0.4pl1/main/php_ini.c Thu Feb 22 17:56:28 2001
@@ -191,10 +191,14 @@
 
if (!php_ini_path) {
 #ifdef PHP_WIN32
-   
sprintf(php_ini_search_path,".;%s;%s",env_location,default_location);
+ const char delim = ';';
 #else
-   
sprintf(php_ini_search_path,".:%s:%s",env_location,default_location);
+ const char delim = ':';
 #endif
+ if(*env_location)
+   sprintf(php_ini_search_path,".%c%s%c%s",delim, 
+env_location,delim, default_location);
+ else
+   sprintf(php_ini_search_path,".%c%s",delim, default_location);
} else {
/* if path was set via -c flag, only look there */
strcpy(php_ini_search_path,default_location);




-- 
Edit Bug report at: http://bugs.php.net/?id=9406&edit=1



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]