#20857 [NEW]: snmpset does not work

2002-12-06 Thread rs
From: [EMAIL PROTECTED]
Operating system: Linux RH 7.3
PHP version:  4.3.0RC2
PHP Bug Type: SNMP related
Bug description:  snmpset does not work

I use php-4.3.0RC2 with net-snmp-5.0.6. It works so far, but snmpset()
always shows a warning "Could not add variable: " and the variable is not
set.
I found out, that there is a bug in ext/snmp.c. Here, type and value of
the varible are not passed to php_snmp_internal(), so these variables are
always 0 and snmp_add_var() fails. So, as a solution, php_snmp and
php_snmpv3 should pass type and value to php_snmp_internal ant everything
is ok.

-- 
Edit bug report at http://bugs.php.net/?id=20857&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20857&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=20857&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=20857&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20857&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=20857&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=20857&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=20857&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=20857&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=20857&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=20857&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20857&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=20857&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=20857&r=isapi




#20857 [Fbk->Opn]: snmpset does not work

2002-12-07 Thread rs
 ID:   20857
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: SNMP related
 Operating System: Linux RH 7.3
 PHP Version:  4.3.0RC2
 New Comment:

I tried this patch in diff -u format. Note that there is also a change
in the php_error_docref-string, becaue the output was not very
informative. Of course, I would prefer, that a php-snmp maintainer
would have a look at it.

--- snmp.c.orig Mon Nov 11 22:37:18 2002
+++ snmp.c  Sat Dec  7 11:23:24 2002
@@ -197,7 +197,7 @@
 static void php_snmp_internal(INTERNAL_FUNCTION_PARAMETERS,
int st,
struct snmp_session *session,
-   char *objid) 
+   char *objid, char type, char* value) 
 {
struct snmp_session *ss;
struct snmp_pdu *pdu=NULL, *response;
@@ -211,8 +211,6 @@
char buf[2048];
char buf2[2048];
int keepwalking=1;
-   char type = (char) 0;
-   char *value = (char *) 0;
char *err;
 
if (st >= 2) { /* walk */
@@ -267,7 +265,12 @@
} else if (st == 11) {
pdu = snmp_pdu_create(SNMP_MSG_SET);
if (snmp_add_var(pdu, name, name_length, type, value)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
add
variable: %s", name);
+#ifdef HAVE_NET_SNMP
+   snprint_objid(buf, sizeof(buf), name, name_length);
+#else
+   sprint_objid(buf, name, name_length);
+#endif
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
+add
variable: %s %c %s", buf, type, value);
snmp_close(ss);
RETURN_FALSE;
}
@@ -466,7 +469,7 @@

session.authenticator = NULL;
 
-   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a3));
+   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a3), type, value);
 }
 /* }}} */
 
@@ -849,7 +852,7 @@
session.retries = retries;
session.timeout = timeout;
 
-   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a8));
+   php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, &session,
Z_STRVAL_PP(a8), type, value);
 }
 /* }}} */


Previous Comments:


[2002-12-06 18:37:58] [EMAIL PROTECTED]

Do you have a patch for this?




[2002-12-06 08:12:46] [EMAIL PROTECTED]

I use php-4.3.0RC2 with net-snmp-5.0.6. It works so far, but snmpset()
always shows a warning "Could not add variable: " and the variable is
not set.
I found out, that there is a bug in ext/snmp.c. Here, type and value of
the varible are not passed to php_snmp_internal(), so these variables
are always 0 and snmp_add_var() fails. So, as a solution, php_snmp and
php_snmpv3 should pass type and value to php_snmp_internal ant
everything is ok.





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




#30810 [Com]: discrepancy of bitwise operations between php4.3.9 and php5.0.2

2005-01-06 Thread rs at esoft dot dk
 ID:   30810
 Comment by:   rs at esoft dot dk
 Reported By:  swoo at gvlabs dot com
 Status:   Open
 Bug Type: Variables related
 Operating System: winxp
 PHP Version:  5.0.2
 New Comment:

Seems to be fixed in 5.0.3


Previous Comments:


[2004-11-17 04:51:05] swoo at gvlabs dot com

Description:

This problem was discovered when I was testing some working code in
preparation for migrating from php4 to php5.
The example is a fragment of the logic used to read an ieee 754 number
from an excel spreadsheet. When you run the code in php4 it yields the
correct interpretation.  However, with php5 it appears that the bitwise
mask and shift when setting $fexp fails with the code that works with
php4.
Also, the php5 resolution of the number is slightly higher.
I recoded the example with the logic that works with php5.
Was there a change in the ieee library or a change to the casting of a
floating point number for bit manipulation in php5? I have not tested
this on any other platform.



Reproduce code:
---
> 20) - 1023;   // FAILS IN 
PHP5
$val = 1+(($num_hi & 0x000f)+$num_lo/4294967296)/1048576;

} else {

// php 5.0.2 (cli) build: Sep 24 2004 01:25:41
// Zend Engine v2.0.2

$num_lo =
(pow(2,24)*ord($ieee[3]))+(ord($ieee[0])|(ord($ieee[1])<<8)|(ord($ieee[2])<<16));
$num_hi = (pow(2,24)*ord($ieee[7]) &
0x7f)+(ord($ieee[4])|(ord($ieee[5])<<8)|((ord($ieee[6]) & 0x1f)<<16));

$b1 = (ord($ieee[7]) & 0x7f);  // strip the sign bit from the 
high
byte
$b2 = (ord($ieee[6]) >> 4);  // get byte leftmost bits 
$b3 =($b1 << 4) + ($b2);  // shift 4 bits and add low 4 bits
$fexp = $b3  - 1023;  // exponent
$val = 1+ ($num_hi + ($num_lo/pow(2,32)))/pow(2,20);

}

if( ($fexp==1024) || ($fexp==-1023) )
return (float)0;

