#26362 [Opn->Fbk]: stream_select(): unable to select [0]: mod.eval.php

2003-11-22 Thread sniper
 ID:   26362
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gunnar dot peipman at mail dot ee
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows XP Pro
 PHP Version:  4.3.4
 New Comment:

Provide short but COMPLETE example script.



Previous Comments:


[2003-11-22 23:26:49] gunnar dot peipman at mail dot ee

Sorry, forgot to mention that $gSOCKARRAY is array with one socket
pointer. ($gSOCKARRAY=array($gSOCK_POINTER)).



[2003-11-22 23:24:43] gunnar dot peipman at mail dot ee

Description:

When using non-blocking sockets I get the following error:

Warning: stream_select(): unable to select [0]: No error in
c:\web\www\bot\bot\mod.eval.php(17).



Reproduce code:
---
Open stream to IRC server and after getting connection and identifying
the script try to use the following code:

error_reporting(E_ALL);
echo (stream_select($gSOCKARRAY, $write=NULL, $except=NULL, 1,
1)===false);

Expected result:

I expect that for false there is no changes and for true there is some
socket I have to test. 

Actual result:
--
All I get is the warning above. I tried to change timeouts but no luck
at all. Still apache eats about 78% of my CPU.





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


#26361 [Opn->Bgs]: session compilation error

2003-11-22 Thread sniper
 ID:   26361
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phresno at concept-factory dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

Missed somehow the different target here..not PHP bug.
(fix your compilation environment)



Previous Comments:


[2003-11-22 21:40:08] phresno at concept-factory dot com

Tried Following: (exactly)

export CC=/usr/local/arm-linux/arm-linux-gcc
make clean
rm config.cache
./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--disable-all
make clean
make
make install

Compiles. Also Executes on traget system (as stated before, I can do
this simply by using the --disable-session option). Does not solve
session.lo compilation issue as session support is fully left out.
(problem I'm having is compiling in session support) Also, still
segfaults after every execution.



[2003-11-22 21:00:38] phresno at concept-factory dot com

On further note, if I compile with:

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear \
--disable-session

(sessions fully disabled)

It will compile with warnings, however, it will _always_ segfault after
executing a script on the target system.



[2003-11-22 20:54:41] phresno at concept-factory dot com

Note before I run commands, by not including --host and --target it
will build for the host system which does work. If you look at my
notes, I am building this for a target with a different CPU
architecture. This will not fix the problem as i386 binaries CANNOT run
on a StrongARM processor.

Followed your suggested compilation script...
Now I have a compiled i386 version, not an Arm version.



[2003-11-22 20:43:38] [EMAIL PROTECTED]

I'm very close to bogusing this since I believe it's not any PHP bug at
all..we'd got hundreds of reports if it was by now.

Anyway, try this:

# rm config.cache
# ./configure --disable-all
# make clean && make

(And EXACTLY and only that)




[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26362 [Opn]: stream_select(): unable to select [0]: mod.eval.php

2003-11-22 Thread gunnar dot peipman at mail dot ee
 ID:   26362
 User updated by:  gunnar dot peipman at mail dot ee
 Reported By:  gunnar dot peipman at mail dot ee
 Status:   Open
 Bug Type: Sockets related
 Operating System: Windows XP Pro
 PHP Version:  4.3.4
 New Comment:

Sorry, forgot to mention that $gSOCKARRAY is array with one socket
pointer. ($gSOCKARRAY=array($gSOCK_POINTER)).


Previous Comments:


[2003-11-22 23:24:43] gunnar dot peipman at mail dot ee

Description:

When using non-blocking sockets I get the following error:

Warning: stream_select(): unable to select [0]: No error in
c:\web\www\bot\bot\mod.eval.php(17).



Reproduce code:
---
Open stream to IRC server and after getting connection and identifying
the script try to use the following code:

error_reporting(E_ALL);
echo (stream_select($gSOCKARRAY, $write=NULL, $except=NULL, 1,
1)===false);

Expected result:

I expect that for false there is no changes and for true there is some
socket I have to test. 

Actual result:
--
All I get is the warning above. I tried to change timeouts but no luck
at all. Still apache eats about 78% of my CPU.





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


#26362 [NEW]: stream_select(): unable to select [0]: mod.eval.php

2003-11-22 Thread gunnar dot peipman at mail dot ee
From: gunnar dot peipman at mail dot ee
Operating system: Windows XP Pro
PHP version:  4.3.4
PHP Bug Type: Sockets related
Bug description:  stream_select(): unable to select [0]: mod.eval.php

Description:

When using non-blocking sockets I get the following error:

Warning: stream_select(): unable to select [0]: No error in
c:\web\www\bot\bot\mod.eval.php(17).



Reproduce code:
---
Open stream to IRC server and after getting connection and identifying the
script try to use the following code:

error_reporting(E_ALL);
echo (stream_select($gSOCKARRAY, $write=NULL, $except=NULL, 1,
1)===false);

Expected result:

I expect that for false there is no changes and for true there is some
socket I have to test. 

Actual result:
--
All I get is the warning above. I tried to change timeouts but no luck at
all. Still apache eats about 78% of my CPU.

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


#26361 [Opn]: session compilation error

2003-11-22 Thread phresno at concept-factory dot com
 ID:   26361
 User updated by:  phresno at concept-factory dot com
 Reported By:  phresno at concept-factory dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

Tried Following: (exactly)

export CC=/usr/local/arm-linux/arm-linux-gcc
make clean
rm config.cache
./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--disable-all
make clean
make
make install

Compiles. Also Executes on traget system (as stated before, I can do
this simply by using the --disable-session option). Does not solve
session.lo compilation issue as session support is fully left out.
(problem I'm having is compiling in session support) Also, still
segfaults after every execution.


Previous Comments:


[2003-11-22 21:00:38] phresno at concept-factory dot com

On further note, if I compile with:

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear \
--disable-session

(sessions fully disabled)

It will compile with warnings, however, it will _always_ segfault after
executing a script on the target system.



[2003-11-22 20:54:41] phresno at concept-factory dot com

Note before I run commands, by not including --host and --target it
will build for the host system which does work. If you look at my
notes, I am building this for a target with a different CPU
architecture. This will not fix the problem as i386 binaries CANNOT run
on a StrongARM processor.

Followed your suggested compilation script...
Now I have a compiled i386 version, not an Arm version.



[2003-11-22 20:43:38] [EMAIL PROTECTED]

I'm very close to bogusing this since I believe it's not any PHP bug at
all..we'd got hundreds of reports if it was by now.

Anyway, try this:

# rm config.cache
# ./configure --disable-all
# make clean && make

(And EXACTLY and only that)




[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26361 [Opn]: session compilation error

2003-11-22 Thread phresno at concept-factory dot com
 ID:   26361
 User updated by:  phresno at concept-factory dot com
 Reported By:  phresno at concept-factory dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

On further note, if I compile with:

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear \
--disable-session

(sessions fully disabled)

It will compile with warnings, however, it will _always_ segfault after
executing a script on the target system.


Previous Comments:


[2003-11-22 20:54:41] phresno at concept-factory dot com

Note before I run commands, by not including --host and --target it
will build for the host system which does work. If you look at my
notes, I am building this for a target with a different CPU
architecture. This will not fix the problem as i386 binaries CANNOT run
on a StrongARM processor.

Followed your suggested compilation script...
Now I have a compiled i386 version, not an Arm version.



[2003-11-22 20:43:38] [EMAIL PROTECTED]

I'm very close to bogusing this since I believe it's not any PHP bug at
all..we'd got hundreds of reports if it was by now.

Anyway, try this:

# rm config.cache
# ./configure --disable-all
# make clean && make

(And EXACTLY and only that)




[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26361 [Fbk->Opn]: session compilation error

2003-11-22 Thread phresno at concept-factory dot com
 ID:   26361
 User updated by:  phresno at concept-factory dot com
 Reported By:  phresno at concept-factory dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

Note before I run commands, by not including --host and --target it
will build for the host system which does work. If you look at my
notes, I am building this for a target with a different CPU
architecture. This will not fix the problem as i386 binaries CANNOT run
on a StrongARM processor.

Followed your suggested compilation script...
Now I have a compiled i386 version, not an Arm version.


Previous Comments:


[2003-11-22 20:43:38] [EMAIL PROTECTED]

I'm very close to bogusing this since I believe it's not any PHP bug at
all..we'd got hundreds of reports if it was by now.

Anyway, try this:

# rm config.cache
# ./configure --disable-all
# make clean && make

(And EXACTLY and only that)




[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26361 [Opn->Fbk]: session compilation error

2003-11-22 Thread sniper
 ID:   26361
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phresno at concept-factory dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

I'm very close to bogusing this since I believe it's not any PHP bug at
all..we'd got hundreds of reports if it was by now.

Anyway, try this:

# rm config.cache
# ./configure --disable-all
# make clean && make

(And EXACTLY and only that)



Previous Comments:


[2003-11-22 20:36:05] phresno at concept-factory dot com

Tried...

Still receive the errors when it tries to compile session.lo



[2003-11-22 20:20:45] [EMAIL PROTECTED]

Try:

# make clean && make




[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26361 [Fbk->Opn]: session compilation error

2003-11-22 Thread phresno at concept-factory dot com
 ID:   26361
 User updated by:  phresno at concept-factory dot com
 Reported By:  phresno at concept-factory dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

Tried...

Still receive the errors when it tries to compile session.lo


Previous Comments:


[2003-11-22 20:20:45] [EMAIL PROTECTED]

Try:

# make clean && make




[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26360 [Opn->Fbk]: PHP won't install when compiled with OpenLDAP 2.1.22

2003-11-22 Thread sniper
 ID:   26360
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mike at blackchaos dot net
-Status:   Open
+Status:   Feedback
 Bug Type: LDAP related
 Operating System: Solaris 8 on SPARC
 PHP Version:  4.3.4
 New Comment:

Please provide the full configure line you used to configure PHP.



Previous Comments:


[2003-11-22 13:02:59] mike at blackchaos dot net

Description:

Hello,

I'm having troulbe installing PHP 4.3.4 with LDAP support on Solaris 8

for SPARC.  I'm building PHP as a DSO module for Apache and everything

compiles fine on the PHP side.  It's when I do a 'make install' that 
this error messages shows up:
mmcneil> make install

Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/local/man/man1/
Installing PHP SAPI module:   apache
[activating module `php4' in /usr/local/apache/conf/httpd.conf]
cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so
chmod 755 /usr/local/apache/libexec/libphp4.so
cp /usr/local/apache/conf/httpd.conf
/usr/local/apache/conf/httpd.conf.bak
cp /usr/local/apache/conf/httpd.conf.new
/usr/local/apache/conf/httpd.conf
rm /usr/local/apache/conf/httpd.conf.new
Installing shared extensions: 
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment:  /usr/local/lib/php/
Assertion failed: BER_VALID( ber ), file encode.c, line 471
Abort
make[1]: *** [install-pear-installer] Error 134
make: *** [install-pear] Error 2









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


#26361 [Opn->Fbk]: session compilation error

2003-11-22 Thread sniper
 ID:   26361
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phresno at concept-factory dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Embedix 2.0
 PHP Version:  4.3.4
 New Comment:

Try:

# make clean && make



Previous Comments:


[2003-11-22 18:20:19] phresno at concept-factory dot com

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.






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


#26358 [Opn->Bgs]: Sablotron Module failed

2003-11-22 Thread sniper
 ID:   26358
 Updated by:   [EMAIL PROTECTED]
 Reported By:  v_santhanam at amrita dot edu
-Status:   Open
+Status:   Bogus
-Bug Type: *Compile Issues
+Bug Type: Compile Failure
 Operating System: Redhat Linux 9
 PHP Version:  4.3.4
 New Comment:

Search before submit. (already reported couple of dozen times..)



Previous Comments:


[2003-11-22 11:39:55] v_santhanam at amrita dot edu

I have tried with 
"export LDFLAGS=-lstdc++"
make
make install
Now it works well.

Apart from js package, i have also installed js-devel package. as well
as i used
'--enable-libgcc' '--with-iconv' '--with-sablotron'
'--with-xslt-sablot' '--enable-xslt' '--with-sablot-js'  apart from
other options



[2003-11-22 08:45:27] v_santhanam at amrita dot edu

Description:

When i make i get the following error :
-
/usr/local/lib/libsablot.so: undefined reference to `operator
new[](unsigned)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__si_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
delete(void*)'
/usr/local/lib/libsablot.so: undefined reference to
`__gxx_personality_v0'
/usr/local/lib/libsablot.so: undefined reference to
`__cxa_pure_virtual'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
delete[](void*)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__vmi_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
new(unsigned)'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



For your kind information i have compiled the same modules with PHP
4.3.4RC3 .I have also tried adding -lstdc++ in EXTRA_LDFLAGS line.It
didnot help.

Please help me
Thanks in Advance






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


#26325 [Opn]: At least a notice when accessing private members in a derived class?

2003-11-22 Thread drm at melp dot nl
 ID:   26325
 User updated by:  drm at melp dot nl
 Reported By:  drm at melp dot nl
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

You are right, i hadn't researched the problem that well, since i
assumed php5 would treat properties the php4-style the same way as php4
itself. But you are right; the code sample above when ran in php5
doesn't give a notice, though php4 does.


Previous Comments:


[2003-11-22 10:26:03] [EMAIL PROTECTED]

Actually, the main issue here is that PHP doesn't give a notice at all
if you access an undefined property, whether it is a private property
in a base class or not.





[2003-11-22 09:05:03] drm at melp dot nl

Excuse me, but you are *totally* missing my point here. You are telling
me things i had already pointed out in the first post.

I'll reduce my feature request to one simple line:

Can *at least* a "notice" be triggered when a private member variable
does not exist but is accessed? And by accessed i do NOT mean
assigned!

You're saying it behaves the same way php4 does, but that's just plain
bs. See the following code in PHP4:

member;
   }
}
$t = new Test ();
echo $t->getMember ();
?>

This would yield the following notice:
Notice: Undefined property: member in test.php on line 5

All i'm asking is that some notice of the SAME sort can be implemented
in php5 when trying to access parent private members.



[2003-11-20 11:46:55] [EMAIL PROTECTED]

There are two issues here. 
 
First, PHP 5 is just acting like PHP 4 did -- you can 
initialize a member of an object without explicitly 
declaring it in the class definition and PHP won't 
complain. 
 
Second, Test::$member and DeriveTest::$member aren't the 
same things. Test::$member being private, it's only 
accessible and visible from within Test. DeriveTest has no 
idea it exists, so it creates its own public member called 
$member. If you do a print_r($o) at the end of your 
script, you'll see that there are two members called 
$member, one of which is private and the other public. 
 
So yes, this is intended behaviour. One of the main ideas 
of private members is that they aren't even visible from 
derived classes. If you try to access a private member 
from a parent class, the derived class won't see it and 
will instead try using its own member, and if that doesn't 
exist it will implicitly create it. 
 
J 



[2003-11-20 04:45:48] drm at melp dot nl

Here's a more explanatory piece of code:
http://gerard.yoursite.nl/php.net/private-members.phps



[2003-11-19 17:49:24] drm at melp dot nl

Description:

Hi :)

I read in the new features list of Zend Engine 2 that access modifiers
like private/protected are introduced, but something really weird comes
in mind when reading carefully.

Private members are returned _empty_ wheing tried to be accessed from
derived classes. "Intended behaviour", is said. OK, i can live with
that. But even when i turned on notices with error_reporting, nothing
is noticed?

The case grows when looking at the following code sample. This could
produce very weird bugs when writing PHP code (i hope you can see that
;)), so I would like to convince you all to at least implement a Notice
when trying to access (non-defined) private (parent) members?

It would do the coders not using E_ALL no harm :) Please consider this
:)

Reproduce code:
---
error_reporting ( E_ALL );
class Test {
   private $member;
   function __construct ()   { $this->member = "Test constructor";
}
   function __toString (){ return "Member contains:
{$this->member}"; }
   function getMember () { return $this->member;  }
   function setMember ( $m ) { $this->member = $m; }
}
class DeriveTest extends Test {
   function __construct ()   { parent::__construct (); }
   function __toString (){ return "Member contains:
{$this->member}, though getMember() says: " . $this->getMember() ."?";
}
   function setMember ( $m ) { $this->member = $m; }
}
$o = new DeriveTest ();
echo $o, '';
$o->setMember ( "a" );
echo $o, '';


Expected result:

The expected result would be for me:

Notice: undefined member ``DeriveTest::$member'' in ...\test.php on
line 12
Member contains: , though getMember() says: Test constructor?
Member contains: a, though getMember() says: Test constructor?

or something of the sort

Actual result:
--
The actual result is:

Member contains: , though getMember() says: Test constructor?
Member contains: a, though getMember() says: Test constructor?


-

#13984 [Com]: date(I) does not correctly identify daylight saving time

2003-11-22 Thread patt_jam at hotmail dot com
 ID:   13984
 Comment by:   patt_jam at hotmail dot com
 Reported By:  bmplummer1 at home dot com
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: Windows NT/XP
 PHP Version:  4.0.6
 New Comment:

Arizona really need to observe DST during the summer between April and
October. To assure that they'll have a good taste of having
daylight/twilight later in the evening if the government allow to use
DST which means still on the MST. However, since Arizona do not observe
DST which means they are on California time (PST) will get dark early
and California will still have daylight a little while longer. If
Arizona were smart enough, they can tell the local government to move
the clock 1 hour foward and still be on MST, not on PST. The Indian
Reservation do observe daylight savings is on MST and the rest of the
state is on PST. You may want to check on www.sunrisesunset.com and
most of USA have daylight after 8pm. Best if the people in the state of
Arizona to persuade the government or vote.


Previous Comments:


[2001-11-07 16:23:26] [EMAIL PROTECTED]

in a timezone that does not observe daylight savings time, there is no
such thing as a time within daylight savings time. not all timezones
that observe daylight savings time observe the same dates for time
changes. so if you want to know if a particular data/time falls within
daylight savings time *in a particular time zone* you have to set the
timezone.

this is not a bug. this is not an issue. it is just how daylight
savings time works.



[2001-11-07 16:05:34] bmplummer1 at home dot com

>From Bug #13900
date("I") does not identify if a date occurs during daylight saving
time correctly.

[2001-11-06 00:20:42] [EMAIL PROTECTED]

if you want to check if a date occurs during daylight savings time, you
have to set your
timezone to one that observes daylight savings time. (ie.
putenv("TZ=PST8PDT"))

there's no bug here.

-

There may not be a bug but there is a issue here.  What about timezones
that don't observe daylight saving time (Like the entire state of
Arizona)?  Are the millions of us that fall under that category just
out of luck?

By the way, Arizona is the home of the World Series Champion
Diamondbacks!




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


#26361 [NEW]: session compilation error

2003-11-22 Thread phresno at concept-factory dot com
From: phresno at concept-factory dot com
Operating system: Embedix 2.0
PHP version:  4.3.4
PHP Bug Type: Compile Failure
Bug description:  session compilation error

Description:

Target: arm-linux
OS: Linux (Embedix 2.0)
Kernel: 2.4.18-rmk7-pxa3-embedix

Host: i386-slackware-linux
OS: Linux (Slackware 9.1)
Kernel: 2.4.20

./configure \
--host=i386-slackware-linux \
--target=arm-linux \
--prefix=../opt \
--disable-short-tags \
--without-mysql \
--without-pear

make -k 

On session.c I get multiple errors like this:
./development/zaurus/php-4.3.4/ext/session/session.c:121: parse error
before `php_ps_globals'
./development/zaurus/php-4.3.4/ext/session/session.c:121: initializer
element is not constant
./development/zaurus/php-4.3.4/ext/session/session.c:121: (near
initialization for `ini_entries[0].mh_arg1')

If i include pear I get other similar errors in main.c and other
locations.


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


#14636 [Com]: Session variables are lost when redirecting to a url using header() function.

2003-11-22 Thread andrew dot whale at which dot net
 ID:   14636
 Comment by:   andrew dot whale at which dot net
 Reported By:  kannan at tmsassociates dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: windows 2000 professional
 PHP Version:  4.0.6
 New Comment:

Hi

I've also had a similar problem of session variables not being passed
following a call to header(). I am running PHP 4.0.15 on an XP m/c.

The following worked for me, by placing a session_write_close() before
the call to header, followed by and exit():

session_write_close();
header("Location: $strPage");
exit();

I hope this will be of use to some.
Andrew Whale


Previous Comments:


[2002-02-07 21:23:36] [EMAIL PROTECTED]

This issue will not be able to be fixed by PHP.
Some browser does not set cookie for initial request.

To make sure cookie is enabled _always_, user must check it first.

http://www.zend.com/search_code_author.php?author=yohgaki

Use session helper html or other people post without JavaScript
version.



[2002-02-07 05:25:24] betsos at westgate dot gr

I have experienced a similar problem with Kannan but not 
due to session.auto_start. In my php.ini session.auto_start 
is set to 0.

I use the following scripts. When run, either with PHP Version 4.0.6,
or with Version 4.1.1 and IIS under NT 4.0,
the second script  - test_login.php - starts a new session
and variable $username is unset. When run with PHP 4.0.1
and Apache under Unix they work just fine.

// -- login.php --



// -- test_login.php --



// ---

According to Chris 'This is actually not a bug at all but rather
behavior of HTTP'. 

If this is the case then how comes that I don't have this
problem when I use PHP Version 4.0.1 with Apache?



[2002-02-04 00:51:05] [EMAIL PROTECTED]

I'm not sure what is going on, since I didn't have time to take a
look.
To report: Is chris' comment enough?



[2002-02-03 22:32:07] chris at k2labs dot org

This is actually not a bug at all but rather behavior of HTTP.

For PHP to be able to "find" a previously set session variable, it must
be able to identify the client, right? Well, the default method used to
accomplish this is via a cookie set when you initiate the session.
Since it appears you are redirecting the user to the member's only page
using the Location header on the same page the session is initiated,
the PHPSESSID cookie will not be set. Thus, once the user arrives at
the member's only page, PHP won't be able to identify the user. Their
session variable is still there, but PHP won't give it to a stranger.
:)

Basically, in your HTTP reponse that includes the Set-Cookie header, it
needs to be a regular 200 OK response and not a protocol level
redirection. If you absolutely have to have the behavior you're going
for here, you're going to have to use a meta refresh for the
redirection. Yes, it's not as cool, but it's the only way to set a
cookie and redirect the client in the same response. Otherwise, you'll
have to pass the value of the cookie on the URL, which might be a good
option for you actually.

Hope that helps.



[2001-12-21 20:35:17] [EMAIL PROTECTED]

Let me check this thing ;)



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

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


#1956 [Com]: Missing PNG functions for GD

2003-11-22 Thread IceTheNet at hotmail dot com
 ID:   1956
 Comment by:   IceTheNet at hotmail dot com
 Reported By:  drew at elysium dot ltd dot uk
 Status:   Closed
 Bug Type: Feature/Change Request
 Operating System: Linux RH6.0
 New Comment:

same thing happens in windows xp running IIS

Warning: imagepng(): Unable to open 'goldengate_thumb.png' for writing
in c:\inetpub\wwwroot\GOLDEN.PHP on line 52

Warning: getimagesize(goldengate_thumb.png): failed to open stream: No
such file or directory in c:\inetpub\wwwroot\GOLDEN.PHP on line 55

here is the code

"; 
echo "GD support: "; 
if(function_exists("gd_info")){ 
echo "yes"; 
$info = gd_info(); 
$keys = array_keys($info); 
for($i=1;$i\n".$keys[$i] .": " . yesNo($info[$keys[$i]]); 
} 
}else{ 
echo "no"; 
} 
echo ""; 
} 
function yesNo($bool){ 
if($bool){ 
return " yes"; 
}else{ 
return " no"; 
} 
} 
describeGDdyn(); 
   //load the image into memory and get its properties
   $img = imagecreatefrompng("goldengate.png");
   $imgsz = getimagesize("goldengate.png");
   //create new image for thumbnail 1/8 the size of the original
   $thumb = imagecreate($imgsz[0]/8, $imgsz[1]/8);
   //shrink the original image to 1/8th its size
   imagecopyresized($thumb, $img, 0, 0, 0, 0, 
$imgsz[0]/8, $imgsz[1]/8, $imgsz[0], $imgsz[1]);
   //write the thumbnail to disk
   imagepng($thumb, "goldengate_thumb.png");
   //get the image size of the thumbnail for use in the HTML below
   $thumbsz = getimagesize("goldengate_thumb.png");
   //free resources occupied by the images
   imagedestroy($img);
   imagedestroy($thumb);