if( $fexp > 0 ) {
for( $i=0; $i<$fexp; $i++ )
$val *= 2;
} else {
for( $i=0; $i

Expected result:

(when run with php4)
php5 test -238.583196077
php4 test -238.583196077

(when run with php5)
php5 test -238.598699007
php4 test -238.598699007

Actual result:
--
(when run with php4)
php5 test -238.583196077
php4 test -238.583196077

(when run with php5)
php5 test -238.598699007
php4 test 0





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


#25144 [NEW]: GD library 2.0.12 not work at IIS 6

2003-08-19 Thread rs at kunstbar dot tv
From: rs at kunstbar dot tv
Operating system: Windows Server 2003
PHP version:  4.3.2
PHP Bug Type: IIS related
Bug description:  GD library 2.0.12 not work at IIS 6

Description:

bundled GD library with GD 2.0.12 don't work on IIS 6 with Windows Server
2003 - build 3790.

Status:
- PHP 4.3.2 works (phpmyadmin 2.5.2 works)
- no Script which use GD-LIB works
- PHP 4.3.2 installed as: sapi\php4isapi.dll
- extension=php_gd2.dll is enable
- No Error, script only shows no Image.
- Path is set to: extension_dir = "C:\\PHP\\extensions"
  (also try: extension_dir = "C:\PHP\extensions"
- phpinfo() shows NO GD Support ENABLE
- same GD Scripts works on W2k and IIS 5

-Roland-


Reproduce code:
---
Use Windows Server 2003 - build 3790 with IIS 6 and try GD-LIB 2.0.12.

Expected result:

GD lib create Image

Actual result:
--
GD-LIB don't work.


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



#25144 [Bgs->Csd]: GD library 2.0.12 not work at IIS 6

2003-08-19 Thread rs at kunstbar dot tv
 ID:   25144
 User updated by:  rs at kunstbar dot tv
 Reported By:  rs at kunstbar dot tv
-Status:   Bogus
+Status:   Closed
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  4.3.2
 New Comment:

Windows Server 2003 and PHP 4.3.2 installed as sapi\php4isapi.dll NEED
to REBOOT after changes in PHP.ini !

GD library with GD 2.0.12 works after reboot without any changes.

-Roland-


Previous Comments:


[2003-08-19 05:34:35] [EMAIL PROTECTED]

"- phpinfo() shows NO GD Support ENABLE"

It is clear enough imo. Fix this install/upgrade problem first.

pierre



[2003-08-19 05:24:41] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

..shouldn't it be pretty normal that they funcs don't work if you don't
have gd enabled ? go ask this kind of basic support questions
elsewhere, no bug here.


----

[2003-08-19 05:17:41] rs at kunstbar dot tv

Description:

bundled GD library with GD 2.0.12 don't work on IIS 6 with Windows
Server 2003 - build 3790.

Status:
- PHP 4.3.2 works (phpmyadmin 2.5.2 works)
- no Script which use GD-LIB works
- PHP 4.3.2 installed as: sapi\php4isapi.dll
- extension=php_gd2.dll is enable
- No Error, script only shows no Image.
- Path is set to: extension_dir = "C:\\PHP\\extensions"
  (also try: extension_dir = "C:\PHP\extensions"
- phpinfo() shows NO GD Support ENABLE
- same GD Scripts works on W2k and IIS 5

-Roland-


Reproduce code:
---
Use Windows Server 2003 - build 3790 with IIS 6 and try GD-LIB 2.0.12.

Expected result:

GD lib create Image

Actual result:
--
GD-LIB don't work.






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



#25730 [NEW]: ereg_replace or strip_tags unexpected result

2003-10-02 Thread rs at kunstbar dot tv
From: rs at kunstbar dot tv
Operating system: Windows 2003
PHP version:  4.3.2
PHP Bug Type: Regexps related
Bug description:  ereg_replace or strip_tags unexpected result

Description:

The following reproduce code don't work under Win2003 with PHP 4.3.2. It
works with PHP 4.3.1 on all Operating Systems.

I think this was fixed last year - wasn't it ?!
http://bugs.php.net/bug.php?id=12120



Reproduce code:
---
$text = "I think this < doesn't > work. for this: < This must cut > And
here is the Real text from the String. < This must cut > Real Text from
String..";

$text = ereg_replace("[[:blank:]]+"," ",strip_tags($text));

Expected result:

I think this work. for this: And here is the Real text from the String.
Real Text from String.. 

Actual result:
--
I think this < doesn't > work. for this: < This must cut > And here is the
Real text from the String. < This must cut > Real Text from String.. 

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


Bug #62480 [Com]: mbstring and mbregex won't compile

2013-07-01 Thread rs at bytecamp dot net
Edit report at https://bugs.php.net/bug.php?id=62480&edit=1

 ID: 62480
 Comment by:     rs at bytecamp dot net
 Reported by:    rs at bytecamp dot net
 Summary:mbstring and mbregex won't compile
 Status: Feedback
 Type:   Bug
 Package:Compile Failure
 Operating System:   FreeBSD 8.1-RELEASE-p12
 PHP Version:5.4.4
 Block user comment: N
 Private report: N

 New Comment:

Sorry, I cannot test your solution, because the problematic systems have been 
upgraded and now have an updated version of the oniguruma library which doesn't 
trigger that kind of building error any more.

with kind regards,
Robert Schulze


Previous Comments:

[2013-06-29 05:09:12] yohg...@php.net

Related

https://bugs.php.net/bug.php?id=63955


[2013-06-29 05:04:52] yohg...@php.net

My CFLAGS_CLEAN is 
Makefile:CFLAGS_CLEAN = -I/usr/include -g -fvisibility=hidden -O0 -Wall

Anyway, COMMON_FLAGS is

Makefile.global:COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) 
$(CPPFLAGS) 
$(PHP_FRAMEWORKPATH)

Swapping $(INCLUDES) and $(EXTRA_INCLUDES), then "EXTRA_INCLUDES=/foo/bar 
./configure" works for you?

----
[2013-02-08 10:19:26] rs at bytecamp dot net

I've found a way to circumvent the incompatiblity.

In the top level Makefile, the macro INCLUDES must be edited so that 
/usr/local/include is mentioned last (gets a lower priority). One may also 
completely remove /usr/local/include from INCLUDES, since it is also defined in 
CFLAGS_CLEAN.

Could this be applied to the build process?

with kind regards,
Robert Schulze

----
[2012-07-06 10:56:22] rs at bytecamp dot net

I stripped off -I/usr/local/include from the libtool-call and executed it, this 
worked, no errors from make. Is there a way not to include /usr/local/include 
during build of this extension?


[2012-07-05 21:52:44] a...@php.net

I don't have any FreeBSD versions at hand, but bundled oniguruma version is 
5.9.2, so it could be incompatible ... you could easily check that just 
temporarily uninstalling 2.5.8 from the system and trying to recompile PHP 
again.




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

https://bugs.php.net/bug.php?id=62480


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


Bug #48614 [Com]: Loading "pdo_sqlite.so" fails: undefined symbol: sqlite3_libversion

2012-06-27 Thread rs at bytecamp dot net
Edit report at https://bugs.php.net/bug.php?id=48614&edit=1

 ID: 48614
 Comment by:     rs at bytecamp dot net
 Reported by:kaspernj at gmail dot com
 Summary:Loading "pdo_sqlite.so" fails: undefined symbol:
 sqlite3_libversion
 Status: Assigned
 Type:   Bug
 Package:PDO related
 Operating System:   Ubuntu Jaunty
 PHP Version:5.3.0RC4
 Assigned To:scottmac
 Block user comment: N
 Private report: N

 New Comment:

This bug still exists in PHP-5.4.4.
When will it ever be fixed?


Previous Comments:

[2012-06-13 02:43:34] kris dot glynn at virginaustralia dot com

I've just ran into this exact issue compiling php-5.3.13

I used..

--without-sqlite --with-sqlite3=shared --with-pdo-sqlite=shared

.. which still produced the "undefined symbol: sqlite3_libversion" error.

It wasn't until I tried the patch above to configure script from "jd at cpanel 
dot net" that the error goes away.

My question is why are we still having to do this with php-5.3.13 ? Am I 
missing something ?

My exact configure options are below..

./configure  --with-apxs2=/data/www2/apache/bin/apxs --prefix=/data/www2/apache 
--with-config-file-path=/data/www2/apache/php --with-openssl=/data/www2/apache 
--with-curl=/data/www2/apache --with-gd --enable-gd-native-ttf 
--with-png-dir=/data/www2/apache --with-jpeg-dir=/data/www2/apache 
--with-freetype-dir=/data/www2/apache --with-xpm-dir=/usr/X11R6/ 
--with-zlib-dir=/data/www2/apache 
--with-oci8=instantclient,/usr/lib/oracle/10.2.0.4/client/lib 
--with-libxml-dir=/data/www2/apache --with-mysql=/data/www2/apache 
--with-ldap=/data/www2/apache --with-pear=$BASE_PATH/pear/ --enable-pdo=shared 
--without-sqlite --with-sqlite3=shared --with-pdo-sqlite=shared 
--with-pdo-oci=shared,instantclient,/usr,10.2.0.4 
--with-pdo-mysql=shared,/data/www2/apache --with-mcrypt=/data/www2/apache

(all the dependencies for php as you can see above exist in /data/www2/apache)


[2010-10-14 19:21:32] jd at cpanel dot net

The problem is that pdo_sqlite compiles against the embedded copy of sqlite3 
but doesn't include the sqlite3 object files in the final pdo_sqlite.so.

Ugly patch directly against the configure script:

--- php-5.3.3.orig/configure2010-07-21 05:53:06.0 -0500
+++ php-5.3.3/configure 2010-10-14 09:40:17.0 -0500
@@ -75183,6 +75183,12 @@
 
   else
   # use bundled libs
+
+  # This change is anchored here to avoid patch being misapplied.  This 
really only needs to be added
+  # when pdo_sqlite is compiled shared and using the bundled sqlite3.  It 
shouldn't hurt so long as the
+  # bundled sqlite3 is used though.
+  shared_objects_pdo_sqlite="$shared_objects_pdo_sqlite 
ext/sqlite3/libsqlite/sqlite3.lo"
+
   if test "$enable_maintainer_zts" = "yes"; then
 threadsafe_flags="-DSQLITE_THREADSAFE=1"
   else


[2010-06-08 12:52:20] kontakt at beberlei dot de

You can get this working with the following configure:

--without-sqlite --with-sqlite3=shared --with-pdo-sqlite=shared,/usr

More information in this thread: http://news.php.net/php.pdo/427


[2010-05-25 23:50:30] ashoat at gmail dot com

The problem is still occurring. There really ought to be a patch by now.


[2010-04-25 13:00:18] ovidio dot balan at gmail dot com

lol .. :(




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

https://bugs.php.net/bug.php?id=48614


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


[PHP-BUG] Bug #62480 [NEW]: mbstring and mbregex won't compile

2012-07-04 Thread rs at bytecamp dot net
From: rs at bytecamp dot net
Operating system: FreeBSD 8.1-RELEASE-p12
PHP version:  5.4.4
Package:  Compile Failure
Bug Type: Bug
Bug description:mbstring and mbregex won't compile

Description:

When enabling mbstring and mbregex, make will bail out with the following
log:

/bin/sh /tmp/php-5.4/php-5.4.4/libtool --silent --preserve-dup-deps
--mode=compile cc  -Iext/mbstring/ -I/tmp/php-5.4/php-5.4.4/ext/mbstring/
-DPHP_ATOM_INC -I/tmp/php-5.4/php-5.4.4/include
-I/tmp/php-5.4/php-5.4.4/main -I/tmp/php-5.4/php-5.4.4
-I/tmp/php-5.4/php-5.4.4/ext/date/lib
-I/tmp/php-5.4/php-5.4.4/ext/ereg/regex -I/usr/local/include/libxml2
-I/usr/local/include -I/tmp/php-5.4/php-5.4.4/ext/mbstring/oniguruma
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl/mbfl
-I/tmp/php-5.4/php-5.4.4/ext/sqlite3/libsqlite
-I/tmp/php-5.4/php-5.4.4/TSRM -I/tmp/php-5.4/php-5.4.4/Zend   
-I/usr/local/include -g -O2 -fvisibility=hidden  -c
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c -o ext/mbstring/mbstring.lo
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function
'_php_mb_compile_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: error: expected ')'
before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: warning: cast from
pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: error: expected ')'
before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: warning: cast from
pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing
argument 2 of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing
argument 3 of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: 'OnigUChar'
undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: (Each undeclared
identifier is reported only once
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: for each
function it appears in.)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: expected ';'
before 'err_str'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:992: error: 'err_str'
undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function
'_php_mb_match_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: error: expected ')'
before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: warning: cast from
pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')'
before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from
pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')'
before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from
pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: error: expected ')'
before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: cast from
pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing
argument 2 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing
argument 3 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing
argument 4 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing
argument 5 of 'onig_search' makes pointer from integer without a cast
*** Error code 1


Test script:
---
./configure --prefix=/usr/local/php-4.4-fail --enable-mbstring
--enable-mbregex
make



-- 
Edit bug report at https://bugs.php.net/bug.php?id=62480&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62480&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62480&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62480&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62480&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62480&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62480&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62480&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62480&r=needscr

Bug #62480 [Opn]: mbstring and mbregex won't compile

2012-07-04 Thread rs at bytecamp dot net
Edit report at https://bugs.php.net/bug.php?id=62480&edit=1

 ID: 62480
 User updated by:    rs at bytecamp dot net
 Reported by:    rs at bytecamp dot net
 Summary:mbstring and mbregex won't compile
 Status: Open
 Type:   Bug
 Package:Compile Failure
 Operating System:   FreeBSD 8.1-RELEASE-p12
 PHP Version:5.4.4
 Block user comment: N
 Private report: N

 New Comment:

One thing to add: oniguruma-2.5.8 is installed on this machine (for ruby). 
Could this be the cause, because /usr/local/include is also in the list of 
include directories?


Previous Comments:

[2012-07-04 13:21:06] rs at bytecamp dot net

Description:

When enabling mbstring and mbregex, make will bail out with the following log:

/bin/sh /tmp/php-5.4/php-5.4.4/libtool --silent --preserve-dup-deps 
--mode=compile cc  -Iext/mbstring/ -I/tmp/php-5.4/php-5.4.4/ext/mbstring/ 
-DPHP_ATOM_INC -I/tmp/php-5.4/php-5.4.4/include -I/tmp/php-5.4/php-5.4.4/main 
-I/tmp/php-5.4/php-5.4.4 -I/tmp/php-5.4/php-5.4.4/ext/date/lib 
-I/tmp/php-5.4/php-5.4.4/ext/ereg/regex -I/usr/local/include/libxml2 
-I/usr/local/include -I/tmp/php-5.4/php-5.4.4/ext/mbstring/oniguruma 
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl 
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl/mbfl 
-I/tmp/php-5.4/php-5.4.4/ext/sqlite3/libsqlite -I/tmp/php-5.4/php-5.4.4/TSRM 
-I/tmp/php-5.4/php-5.4.4/Zend-I/usr/local/include -g -O2 
-fvisibility=hidden  -c /tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c -o 
ext/mbstring/mbstring.lo
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function 
'_php_mb_compile_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 2 
of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 3 
of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: 'OnigUChar' 
undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: (Each undeclared 
identifier is reported only once
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: for each function it 
appears in.)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: expected ';' before 
'err_str'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:992: error: 'err_str' undeclared 
(first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function 
'_php_mb_match_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 
2 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 
3 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 
4 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 
5 of 'onig_search' makes pointer from integer without a cast
*** Error code 1


Test script:
---
./configure --prefix=/usr/local/php-4.4-fail --enable-mbstring --enable-mbregex
make








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


Bug #62480 [Opn]: mbstring and mbregex won't compile

2012-07-06 Thread rs at bytecamp dot net
Edit report at https://bugs.php.net/bug.php?id=62480&edit=1

 ID: 62480
 User updated by:    rs at bytecamp dot net
 Reported by:    rs at bytecamp dot net
 Summary:mbstring and mbregex won't compile
 Status: Open
 Type:   Bug
 Package:Compile Failure
 Operating System:   FreeBSD 8.1-RELEASE-p12
 PHP Version:5.4.4
 Block user comment: N
 Private report: N

 New Comment:

I stripped off -I/usr/local/include from the libtool-call and executed it, this 
worked, no errors from make. Is there a way not to include /usr/local/include 
during build of this extension?


Previous Comments:

[2012-07-05 21:52:44] a...@php.net

I don't have any FreeBSD versions at hand, but bundled oniguruma version is 
5.9.2, so it could be incompatible ... you could easily check that just 
temporarily uninstalling 2.5.8 from the system and trying to recompile PHP 
again.


[2012-07-04 13:35:10] rs at bytecamp dot net

One thing to add: oniguruma-2.5.8 is installed on this machine (for ruby). 
Could this be the cause, because /usr/local/include is also in the list of 
include directories?


[2012-07-04 13:21:06] rs at bytecamp dot net

Description:

When enabling mbstring and mbregex, make will bail out with the following log:

/bin/sh /tmp/php-5.4/php-5.4.4/libtool --silent --preserve-dup-deps 
--mode=compile cc  -Iext/mbstring/ -I/tmp/php-5.4/php-5.4.4/ext/mbstring/ 
-DPHP_ATOM_INC -I/tmp/php-5.4/php-5.4.4/include -I/tmp/php-5.4/php-5.4.4/main 
-I/tmp/php-5.4/php-5.4.4 -I/tmp/php-5.4/php-5.4.4/ext/date/lib 
-I/tmp/php-5.4/php-5.4.4/ext/ereg/regex -I/usr/local/include/libxml2 
-I/usr/local/include -I/tmp/php-5.4/php-5.4.4/ext/mbstring/oniguruma 
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl 
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl/mbfl 
-I/tmp/php-5.4/php-5.4.4/ext/sqlite3/libsqlite -I/tmp/php-5.4/php-5.4.4/TSRM 
-I/tmp/php-5.4/php-5.4.4/Zend-I/usr/local/include -g -O2 
-fvisibility=hidden  -c /tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c -o 
ext/mbstring/mbstring.lo
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function 
'_php_mb_compile_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 2 
of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 3 
of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: 'OnigUChar' 
undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: (Each undeclared 
identifier is reported only once
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: for each function it 
appears in.)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: expected ';' before 
'err_str'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:992: error: 'err_str' undeclared 
(first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function 
'_php_mb_match_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 
2 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 
3 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.

#48744 [Com]: Segmentation fault with open_basedir enabled

2009-07-17 Thread rs at qcm dot cz
 ID:   48744
 Comment by:   rs at qcm dot cz
 Reported By:  tom at ideaweb dot de
 Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux Debian Etch
 PHP Version:  5.3.0
 Assigned To:  fb-req-jani
 New Comment:

Hello everyone!

I'm experiencing similar problems using PHP 5.3.0 final on 64-bit
CentOS with Apache 2.2.3.

I'm not actually getting segfaults but defining "php_admin_value
open_basedir /home/webs/" anywhere in httpd.conf results in open_basedir
errors that look like these:

Warning: Unknown: open_basedir restriction in effect.
File(/home/webs/_devel/public/index2.php) is not within the allowed
path(s): (0óûÇË*) in Unknown on line 0 Warning: Unknown: failed to
open stream: Operation not permitted in Unknown on line 0 

The open_basedir variable value is distorted in a weird way and the
string remains the same until Apache is reloaded. Then it changes to a
different set of random characters.

>From what I've tried disabling all PHP extensions didn't make any
difference, the only thing that helps is defining open_basedir in
php.ini instead.

I'm running Apache in prefork mode and PHP with Thread Safety disabled.


Previous Comments:


[2009-07-17 04:05:57] dougcsd at yahoo dot com

Here is more info on this.  

I ran into this earlier while running 5.3 Alpha snapshots.

The Snapshot:  php5.3-200810090430 (Alpha 3) did not seem to have this
problem yet, and works ok.  I have reproduced the problem on two
machines and multiple operating systems.  I see the scrambled open
basedir paths in the apache logs when a simple phpinfo() fails.

Both systems were running Slackware 12.1 (one 32 bit, and one 64 bit)
BlueWhite64 for the 12.1 64 bit.

I recently upgraded to Slackware 12.2 on the 32 bit machine to upgrade
the libc to a newer version and see if it helped, but the problem
persists.

I first saw this problem in php5.3-200903230730, and assumed it was a
development bug that would work itself out in time, and simply reverted
back.  However the problem has carried over to 5.3.0 release.

I have done a bit of digging and it appears that both PHP and Apache
are using pthreads on these machines.  Because of the randomness of when
the corruption occurs, I believe this may be related to a threading
issue, but I have yet to discover any additional details.



[2009-07-16 13:08:25] j...@php.net

Have you figured out the differences between the working and
non-working servers running 5.3 yet? That's propably the only way to
debug this. Otherwise, just let this rot. 



[2009-07-15 07:29:24] tom at ideaweb dot de

Sorry for the delay, the test server was in use...

Seems to be the same =(

(gdb) run -X -d /www/apache/current/
Starting program: /www/apache/2.2.11/bin/httpd -X -d 
/www/apache/current/
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1212967232 (LWP 27684)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212967232 (LWP 27684)]
0xb755848f in OnUpdateBaseDir (entry=0x824fbb8, 
new_value=0x83b5070 
"/www/htdocs/ecolint.ch/dev:/www/htdocs/ecolint.ch/tmp:/www/htdocs/eco
lint.ch/mysql", 
new_value_length=82, mh_arg1=0x48, mh_arg2=0xb7b37e80, 
mh_arg3=0x0, stage=4)
at /www/src/php5.3-200907101630/main/fopen_wrappers.c:103
103 if (!*p || !**p) {
(gdb)



[2009-07-10 22:15:18] j...@php.net

Is the backtrace the same?



[2009-07-10 18:46:07] tom at ideaweb dot de

Keeps crashing with php5.3-200907101630 =(

[Fri Jul 10 20:41:45 2009] [notice] child pid 13862 exit signal 
Segmentation fault (11)
[Fri Jul 10 20:41:47 2009] [notice] child pid 13863 exit signal 
Segmentation fault (11)



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/48744

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



#48744 [Com]: Segmentation fault with open_basedir enabled

2009-07-17 Thread rs at qcm dot cz
 ID:   48744
 Comment by:   rs at qcm dot cz
 Reported By:  tom at ideaweb dot de
 Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux Debian Etch
 PHP Version:  5.3.0
 Assigned To:  fb-req-jani
 New Comment:

Ok, I think I've ran into some kind of overflow game here. This is my
test PHP setup in httpd.conf:

php_admin_value safe_mode 0
php_admin_value upload_tmp_dirsomepath1_123456
php_admin_value session.save_path somepath2_123456
php_admin_value open_basedir /home/webs/
php_admin_value include_path 
.:/usr/share/misc:/usr/share:/home/webs/.libs:/home/webs/.libs/php-pear
php_admin_value display_errorsOn

To be able to see what path is being looked for in open_basedir I'm
including a file that is not within the /home/webs directory.

This is the result as expected:
Warning: include_once(): open_basedir restriction in effect.
File(/tmp/something) is not within the allowed path(s): (/home/webs/) in
/home/webs/_devel/public/index2.php on line 13 Call Stack: 0. 616224
1. {main}()

Note that the upload_tmp_dir and session.save_path variables are
exactly 16 chars long. Now let's shorten the second one a little bit:

php_admin_value upload_tmp_dirsomepath1_123456
php_admin_value session.save_path somepath2_12345
php_admin_value open_basedir /home/webs/

And what I got here:
Warning: include_once(): open_basedir restriction in effect.
File(/tmp/something) is not within the allowed path(s):
(somepath2_12345) in /home/webs/_devel/public/index2.php on line 13 Call
Stack: 0. 616184 1. {main}() 

Oops? Is that path really what I have set? Let's shorten the next one:

php_admin_value upload_tmp_dirsomepath1_12345
php_admin_value session.save_path somepath2_12345
php_admin_value open_basedir /home/webs/

And here we go:
Warning: include_once(): open_basedir restriction in effect.
File(/tmp/something) is not within the allowed path(s):
(somepath1_12345) in /home/webs/_devel/public/index2.php on line 13 Call
Stack: 0. 616176 1. {main}()

Looks like for three different setups there different strings slip into
the open_basedir variable. Silly.

I hope this helps a bit in finding the bug.


Previous Comments:


[2009-07-17 10:19:30] rs at qcm dot cz

Hello everyone!

I'm experiencing similar problems using PHP 5.3.0 final on 64-bit
CentOS with Apache 2.2.3.

I'm not actually getting segfaults but defining "php_admin_value
open_basedir /home/webs/" anywhere in httpd.conf results in open_basedir
errors that look like these:

Warning: Unknown: open_basedir restriction in effect.
File(/home/webs/_devel/public/index2.php) is not within the allowed
path(s): (0óûÇË*) in Unknown on line 0 Warning: Unknown: failed to
open stream: Operation not permitted in Unknown on line 0 

The open_basedir variable value is distorted in a weird way and the
string remains the same until Apache is reloaded. Then it changes to a
different set of random characters.

>From what I've tried disabling all PHP extensions didn't make any
difference, the only thing that helps is defining open_basedir in
php.ini instead.

I'm running Apache in prefork mode and PHP with Thread Safety disabled.



[2009-07-17 04:05:57] dougcsd at yahoo dot com

Here is more info on this.  

I ran into this earlier while running 5.3 Alpha snapshots.

The Snapshot:  php5.3-200810090430 (Alpha 3) did not seem to have this
problem yet, and works ok.  I have reproduced the problem on two
machines and multiple operating systems.  I see the scrambled open
basedir paths in the apache logs when a simple phpinfo() fails.

Both systems were running Slackware 12.1 (one 32 bit, and one 64 bit)
BlueWhite64 for the 12.1 64 bit.

I recently upgraded to Slackware 12.2 on the 32 bit machine to upgrade
the libc to a newer version and see if it helped, but the problem
persists.

I first saw this problem in php5.3-200903230730, and assumed it was a
development bug that would work itself out in time, and simply reverted
back.  However the problem has carried over to 5.3.0 release.

I have done a bit of digging and it appears that both PHP and Apache
are using pthreads on these machines.  Because of the randomness of when
the corruption occurs, I believe this may be related to a threading
issue, but I have yet to discover any additional details.



[2009-07-16 13:08:25] j...@php.net

Have you figured out the differences between the working and
non-working servers running 5.3 yet? That's propably the only way to
debug this. Otherwise, just let this rot. 



[2009-07-15 07:29:24] tom at ideaweb dot de

Sorry for the delay, the test

#48880 [Com]: Random Appearing open_basedir problem

2009-07-22 Thread rs at qcm dot cz
 ID:   48880
 Comment by:   rs at qcm dot cz
 Reported By:  brwarner at rogers dot com
 Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: *
 PHP Version:  5.3.0
 New Comment:

Still no go. Tested with snapshot php5.3-200907221230.


Previous Comments:


[2009-07-21 13:32:43] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2009-07-20 18:32:28] hristozov at gmail dot com

The same problem - Apache 2.2.11 and PHP 5.3.0 on Linux 2.6.29.

The configure options:
'./configure' \
'--with-apxs2=/www/bin/apxs' \
'--enable-mbstring' \
'--with-gd' \
'--enable-exif' \
'--with-mysql' \
'--with-zlib-dir=/usr/include' \
'--with-jpeg-dir=/usr/lib' \
'--with-freetype-dir=/usr/include' \
'--with-gettext=/usr/bin' \
'--with-curl' \
'--disable-cgi' \

The actual error:
[Mon Jul 20 21:25:51 2009] [error] [client x.x.x.x] PHP Warning: 
Unknown: open_basedir restriction in effect.
File(/path/to/blog/index.php) is not within the allowed path(s):
(\xd4\xba-\b\xd4\xba-\b<\xf6\x93\b) in Unknown on line 0
[Mon Jul 20 21:25:51 2009] [error] [client x.x.x.x] PHP Warning: 
Unknown: failed to open stream: Operation not permitted in Unknown on
line 0
[Mon Jul 20 21:25:51 2009] [error] [client x.x.x.x] PHP Fatal error: 
Unknown: Failed opening required '/path/to/blog/index.php'
(include_path='.:/usr/local/lib/php') in Unknown on line 0

And the fragment from the Apache config:
php_flag engine on
php_value open_basedir "/path/to/blog/:/tmp"



[2009-07-19 22:10:17] ninzya at inbox dot lv

Just hit this one on Windows XP.

[20-Jul-2009 01:07:54] PHP Warning:  Unknown: open_basedir restriction
in effect. File(D:\\...\\auth.php) is not within the allowed path(s):
(˜"ט"×\\(g) in Unknown on line 0

[20-Jul-2009 01:07:54] PHP Warning:  Unknown: failed to open stream:
Operation not permitted in Unknown on line 0

[20-Jul-2009 01:07:54] PHP Fatal error:  Unknown: Failed opening
required \'D:\\...\\auth.php\' (include_path=\'.;C:\\php5\\pear\') in
Unknown on line 0



[2009-07-13 09:59:08] jarda at jyxo dot com

Same problem in Debian Etch.



[2009-07-12 20:47:10] gwy...@php.net

I set up a build of 5.3 (latest SVN) with Apache 2.2.11, set
php_admin_value open_basedir, and ran the whole mess through valgrind.
Here're the results:

==63247== Invalid read of size 1
==63247==at 0x100C4974B: OnUpdateBaseDir (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100D00B5A: zend_alter_ini_entry_ex (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100D008C3: zend_alter_ini_entry (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100DF0C5D: apply_config (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100DEFF53: php_handler (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x11C2A: ap_run_handler (in /sw/httpd/bin/httpd)
==63247==by 0x124DD: ap_invoke_handler (in
/sw/httpd/bin/httpd)
==63247==by 0x100038579: ap_process_request (in
/sw/httpd/bin/httpd)
==63247==by 0x100034E3C: ap_process_http_connection (in
/sw/httpd/bin/httpd)
==63247==by 0x100012356: ap_run_process_connection (in
/sw/httpd/bin/httpd)
==63247==by 0x1000127A6: ap_process_connection (in
/sw/httpd/bin/httpd)
==63247==by 0x10005EC22: child_main (in /sw/httpd/bin/httpd)
==63247==  Address 0x1037727b0 is 0 bytes inside a block of size 17
free'd
==63247==at 0x1000BDAEF: free (vg_replace_malloc.c:324)
==63247==by 0x100CB259C: _efree (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100CFFF97: zend_restore_ini_entry_cb (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100D00042: zend_restore_ini_entry_wrapper (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100CF5F03: zend_hash_apply (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100D00225: zend_ini_deactivate (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100CE28D7: zend_deactivate (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100C40DC2: php_request_shutdown (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100DEFBB9: php_apache_request_dtor (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x100DF05B9: php_handler (in
/opt/httpd-2.2.11/modules/libphp5.so)
==63247==by 0x11C2A: ap_run_handler (in /sw/httpd/bin/httpd)
==63247==by 0x124DD: ap_inv

[PHP-BUG] Bug #51957 [NEW]: unable to build filter-extension shared

2010-05-31 Thread rs at bytecamp dot net
From: 
Operating system: FreeBSD 7.1-RELEASE-p11
PHP version:  5.2.13
Package:  *Compile Issues
Bug Type: Bug
Bug description:unable to build filter-extension shared

Description:

When compiling PHP from source, it is not possible to build the "filter"
extension as a shared object:



./configure [...]

[...]

checking whether to enable input filter support... yes, shared

configure: error: 

You've configured extension filter to build statically, but it

depends on extension pcre, which you've configured to build shared.

You either need to build filter shared or build pcre statically for the

build to be successful.





Test script:
---
./configure \

--prefix=/some/where --with-config-file-path=/some/where/etc \

--disable-ipv6 \

--enable-hash \

--enable-bcmath=shared \

--enable-libxml=shared --enable-xml=shared \

--with-xmlrpc=shared \

--enable-xmlreader=shared --enable-xmlwriter=shared \

--enable-wddx=shared --with-xsl=shared \

--with-openssl=shared \

--with-imap=shared \

--with-imap-ssl \

--enable-ftp=shared \

--with-zlib=shared --with-bz2=shared \

--enable-calendar=shared \

--enable-ctype=shared \

--with-curl=shared \

--enable-dba=shared \

--enable-exif=shared \

--with-pcre-regex=shared \

--with-gd=shared \

--enable-filter=shared \

--with-png-dir \

--with-jpeg-dir \

--with-freetype-dir \

--enable-gd-native-ttf \

--with-gettext=shared \

--with-mhash=shared \

--with-iconv=shred \

--enable-dom=shared \

--enable-mbstring=shared \

--with-mcrypt=shared \

--enable-json=shared \

--disable-mbregex \

--with-mysql=shared \

--with-mysqli=shared \

--enable-pdo=shared --with-pdo-pgsql=shared --with-pdo-mysql=shared
--with-pdo-sqlite=shared \

--with-pgsql=shared \

--enable-posix=shared \

--with-pspell=shared \

--enable-session \

--enable-simplexml=shared \

--enable-soap=shared \

--enable-sockets=shared \

--with-sqlite=shared \

--enable-sqlite-utf8 \

--enable-tokenizer=shared \




-- 
Edit bug report at http://bugs.php.net/bug.php?id=51957&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51957&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51957&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=51957&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=51957&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51957&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51957&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51957&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51957&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51957&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51957&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51957&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51957&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51957&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51957&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51957&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51957&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51957&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51957&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51957&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51957&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51957&r=mysqlcfg



Bug #51957 [Com]: unable to build filter-extension shared

2010-05-31 Thread rs at bytecamp dot net
Edit report at http://bugs.php.net/bug.php?id=51957&edit=1

 ID:   51957
 Comment by:       rs at bytecamp dot net
 Reported by:      rs at bytecamp dot net
 Summary:  unable to build filter-extension shared
 Status:   To be documented
 Type: Bug
 Package:  *Compile Issues
 Operating System: FreeBSD 7.1-RELEASE-p11
 PHP Version:  5.2.13

 New Comment:

If it shouldn't/can't be built shared, then does it mean, that I have to
build pcre static too? Btw. in FreeBSD's ports collection, filter has
always been a shared object and in PHP >=5.3 it can also be built shared
without a problem.


Previous Comments:

[2010-05-31 16:02:05] paj...@php.net

It can't and should not be build shared.

----
[2010-05-31 15:47:58] rs at bytecamp dot net

Description:

When compiling PHP from source, it is not possible to build the "filter"
extension as a shared object:



./configure [...]

[...]

checking whether to enable input filter support... yes, shared

configure: error: 

You've configured extension filter to build statically, but it

depends on extension pcre, which you've configured to build shared.

You either need to build filter shared or build pcre statically for the

build to be successful.





Test script:
---
./configure \

--prefix=/some/where --with-config-file-path=/some/where/etc \

--disable-ipv6 \

--enable-hash \

--enable-bcmath=shared \

--enable-libxml=shared --enable-xml=shared \

--with-xmlrpc=shared \

--enable-xmlreader=shared --enable-xmlwriter=shared \

--enable-wddx=shared --with-xsl=shared \

--with-openssl=shared \

--with-imap=shared \

--with-imap-ssl \

--enable-ftp=shared \

--with-zlib=shared --with-bz2=shared \

--enable-calendar=shared \

--enable-ctype=shared \

--with-curl=shared \

--enable-dba=shared \

--enable-exif=shared \

--with-pcre-regex=shared \

--with-gd=shared \

--enable-filter=shared \

--with-png-dir \

--with-jpeg-dir \

--with-freetype-dir \

--enable-gd-native-ttf \

--with-gettext=shared \

--with-mhash=shared \

--with-iconv=shred \

--enable-dom=shared \

--enable-mbstring=shared \

--with-mcrypt=shared \

--enable-json=shared \

--disable-mbregex \

--with-mysql=shared \

--with-mysqli=shared \

--enable-pdo=shared --with-pdo-pgsql=shared
--with-pdo-mysql=shared --with-pdo-sqlite=shared \

--with-pgsql=shared \

--enable-posix=shared \

--with-pspell=shared \

--enable-session \

--enable-simplexml=shared \

--enable-soap=shared \

--enable-sockets=shared \

--with-sqlite=shared \

--enable-sqlite-utf8 \

--enable-tokenizer=shared \









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


[PHP-BUG] Bug #52416 [NEW]: compilation fails when building mysqli

2010-07-23 Thread rs at bytecamp dot net
From: 
Operating system: FreeBSD 8.1-RC2
PHP version:  5.3.3
Package:  Compile Failure
Bug Type: Bug
Bug description:compilation fails when building mysqli

Description:

When compiling PHP from source, it bails out on building mysqli with the
following error:



In file included from
/root/bc_www_contrib/php-5.3/php-5.3.3/ext/mysqli/php_mysqli_structs.h:57,

 from
/root/bc_www_contrib/php-5.3/php-5.3.3/ext/mysqli/mysqli.c:33:

/usr/local/include/mysql/my_global.h:918: error: duplicate 'unsigned'

/usr/local/include/mysql/my_global.h:918: warning: useless type name in
empty declaration





The version of the MySQL client lib is: mysql-client-5.0.90

Test script:
---
./configure \

--prefix=$PREFIX --with-config-file-path=$PREFIX/etc \

--disable-ipv6 \

--enable-hash \

--enable-libxml=shared --enable-xml=shared \

--enable-xmlreader=shared --enable-xmlwriter=shared \

--enable-wddx=shared --with-xsl=shared \

--with-openssl=shared \

--enable-ftp=shared \

--with-zlib=shared --with-bz2=shared \

--enable-calendar=shared \

--enable-ctype=shared \

--with-curl=shared \

--enable-dba=shared \

--enable-exif=shared \

--enable-fileinfo=shared \

--enable-filter=shared \

--with-gd=shared \

--with-png-dir \

--with-jpeg-dir \

--with-freetype-dir \

--enable-gd-native-ttf \

--with-gettext=shared \

--with-mhash=shared \

--with-iconv=shred \

--enable-dom=shared \

--enable-mbstring=shared \

--with-mcrypt=shared \

--enable-json=shared \

--disable-mbregex \

--with-mysql=shared \

--with-mysqli=shared \

--enable-pdo=shared --with-pdo-pgsql=shared --with-pdo-mysql=shared
--with-pdo-sqlite=shared \

--with-pgsql=shared \

--enable-phar=shared \

--enable-posix=shared \

--with-pspell=shared \

--with-recode=shared \

--enable-session \

--enable-simplexml=shared \

--enable-soap=shared \

--enable-sockets=shared \

--with-sqlite=shared \

--enable-sqlite-utf8 \

--enable-tokenizer=shared \

--enable-zip=shared



make


-- 
Edit bug report at http://bugs.php.net/bug.php?id=52416&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52416&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52416&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=52416&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52416&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52416&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52416&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=52416&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=52416&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=52416&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=52416&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=52416&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=52416&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=52416&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52416&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=52416&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=52416&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=52416&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=52416&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=52416&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=52416&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=52416&r=mysqlcfg



Bug #62480 [Com]: mbstring and mbregex won't compile

2013-02-08 Thread rs at bytecamp dot net
Edit report at https://bugs.php.net/bug.php?id=62480&edit=1

 ID: 62480
 Comment by:     rs at bytecamp dot net
 Reported by:    rs at bytecamp dot net
 Summary:mbstring and mbregex won't compile
 Status: Open
 Type:   Bug
 Package:Compile Failure
 Operating System:   FreeBSD 8.1-RELEASE-p12
 PHP Version:5.4.4
 Block user comment: N
 Private report: N

 New Comment:

I've found a way to circumvent the incompatiblity.

In the top level Makefile, the macro INCLUDES must be edited so that 
/usr/local/include is mentioned last (gets a lower priority). One may also 
completely remove /usr/local/include from INCLUDES, since it is also defined in 
CFLAGS_CLEAN.

Could this be applied to the build process?

with kind regards,
Robert Schulze


Previous Comments:

[2012-07-06 10:56:22] rs at bytecamp dot net

I stripped off -I/usr/local/include from the libtool-call and executed it, this 
worked, no errors from make. Is there a way not to include /usr/local/include 
during build of this extension?


[2012-07-05 21:52:44] a...@php.net

I don't have any FreeBSD versions at hand, but bundled oniguruma version is 
5.9.2, so it could be incompatible ... you could easily check that just 
temporarily uninstalling 2.5.8 from the system and trying to recompile PHP 
again.


[2012-07-04 13:35:10] rs at bytecamp dot net

One thing to add: oniguruma-2.5.8 is installed on this machine (for ruby). 
Could this be the cause, because /usr/local/include is also in the list of 
include directories?


[2012-07-04 13:21:06] rs at bytecamp dot net

Description:

When enabling mbstring and mbregex, make will bail out with the following log:

/bin/sh /tmp/php-5.4/php-5.4.4/libtool --silent --preserve-dup-deps 
--mode=compile cc  -Iext/mbstring/ -I/tmp/php-5.4/php-5.4.4/ext/mbstring/ 
-DPHP_ATOM_INC -I/tmp/php-5.4/php-5.4.4/include -I/tmp/php-5.4/php-5.4.4/main 
-I/tmp/php-5.4/php-5.4.4 -I/tmp/php-5.4/php-5.4.4/ext/date/lib 
-I/tmp/php-5.4/php-5.4.4/ext/ereg/regex -I/usr/local/include/libxml2 
-I/usr/local/include -I/tmp/php-5.4/php-5.4.4/ext/mbstring/oniguruma 
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl 
-I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl/mbfl 
-I/tmp/php-5.4/php-5.4.4/ext/sqlite3/libsqlite -I/tmp/php-5.4/php-5.4.4/TSRM 
-I/tmp/php-5.4/php-5.4.4/Zend-I/usr/local/include -g -O2 
-fvisibility=hidden  -c /tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c -o 
ext/mbstring/mbstring.lo
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function 
'_php_mb_compile_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 2 
of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 3 
of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: 'OnigUChar' 
undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: (Each undeclared 
identifier is reported only once
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: for each function it 
appears in.)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: expected ';' before 
'err_str'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:992: error: 'err_str' undeclared 
(first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function 
'_php_mb_match_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 
'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer 
to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbs

#45887 [NEW]: setcookie function set value as 'deleted'

2008-08-21 Thread loganathan dot rs at gmail dot com
From: loganathan dot rs at gmail dot com
Operating system: Linux
PHP version:  5.2.6
PHP Bug Type: Session related
Bug description:  setcookie function set value as 'deleted'

Description:

setcookie funciton set value as 'deleted'

setcookie( 'delete_me', '', time() - 1000, '/', '', '' );

The setcookie function will silently change the '' cookie value to
'deleted' and override your expiry time to time() - 1 year.

I only noticed this when the computer I was testing on had it's date set
incorrectly to the > 1 year in the past.  The computer connects to the
server which has it's date correctly set and thus the cookie on the client
doesn't delete but stores the value "deleted" instead.


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