?>

   
 >
 >
   


I have tried everything downgraded or upgraded to slashdots php install
still no luck it acctually appears to be a write error but i have given
the file permission to Adequately destroy my whole system if a haker
gets in.
scipt execute read write delete ect. I am a newbie to PHP that is
probably why this is in the wrong area but the condition looked simular
to what I am facing. I have no ability or knowledge of how to recompile
php. Do you have any suggestions. using included php_gd2.dll


Previous Comments:


[1999-09-04 21:51:53] rasmus at cvs dot php dot net

weird, the bug type was lost on this one



[1999-08-04 14:52:23] rasmus at cvs dot php dot net

Added - Thanks



[1999-08-04 07:08:57] drew at elysium dot ltd dot uk

The functions ImageCreateFromPng, and ImagePng are missing
so generated grahics cannot be used with GD1.6 and above.
Please find attached a diff which adds these functions.

Hope this help - Drew

diff -rNc php-3.0.12/functions/gd.c php-3.0.12-png/functions/gd.c
*** php-3.0.12/functions/gd.c   Sat Jul 17 09:11:15 1999
--- php-3.0.12-png/functions/gd.c   Wed Aug  4 13:03:45 1999
***
*** 132,137 
--- 132,140 
/* GIF support is gone from gd-1.6 */
{"imagecreatefromgif",  php3_imagecreatefromgif,NULL},
{"imagegif",php3_imagegif, 
 NULL},
+ #else
+   {"imagecreatefrompng",  php3_imagecreatefrompng,NULL},
+   {"imagepng",php3_imagepng, 
 NULL},
  #endif
{"imagedestroy",php3_imagedestroy, 
 NULL},
{"imagefill",   php3_imagefill,
 NULL},
***
*** 481,486 
--- 484,531 
RETURN_LONG(ind);
  }
  /* }}} */
+ #else
+ /* {{{ proto int imagecreatefrompng(string filename)
+ Create a new image from file or URL */
+ void php3_imagecreatefrompng (INTERNAL_FUNCTION_PARAMETERS) {
+   pval *file;
+   int ind;
+   gdImagePtr im;
+   char *fn=NULL;
+   FILE *fp;
+   int issock=0, socketd=0;
+   GD_TLS_VARS;
+ 
+   if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &file) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+ 
+   convert_to_string(file);
+ 
+   fn = file->value.str.val;
+ 
+ #if WIN32|WINNT
+   fp = fopen(file->value.str.val, "rb");
+ #else
+   fp = php3_fopen_wrapper(file->value.str.val, "r",
IGNORE_PATH|IGNORE_URL_WIN, &issock, &socketd);
+ #endif
+   if (!fp) {
+   php3_strip_url_passwd(fn);
+   php3_error(E_WARNING,
+   "ImageCreateFromPng: Unable to open %s for 
reading", fn);
+   RETURN_FALSE;
+   }
+ 
+   im = gdImageCreateFromPng (fp);
+ 
+   fflush(fp);
+   fclose(fp);
+ 
+   ind = php3_list_insert(im, GD_GLOBAL(le_gd));
+ 
+   RETURN_LONG(ind);
+ }
+ /* }}} */
  #endif
  
  /* {{{ proto int imagedestroy(int im)
***
*** 851,856 
--- 896,978 
  
if (output) {
gdImageGif (im, tmp)

#25377 [Bgs]: Class variables can be added out of class definition

2003-11-22 Thread helly
 ID:   25377
 Updated by:   [EMAIL PROTECTED]
 Reported By:  forseti at oak dot rpg dot pl
 Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Windows 98 SE
 PHP Version:  5CVS-2003-09-03 (dev)
 New Comment:

Class variables can NOT be added onnly object variables can. That makes
PHP a language between class oriented and real object oriented
languages.


Previous Comments:


[2003-11-18 15:36:23] [EMAIL PROTECTED]

This is actually a feature, not bug.




[2003-09-03 04:16:27] forseti at oak dot rpg dot pl

Description:

Class variables can be added freely out of class declaration context.
This can be done by simply assigning a value to existing object's
non-existing variable. Resulting modified object remains of his old
type.

Reproduce code:
---
b = 'bar';
$test3 = new Test;
echo 'test1: ';print_r($test1);echo '';
echo 'test2: ';print_r($test2);echo '';
echo 'test3: ';print_r($test3);echo '';
$hint = new HintTest($test2);
?>

Expected result:

Adding new class variables this way shouldn't be possible because
modified object is no longer of the same type. 
And as last line shows it is treated by engine as such.

Actual result:
--
Modified object is nevertheless treated as if it was of Test type.





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


#26360 [NEW]: PHP won't install when compiled with OpenLDAP 2.1.22

2003-11-22 Thread mike at blackchaos dot net
From: mike at blackchaos dot net
Operating system: Solaris 8 on SPARC
PHP version:  4.3.4
PHP Bug Type: LDAP related
Bug description:  PHP won't install when compiled with OpenLDAP 2.1.22

Description:

Hello,

I'm having troulbe installing PHP 4.3.4 with LDAP support on Solaris 8 
for SPARC.  I'm building PHP as a DSO module for Apache and everything 
compiles fine on the PHP side.  It's when I do a 'make install' that 
this error messages shows up:
mmcneil> make install

Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:  /usr/local/man/man1/
Installing PHP SAPI module:   apache
[activating module `php4' in /usr/local/apache/conf/httpd.conf]
cp libs/libphp4.so /usr/local/apache/libexec/libphp4.so
chmod 755 /usr/local/apache/libexec/libphp4.so
cp /usr/local/apache/conf/httpd.conf
/usr/local/apache/conf/httpd.conf.bak
cp /usr/local/apache/conf/httpd.conf.new
/usr/local/apache/conf/httpd.conf
rm /usr/local/apache/conf/httpd.conf.new
Installing shared extensions: 
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment:  /usr/local/lib/php/
Assertion failed: BER_VALID( ber ), file encode.c, line 471
Abort
make[1]: *** [install-pear-installer] Error 134
make: *** [install-pear] Error 2





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


#25876 [Com]: session_start(): Failed to initialize storage module

2003-11-22 Thread mikael at chl dot chalmers dot se
 ID:   25876
 Comment by:   mikael at chl dot chalmers dot se
 Reported By:  golden at riscom dot com
 Status:   Bogus
 Bug Type: Session related
 Operating System: freebsd 4.8
 PHP Version:  4.3.3
 New Comment:

Had the same problem, try --with-apxs2filter=... instead of
--with-apxs2=... Solved it for me.


Previous Comments:


[2003-10-20 08:27:59] golden at riscom dot com

here's parameters passed to 'configure' script:
--with-apxs2=/usr/local/apache2/bin/apxs --with-zlib --with-bz2
--with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local
--with-zlib-dir=/usr/local --with-iconv --enable-mbstring --with-mssql
--enable-xslt --with-xslt-sablot=/usr/local -with-expat-dir=/usr/local
--with-iconv-dir=/usr/local

All the additional software(Sablotron, freetds, iconv, libpng, libjpeg,
gd) were build from ports collection of FREEBSD-4.8RELEASE exactly,
with exept of zlib which was build from source using zlib-1.1.4



[2003-10-20 08:13:49] [EMAIL PROTECTED]

Can not reproduce.




[2003-10-20 07:48:26] golden at riscom dot com

tried with php-STABLE-200310180730 - same result
this message still appears in logs:
session_start(): Failed to initialize storage module



[2003-10-17 10:01:31] golden at riscom dot com

session.save_path = /tmp
and it is also /tmp when this error occurs(checked the way you
suggested)



[2003-10-17 08:27:08] [EMAIL PROTECTED]

What is the exact line in php.ini for session.save_path ?
Also, what is session.save_path set to when this error happens? (add
'echo ini_get("session.save_path");' before the session_start() and
turn output_buffering on in php.ini)




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

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


#26358 [Opn]: Sablotron Module failed

2003-11-22 Thread v_santhanam at amrita dot edu
 ID:   26358
 User updated by:  v_santhanam at amrita dot edu
 Reported By:  v_santhanam at amrita dot edu
 Status:   Open
 Bug Type: *Compile Issues
 Operating System: Redhat Linux 9
 PHP Version:  4.3.4
 New Comment:

I have tried with 
"export LDFLAGS=-lstdc++"
make
make install
Now it works well.

Apart from js package, i have also installed js-devel package. as well
as i used
'--enable-libgcc' '--with-iconv' '--with-sablotron'
'--with-xslt-sablot' '--enable-xslt' '--with-sablot-js'  apart from
other options


Previous Comments:


[2003-11-22 08:45:27] v_santhanam at amrita dot edu

Description:

When i make i get the following error :
-
/usr/local/lib/libsablot.so: undefined reference to `operator
new[](unsigned)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__si_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
delete(void*)'
/usr/local/lib/libsablot.so: undefined reference to
`__gxx_personality_v0'
/usr/local/lib/libsablot.so: undefined reference to
`__cxa_pure_virtual'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
delete[](void*)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__vmi_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
new(unsigned)'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



For your kind information i have compiled the same modules with PHP
4.3.4RC3 .I have also tried adding -lstdc++ in EXTRA_LDFLAGS line.It
didnot help.

Please help me
Thanks in Advance






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


#26325 [Opn]: At least a notice when accessing private members in a derived class?

2003-11-22 Thread abies
 ID:   26325
 Updated by:   [EMAIL PROTECTED]
 Reported By:  drm at melp dot nl
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Actually, the main issue here is that PHP doesn't give a notice at all
if you access an undefined property, whether it is a private property
in a base class or not.




Previous Comments:


[2003-11-22 09:05:03] drm at melp dot nl

Excuse me, but you are *totally* missing my point here. You are telling
me things i had already pointed out in the first post.

I'll reduce my feature request to one simple line:

Can *at least* a "notice" be triggered when a private member variable
does not exist but is accessed? And by accessed i do NOT mean
assigned!

You're saying it behaves the same way php4 does, but that's just plain
bs. See the following code in PHP4:

member;
   }
}
$t = new Test ();
echo $t->getMember ();
?>

This would yield the following notice:
Notice: Undefined property: member in test.php on line 5

All i'm asking is that some notice of the SAME sort can be implemented
in php5 when trying to access parent private members.



[2003-11-20 11:46:55] [EMAIL PROTECTED]

There are two issues here. 
 
First, PHP 5 is just acting like PHP 4 did -- you can 
initialize a member of an object without explicitly 
declaring it in the class definition and PHP won't 
complain. 
 
Second, Test::$member and DeriveTest::$member aren't the 
same things. Test::$member being private, it's only 
accessible and visible from within Test. DeriveTest has no 
idea it exists, so it creates its own public member called 
$member. If you do a print_r($o) at the end of your 
script, you'll see that there are two members called 
$member, one of which is private and the other public. 
 
So yes, this is intended behaviour. One of the main ideas 
of private members is that they aren't even visible from 
derived classes. If you try to access a private member 
from a parent class, the derived class won't see it and 
will instead try using its own member, and if that doesn't 
exist it will implicitly create it. 
 
J 



[2003-11-20 04:45:48] drm at melp dot nl

Here's a more explanatory piece of code:
http://gerard.yoursite.nl/php.net/private-members.phps



[2003-11-19 17:49:24] drm at melp dot nl

Description:

Hi :)

I read in the new features list of Zend Engine 2 that access modifiers
like private/protected are introduced, but something really weird comes
in mind when reading carefully.

Private members are returned _empty_ wheing tried to be accessed from
derived classes. "Intended behaviour", is said. OK, i can live with
that. But even when i turned on notices with error_reporting, nothing
is noticed?

The case grows when looking at the following code sample. This could
produce very weird bugs when writing PHP code (i hope you can see that
;)), so I would like to convince you all to at least implement a Notice
when trying to access (non-defined) private (parent) members?

It would do the coders not using E_ALL no harm :) Please consider this
:)

Reproduce code:
---
error_reporting ( E_ALL );
class Test {
   private $member;
   function __construct ()   { $this->member = "Test constructor";
}
   function __toString (){ return "Member contains:
{$this->member}"; }
   function getMember () { return $this->member;  }
   function setMember ( $m ) { $this->member = $m; }
}
class DeriveTest extends Test {
   function __construct ()   { parent::__construct (); }
   function __toString (){ return "Member contains:
{$this->member}, though getMember() says: " . $this->getMember() ."?";
}
   function setMember ( $m ) { $this->member = $m; }
}
$o = new DeriveTest ();
echo $o, '';
$o->setMember ( "a" );
echo $o, '';


Expected result:

The expected result would be for me:

Notice: undefined member ``DeriveTest::$member'' in ...\test.php on
line 12
Member contains: , though getMember() says: Test constructor?
Member contains: a, though getMember() says: Test constructor?

or something of the sort

Actual result:
--
The actual result is:

Member contains: , though getMember() says: Test constructor?
Member contains: a, though getMember() says: Test constructor?





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


#26359 [NEW]: posix_times gives a very large value, not related with the uptime

2003-11-22 Thread whooper at dap dot ro
From: whooper at dap dot ro
Operating system: FreeBSD 4.9
PHP version:  4.3.3
PHP Bug Type: POSIX related
Bug description:  posix_times gives a very large value, not related with the uptime

Description:

Configure Command  

FreeBSD www.dap.ro 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Wed Nov i386 ,
Apache/1.3.28 

'./configure' '--enable-versioning' '--enable-memory-limit'
'--with-layout=GNU' '--with-zlib-dir=/usr' '--disable-all'
'--with-regex=php' '--with-apxs=/usr/local/sbin/apxs' '--with-bz2=/usr'
'--enable-ctype' '--enable-dba' '--with-dom=/usr/local' '--enable-ftp'
'--with-gd' '--enable-gd-native-ttf' '--enable-gd-jis-conv'
'--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-inifile' '--with-mcrypt=/usr/local'
'--with-mhash=/usr/local' '--with-mime-magic=/usr/share/misc/magic.mime'
'--with-mysql=/usr/local' '--with-openssl=/usr' '--enable-overload'
'--with-pcre-regex=yes' '--enable-posix' '--enable-session'
'--enable-sockets' '--enable-tokenizer' '--enable-xml'
'--with-expat-dir=/usr/local' '--with-xmlrpc' '--enable-xslt'
'--with-xslt-sablot=/usr/local' '--with-zlib=yes' '--prefix=/usr/local'
'i386-portbld-freebsd4.9'  


Loaded modules :

mod_php4, mod_setenvif, mod_so, mod_unique_id, mod_usertrack, mod_headers,
mod_expires, mod_cern_meta, mod_proxy, mod_digest, mod_auth_db,
mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir,
mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation,
mod_mime, mod_mime_magic, mod_log_config, mod_env, mod_vhost_alias,
mod_mmap_static, http_core 



Reproduce code:
---


Expected result:

Services UpTime: 2 days, 3 hours, 15 minutes

Actual result:
--
Services UpTime: 0-90328 minutes

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


#26325 [Bgs->Opn]: At least a notice when accessing private members in a derived class?

2003-11-22 Thread drm at melp dot nl
 ID:   26325
 User updated by:  drm at melp dot nl
 Reported By:  drm at melp dot nl
-Status:   Bogus
+Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Excuse me, but you are *totally* missing my point here. You are telling
me things i had already pointed out in the first post.

I'll reduce my feature request to one simple line:

Can *at least* a "notice" be triggered when a private member variable
does not exist but is accessed? And by accessed i do NOT mean
assigned!

You're saying it behaves the same way php4 does, but that's just plain
bs. See the following code in PHP4:

member;
   }
}
$t = new Test ();
echo $t->getMember ();
?>

This would yield the following notice:
Notice: Undefined property: member in test.php on line 5

All i'm asking is that some notice of the SAME sort can be implemented
in php5 when trying to access parent private members.


Previous Comments:


[2003-11-20 11:46:55] [EMAIL PROTECTED]

There are two issues here. 
 
First, PHP 5 is just acting like PHP 4 did -- you can 
initialize a member of an object without explicitly 
declaring it in the class definition and PHP won't 
complain. 
 
Second, Test::$member and DeriveTest::$member aren't the 
same things. Test::$member being private, it's only 
accessible and visible from within Test. DeriveTest has no 
idea it exists, so it creates its own public member called 
$member. If you do a print_r($o) at the end of your 
script, you'll see that there are two members called 
$member, one of which is private and the other public. 
 
So yes, this is intended behaviour. One of the main ideas 
of private members is that they aren't even visible from 
derived classes. If you try to access a private member 
from a parent class, the derived class won't see it and 
will instead try using its own member, and if that doesn't 
exist it will implicitly create it. 
 
J 



[2003-11-20 04:45:48] drm at melp dot nl

Here's a more explanatory piece of code:
http://gerard.yoursite.nl/php.net/private-members.phps



[2003-11-19 17:49:24] drm at melp dot nl

Description:

Hi :)

I read in the new features list of Zend Engine 2 that access modifiers
like private/protected are introduced, but something really weird comes
in mind when reading carefully.

Private members are returned _empty_ wheing tried to be accessed from
derived classes. "Intended behaviour", is said. OK, i can live with
that. But even when i turned on notices with error_reporting, nothing
is noticed?

The case grows when looking at the following code sample. This could
produce very weird bugs when writing PHP code (i hope you can see that
;)), so I would like to convince you all to at least implement a Notice
when trying to access (non-defined) private (parent) members?

It would do the coders not using E_ALL no harm :) Please consider this
:)

Reproduce code:
---
error_reporting ( E_ALL );
class Test {
   private $member;
   function __construct ()   { $this->member = "Test constructor";
}
   function __toString (){ return "Member contains:
{$this->member}"; }
   function getMember () { return $this->member;  }
   function setMember ( $m ) { $this->member = $m; }
}
class DeriveTest extends Test {
   function __construct ()   { parent::__construct (); }
   function __toString (){ return "Member contains:
{$this->member}, though getMember() says: " . $this->getMember() ."?";
}
   function setMember ( $m ) { $this->member = $m; }
}
$o = new DeriveTest ();
echo $o, '';
$o->setMember ( "a" );
echo $o, '';


Expected result:

The expected result would be for me:

Notice: undefined member ``DeriveTest::$member'' in ...\test.php on
line 12
Member contains: , though getMember() says: Test constructor?
Member contains: a, though getMember() says: Test constructor?

or something of the sort

Actual result:
--
The actual result is:

Member contains: , though getMember() says: Test constructor?
Member contains: a, though getMember() says: Test constructor?





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


#26194 [Fbk->Csd]: Call to iconv() gives "undefined function" error, php -i says iconv functional

2003-11-22 Thread sfox
 ID:   26194
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjorn dot wiberg at home dot se
-Status:   Feedback
+Status:   Closed
 Bug Type: ICONV related
 Operating System: Windows XP Professional SP-1
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Moriyoshi just committed a patch to CVS that redefines iconv at a
crucial moment.


Previous Comments:


[2003-11-21 23:14:45] [EMAIL PROTECTED]

It seems kind of random heap corruption is causing this 
problem. What extensions did you enable in your php.ini?




[2003-11-21 14:50:23] [EMAIL PROTECTED]

Patch sent to internals list just now which fixes this bug on my box. 
(NB Derick tested 5.0.0b3 on some brand of *nix - this is purely a
win32 problem.)



[2003-11-21 10:11:44] [EMAIL PROTECTED]

I get the same on win98.  Initial investigation shows that if I rename
the PHP_NAMED_FE to 'blue' on line 64 of iconv.c, the resulting
function blue() works perfectly.  It's just the word 'iconv' that makes
it b0rk, presumably because it matches the module name (why now??).

nb libiconv() currently works in userland instead..

Can someone please check whether this is win-only or cross-platform?

Cheers,
Steph



[2003-11-10 21:24:24] bjorn dot wiberg at home dot se

Description:

I'm using the binary distribution of PHP 5.0.0b2.

Calling iconv() fails with an "undefined function" error, although php
-i and phpinfo() reports the iconv extension to be functional. This
problem did not occur with 5.0.0b1.

Path to php.ini is E:\Utils\Apache Group\Apache2\custom\conf\php.ini
(set in httpd.conf through the PHPINIDir directive -- I'm running it
with Apache 2.0.48, everything works fine except for this).

Extension dir is E:\Utils\PHP\extensions (set in php.ini).
The php_iconv.dll extension is loaded in php.ini. I'm also using the
php_exif.dll, php_gd2.dll, php_mime_magic.dll (and in 5.0.0b2,
php_mysql.dll) extensions.

The php4ts.dll, iconv.dll and libmySQL.dll files have been copied to
the E:\Utils\PHP\sapi\ directory which Apache loads the PHP module
(php4apache2.dll) from.

E:\Utils\PHP and E:\Utils\PHP\dlls are in the PATH environment
variable.

I also tried the php5-win32-200311102330.zip snapshot, but got the same
error.


Reproduce code:
---
[test.php]




Expected result:

The text "This is a test.". The script works fine with PHP 5.0.0b1:

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf"
"\Utils\Apache
Group\Apache2\custom\php-bin\vhosts\myhost.dyndns.org\test.php"
Content-type: text/html
X-Powered-By: PHP/5.0.0b1

This is a test.

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf" -i |
grep iconv
iconv
iconv support enabled 
iconv implementation libiconv

iconv library version 1.8

iconv.input_encodingISO-8859-1ISO-8859-1
iconv.internal_encodingISO-8859-1ISO-8859-1
iconv.output_encodingISO-8859-1ISO-8859-1

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf" -v
PHP 5.0.0b1 (cgi-fcgi) (built: Jun 28 2003 00:31:05)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies


Actual result:
--
An "undefined function" error:

E:\Utils\PHP>php.exe -c "\Utils\Apache Group\Apache2\custom\conf"
"\Utils\Apache
Group\Apache2\custom\php-bin\vhosts\myhost.dyndns.org\test.php"
PHP Fatal error:  Call to undefined function iconv() in E:\Utils\Apache
Group\Apache2\custom\php-bin\vhosts\myhost.dyndns.org\test.php on line
3
Content-type: text/html
X-Powered-By: PHP/5.0.0b2

E:\Utils\PHP>php -c "\Utils\Apache Group\Apache2\custom\conf\php.ini"
-i | grep
iconv
iconv
iconv support enabled 
iconv implementation libiconv

iconv library version 1.8

iconv.input_encodingISO-8859-1ISO-8859-1
iconv.internal_encodingISO-8859-1ISO-8859-1
iconv.output_encodingISO-8859-1ISO-8859-1

E:\Utils\PHP>php -v
PHP 5.0.0b2 (cgi-fcgi) (built: Oct 30 2003 12:37:18)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies






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


#26358 [NEW]: Sablotron Module failed

2003-11-22 Thread v_santhanam at amrita dot edu
From: v_santhanam at amrita dot edu
Operating system: Redhat Linux 9
PHP version:  4.3.4
PHP Bug Type: *Compile Issues
Bug description:  Sablotron Module failed

Description:

When i make i get the following error :
-
/usr/local/lib/libsablot.so: undefined reference to `operator
new[](unsigned)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__si_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
delete(void*)'
/usr/local/lib/libsablot.so: undefined reference to
`__gxx_personality_v0'
/usr/local/lib/libsablot.so: undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
delete[](void*)'
/usr/local/lib/libsablot.so: undefined reference to `vtable for
__cxxabiv1::__vmi_class_type_info'
/usr/local/lib/libsablot.so: undefined reference to `operator
new(unsigned)'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



For your kind information i have compiled the same modules with PHP
4.3.4RC3 .I have also tried adding -lstdc++ in EXTRA_LDFLAGS line.It
didnot help.

Please help me
Thanks in Advance


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