Re: [PHP-DEV] changes to ext/session

2001-09-20 Thread Sascha Schumann

On Wed, 19 Sep 2001, [EMAIL PROTECTED] wrote:

 I wish to add two files to ext/session, and make some minor changes to
 session.c and Makefile.in

That is not necessary.  You can register a module on run-time
by calling php_session_register_module() (check out
php_session.h for the details).

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] changes to ext/session

2001-09-20 Thread Derick Rethans

Hello Mark,

this is not neccesairy. You can register your own module from your
extension by calling the php_session_register_module() function. We did
this for SRM too. If you need some help on how to do this, don't hesitate
to contact.

regards,
Derick


On Wed, 19 Sep 2001 [EMAIL PROTECTED] wrote:

 I wish to add two files to ext/session, and make some minor changes to
 session.c and Makefile.in


 ? mod_msession.h
 ? mod_msession.c
 cvs server: Diffing .
 Index: Makefile.in
 ===
 RCS file: /repository/php4/ext/session/Makefile.in,v
 retrieving revision 1.7
 diff -r1.7 Makefile.in
 3c3
  LTLIBRARY_SOURCES = session.c mod_files.c mod_mm.c mod_user.c
 ---
  LTLIBRARY_SOURCES = session.c mod_files.c mod_mm.c mod_user.c
 mod_msession.c
 Index: session.c
 ===
 RCS file: /repository/php4/ext/session/session.c,v
 retrieving revision 1.252
 diff -r1.252 session.c
 51a52
  #include mod_msession.h
 174a176,181
  #ifdef HAVE_MSESSION
  #if HAVE_MSESSION
,
ps_msession_ptr
  #endif
  #endif
 cvs server: Diffing tests


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-
JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED]
 Boulevard Heuvelink 102 - 6828 KT Arnhem - The Netherlands
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] 4.0.6 BUG with GCC 3.0.1

2001-09-20 Thread Andre Christ

Hi,

  Indeed, binaries (including libs) compiled with gcc 3.x aren't 
 compatible to
  binaries compiled with gcc 2.95. The behaviour you discovered cannot be
  classified a php bug, it is rather a limitation of the new 
 compiler version.
 
 I was under the impression that while your statement is true
 for libraries containing C++ code, the C ABI has not changed.
 Am I wrong?

Well, I'd like to review an article in the latest IX before I can judge
about that ...

Andre


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] LIBSYMBOL??

2001-09-20 Thread Thomas Wentzel

Can anybody tell me what I'm supposed to do with the variable LIBSYMBOL
in config.m4, when creating extensions (php-4.0.6). What does it refer
to?


regards
 Thomas


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] LIBSYMBOL??

2001-09-20 Thread Thomas Wentzel

Never mind!!

Incredible what you can learn when reading the source :)

Thomas Wentzel wrote:
 
 Can anybody tell me what I'm supposed to do with the variable LIBSYMBOL
 in config.m4, when creating extensions (php-4.0.6). What does it refer
 to?
 
 regards
  Thomas
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] TSRM again

2001-09-20 Thread lo-tek

Jeroen,
then i have one more question. The real problem im trying to solve is
the ability to have multiple threads (different requests) access a resource
which may be persistent.

imagine, for instance, that i have a persistent database connection which
matches the login criteria (username, password, host, etc) of many requests.
for efficiency and resource friendliness, id want to use the same
connection, but prevent the threads from mucking around with each other if
they want to access/modify connection properties (which i guess is a bad
idea with a persistent connection, so i may disallow modification).

as i understand the TSRM code, this would not work as intended, since
TSRM data is per thread, although there will be some reuse if the server
uses thread pools to service requests.

  i guess at this point im talking mutexes. my only concern is (1) locking
overhead (2) mutex limits.

(1) is less important, since the requests will be I/O bound
(2) is a concern, given the fact that theoretically at least we may have no
upper limit to the number of connections spawned, though in actual practice
this is limited by persistent connection reuse and an idle timeout mechanism



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] ZTS and PHP-4.0.6

2001-09-20 Thread Thomas Wentzel

I just went from php-4.0.4 to php-4.0.6 (linux) and
now my extension won't compile... A lot of bitching
anywhere I use my thread safe globals.. Did anything
change with respect to this between the two versions??

/Thomas


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Question about php_fopen_and_set_opened_path...

2001-09-20 Thread Andy Sautins


Not 100% sure what my question is here, but I'm curious.

A little while back I was running PHP-4.0.6 on Solaris8 using apache and
wanted to get an idea of expect performance and configuration issues ( was
mostly curious about my apache configuration to make sure the .htaccess
calls were removed ).   I ran a perl script to hit the following script:

? print Test; ?

   I trussed an apache/php httpd process and was a little suprised by the
results.
There is a string of open/fstat/getdents64/close calls that are the majority
of the
system activity for the above simple example and I'm assuming is the
majority of
the I/O wait under load.

   I think I traced it down to a call to expand_filepath in
php_fopen_and_set_opened_path.
Not sure why this is done or what it is for.  Could someone please enlighten
me?  It is my
belief that if it could be minimized that it could significantly reduce
system load for simple
php scripts.

   Thanks.  Hope this makes sense.  What follows is the truss for a single
HTTP Get to
the above simple script:

umask(077) = 022
umask(022) = 077
setitimer(ITIMER_PROF, 0xFFBEF520, 0x) = 0
sigaction(SIGPROF, 0xFFBEF3F0, 0xFFBEF470) = 0
sigprocmask(SIG_UNBLOCK, 0xFFBEF510, 0x) = 0
pathconf(., _PC_PATH_MAX) = 1024
stat64(./, 0xFFBEE408) = 0
stat64(/, 0xFFBEE370) = 0
open64(./../, O_RDONLY|O_NDELAY) = 5
fcntl(5, F_SETFD, 0x0001) = 0
fstat64(5, 0xFFBECD90) = 0
fstat64(5, 0xFFBEE408) = 0
close(5) = 0
chdir(/local/home/usr/local/apache/htdocs) = 0
open(/local/home/usr/local/apache/htdocs/f.php, O_RDONLY) = 5
pathconf(., _PC_PATH_MAX) = 1024
stat64(./, 0xFFBED730) = 0
stat64(/, 0xFFBED698) = 0
open64(./../, O_RDONLY|O_NDELAY) = 6
fcntl(6, F_SETFD, 0x0001) = 0
fstat64(6, 0xFFBECCB8) = 0
fstat64(6, 0xFFBED730) = 0
getdents64(6, 0x0016A538, 1048) = 320
close(6) = 0
open64(./../../, O_RDONLY|O_NDELAY) = 6
fcntl(6, F_SETFD, 0x0001) = 0
fstat64(6, 0xFFBECCB8) = 0
fstat64(6, 0xFFBED730) = 0
getdents64(6, 0x0016A538, 1048) = 144
close(6) = 0
open64(./../../../, O_RDONLY|O_NDELAY) = 6
fcntl(6, F_SETFD, 0x0001) = 0
fstat64(6, 0xFFBECCB8) = 0
fstat64(6, 0xFFBED730) = 0
getdents64(6, 0x0016A538, 1048) = 648
close(6) = 0
open64(./../../../../, O_RDONLY|O_NDELAY) = 6
fcntl(6, F_SETFD, 0x0001) = 0
fstat64(6, 0xFFBECCB8) = 0
fstat64(6, 0xFFBED730) = 0
getdents64(6, 0x0016A538, 1048) = 208
close(6) = 0
open64(./../../../../../, O_RDONLY|O_NDELAY) = 6
fcntl(6, F_SETFD, 0x0001) = 0
fstat64(6, 0xFFBECCB8) = 0
fstat64(6, 0xFFBED730) = 0
getdents64(6, 0x0016A538, 1048) = 432
close(6) = 0
open64(./../../../../../../, O_RDONLY|O_NDELAY) = 6
fcntl(6, F_SETFD, 0x0001) = 0
fstat64(6, 0xFFBECCB8) = 0
fstat64(6, 0xFFBED730) = 0
open(/etc/mnttab, O_RDONLY) = 7
fstat64(7, 0xFFBEC678) = 0
ioctl(7, TCGETA, 0xFFBEC604) Err#22 EINVAL
read(7,  / d e v / d s k / c 0 t.., 512) = 455
ioctl(7, (('m'8)|1), 0xFF238BE0) = 0
ioctl(7, (('m'8)|2), 0x000BEA18) = 0
lstat64(/local, 0xFFBEC898) = 0
lstat64(/local/.., 0xFFBEC898) = 0
llseek(7, 0, SEEK_CUR) = 455
close(7) = 0
close(6) = 0
resolvepath(/local/home/usr/local/apache/htdocs/f.php,
/local/home/usr/local/apache/htdocs/f.php, 1024) = 46
ioctl(5, TCGETA, 0xFFBEE224) Err#25 ENOTTY
fstat64(5, 0xFFBECAB8) = 0
ioctl(5, TCGETA, 0xFFBECA44) Err#25 ENOTTY
read(5,   ? p r i n t  T e.., 8192) = 339
read(5, 0x001927B4, 8192) = 0
ioctl(5, TCGETA, 0xFFBECB1C) Err#25 ENOTTY
llseek(5, 0, SEEK_CUR) = 339
close(5) = 0
chdir(/) = 0
umask(022)



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: TSRM again

2001-09-20 Thread Jeroen van Wolffelaar

 Jeroen,
 then i have one more question. The real problem im trying to solve is

Would some one please answer this question, because this is getting
somewhere (mutexs) I don't know much of. And not much is nearly nothing
in this case ;-)

--Jeroen



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13371: PHP Crashes with weird output sometimes

2001-09-20 Thread jlp

From: [EMAIL PROTECTED]
Operating system: Windows XP Professional
PHP version:  4.0.6
PHP Bug Type: IIS related
Bug description:  PHP Crashes with weird output sometimes

I recently installed PHP 4 on Windows XP with IIS 5...
I coded the following script:

?php
$temp=$SERVER_SOFTWARE;
?
HTML
HEAD
TITLETesting/TITLE
/HEAD
BODY
p
the var is: ? echo $temp ?!
/BODY
/HTML

I tried to run this and it just stalled (kept trying to load the page), no
server error or anything.  I clicked stop in IE and tried to reload, same
thing.
I modified the php source and changed $SERVER_SOFTWARE to a.  
Then when I reloaded the php script, it gave me this:

the var is: a! HTTP/1.1 500 Server Error Server: Microsoft-IIS/5.1
Date: Thu, 20 Sep 2001 19:34:24 GMT Content-Type: text/html Content-Length:
44 -2147417842 (0x8001010e)

all on 1 line.

Sometimes, I reload the page and it works fully.  But it never works only
in certain circumstances (like in the script above.  Seems that it only
works if I have a minimal amount of scripting before the HTML output on the
top of the PHP file script.

Weird.

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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13371 Updated: PHP Crashes with weird output sometimes

2001-09-20 Thread jlp

ID: 13371
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: IIS related
Operating System: Windows XP Professional
PHP Version: 4.0.6
New Comment:

This only happens with ISAPI.  Not with the cgi php.exe (I just changed to use this 
since I couldn't get things working with ISAPI).

Previous Comments:


[2001-09-21 03:45:07] [EMAIL PROTECTED]

I recently installed PHP 4 on Windows XP with IIS 5...
I coded the following script:

?php
$temp=$SERVER_SOFTWARE;
?
HTML
HEAD
TITLETesting/TITLE
/HEAD
BODY
p
the var is: ? echo $temp ?!
/BODY
/HTML

I tried to run this and it just stalled (kept trying to load the page), no server 
error or anything.  I clicked stop in IE and tried to reload, same thing.
I modified the php source and changed $SERVER_SOFTWARE to a.  
Then when I reloaded the php script, it gave me this:

the var is: a! HTTP/1.1 500 Server Error Server: Microsoft-IIS/5.1 Date: Thu, 20 
Sep 2001 19:34:24 GMT Content-Type: text/html Content-Length: 44 -2147417842 
(0x8001010e)

all on 1 line.

Sometimes, I reload the page and it works fully.  But it never works only in certain 
circumstances (like in the script above.  Seems that it only works if I have a minimal 
amount of scripting before the HTML output on the top of the PHP file script.

Weird.






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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Rand - continue or not?

2001-09-20 Thread jeroen

By special request:

These are the pro's and contra's to the current proposal currently known
with me.
(see: http://www.A-Eskwadraat.nl/~jeroen/rand/ )

###Pro's:
* Hide seeding and such from the php-programmer
* All randomness controllable, with clear syntax.
* The choice-for-algorithm should NOT be to the php-programmer if you're
after random numbers.
* Make it _possible_ to add a real-random-number generator which will be
used by PHP
* Namespace-cleaning: rand, srand, getrandmax, mt_rand, mt_srand,
mt_getrandmax and lcg_value not needed anymore, simply 'random',
'random_set', and possibly 'random_value' for getting a [0,1) float.

###Contra's:
* Slower: [My code was less than 1% slower, so it's neglectable]
* More complicated C-code [True]
* Leaks, bad coding style, etc: [Implementation isn't discussed here]
* Don't fix if it isn't broken [This is no fix, it's better syntax]


Based on these arguments, I don't see any reason why not to go on. If anyone
does see a reason, and/or I missed an argument, please mail it to php-dev
and/or myself.

TIA,
Jeroen
PS: The proposal is slightly updated because of a suggestion by someone
(Joey IIRC)



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13144 Updated: Can not set post_max_size in VirtualHost

2001-09-20 Thread sniper

ID: 13144
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: *Configuration Issues
Operating System: Linux 2.4.4
PHP Version: 4.0.6
New Comment:

You should be using 'php_admin_value' instead.

--Jani


Previous Comments:


[2001-09-05 03:57:08] [EMAIL PROTECTED]

Webserver: apache 1.3.20
I have the following entry in the VirtualHost defenition:
php_value post_max_size 12M

After a restart, phpinfo() shows the Local value unchanged. It is the same as the 
Master value (10M).
Changing for example the value for upload_max_filesize is no problem.

'./configure' '--with-apxs=/local/apache/sbin/apxs' '--with-ftp' '--with-mysql=/usr' 
'--disable-short-tags' '--enable-memory-limit' '--disable-debug' '--enable-track-vars' 
'--enable-sysvsem' '--enable-sysvshm' '--enable-inline-optimization' '--with-zlib' 
'--with-gd'

Installed: Zend Optimizer v1.1.0

Cheers,
Jene







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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13372: Typo in zend.h

2001-09-20 Thread jeffh

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.6
PHP Bug Type: Scripting Engine problem
Bug description:  Typo in zend.h

zend.h:268: #define ZEND_STRS(str) (str), (sizeof(str)

This macro isn't used anywhere, but it does have to potential make break
things.
-- 
Edit bug report at: http://bugs.php.net/?id=13372edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13297 Updated: segfault in ociparse()

2001-09-20 Thread graeme

ID: 13297
Updated by: graeme
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: OCI8 related
Operating System: Solaris-2.6
PHP Version: 4.0.6
New Comment:

From compliing Oracle not as a .so but as static module in PHP, this error shows up 
when running configure.

checking for executable suffix... configure: error: installation or configuration 
problem: compiler cannot create executables.
bash-2.05# tail config.log
configure:59199: checking for object suffix
configure:59205: gcc -c -g -O2  -D_POSIX_PTHREAD_SEMANTICS conftest.c 15
configure:59225: checking for executable suffix
configure:59235: gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS  -R/usr/ucblib 
-L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3 
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3 -R/oracle/product/817/lib 
-L/oracle/product/817/lib conftest.c -lsched -ldl -lgen -lsocket -lnsl -lcrypt 
-lresolv -lresolv -lm -ldl -lnsl -lsocket  -lsocket -lgcc -lcrypt -lclntsh 15
Undefined   first referenced
 symbol in file
_delete /oracle/product/817/lib/libgen.so.1
_insert /oracle/product/817/lib/libgen.so.1
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status


Which perhaps suggests it's a problem with the Oracle 8.1.7 libs on Solaris?
$LD_LIBRARY_PATH is /vignette/oracle/product/817/lib:/usr/java1.1/lib:/usr/local/lib
in case it's relevant.


Previous Comments:


[2001-09-13 22:54:15] [EMAIL PROTECTED]

Does this happen with the latest CVS snapshot:

http://snaps.php.net/




[2001-09-13 22:30:53] [EMAIL PROTECTED]

Using gcc-2.95.3
Configure line:
./configure \
--enable-debug \
--enable-libgcc \
--with-apxs=/usr/local/apache/bin/apxs \
--without-mysql \
--enable-magic-quotes \
--enable-track-vars \
--enable-memory-limit \
--with-expat-dir=/usr/local \
--with-sablot=shared,/usr/local \
--with-oci8=shared,/oracle/product/817 \
--with-curl=shared \
--with-zlib-dir=/local \
--with-dom=shared \
--enable-shmop

oci8 and domxml modules currently loaded. Tried altering load order but no difference.

Test script:

?php
$db = ocilogon(massive,massive, PLAT);
var_dump($db);

$sql = SELECT SYSDATE FROM DUAL;
$stmt = ociparse($db, $sql);
var_dump($stmt);
?


Ouput:
bash-2.05$ php -qe test.php
resource(3) of type (oci8 connection)
resource(4) of type (oci8 statement)
Segmentation Fault (core dumped)


GDB output when stepping thru:
0x24f64 in _start ()
(gdb)

Program received signal SIGSEGV, Segmentation fault.
Cannot access memory at address 0xef22b2c4.


and a backtrace from a core:
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libpam.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/local/lib/libexpat.so.0...done.
Reading symbols from /usr/local/lib/libsablot.so.0...done.
Reading symbols from /usr/local/lib/libz.so...done.
Reading symbols from /usr/lib/libresolv.so.2...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/sun4u/lib/libc_psr.so.1...done.
Reading symbols from /usr/lib/nss_files.so.1...done.
#0  0xef22b2c4 in ?? ()
(gdb) bt
#0  0xef22b2c4 in ?? ()
#1  0xef4888ac in exit ()


However the script runs as you'll see from the output. the $stmt resource gets 
printed. I suspect there's a problem in one of the oracle shutdown functions but I 
don't know my way around c/gdb well enough





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13373: imap_fetchstructure() does not return $struct-type for text types

2001-09-20 Thread rfinnie

From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.3
PHP version:  4.0CVS-2001-09-21
PHP Bug Type: IMAP related
Bug description:  imap_fetchstructure() does not return $struct-type for text types

Bug 2181 is marked closed, but last comment indicates it should be
re-opened (sorry, I'm not the opener of 2181).  This would be what
$struct-type would normally be used for:

$types = array(
  0 = TEXT,
  1 = MULTIPART,  
  2 = MESSAGE,
  3 = APPLICATION,
  4 = AUDIO,
  5 = IMAGE,
  6 = VIDEO,
  7 = OTHER
);
if($struct-type) {
  $type = $types[$struct-type];
} else {
  $type = UNKNOWN;
}

$struct-type will always evaluate as false, but you can see from
serializing the struct object that the type isn't being set at all.  This
probably should be fixed either way.

On the other hand, can we always assume that if $struct-type is
false/null/whatever, it is a text part?
-- 
Edit bug report at: http://bugs.php.net/?id=13373edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13374: imap_fetchstructure() does not return $struct-type for text types

2001-09-20 Thread rfinnie

From: [EMAIL PROTECTED]
Operating system: FreeBSD 4.3
PHP version:  4.0CVS-2001-09-21
PHP Bug Type: IMAP related
Bug description:  imap_fetchstructure() does not return $struct-type for text types

Bug 2181 is marked closed, but last comment indicates it should be
re-opened (sorry, I'm not the opener of 2181).  This would be what
$struct-type would normally be used for:

$types = array(
  0 = TEXT,
  1 = MULTIPART,  
  2 = MESSAGE,
  3 = APPLICATION,
  4 = AUDIO,
  5 = IMAGE,
  6 = VIDEO,
  7 = OTHER
);
if($struct-type) {
  $type = $types[$struct-type];
} else {
  $type = UNKNOWN;
}

$struct-type will always evaluate as false, but you can see from
serializing the struct object that the type isn't being set at all.  This
probably should be fixed either way.

On the other hand, can we always assume that if $struct-type is
false/null/whatever, it is a text part?
-- 
Edit bug report at: http://bugs.php.net/?id=13374edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13374 Updated: imap_fetchstructure() does not return $struct-type for text types

2001-09-20 Thread rfinnie

ID: 13374
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: IMAP related
Operating System: FreeBSD 4.3
PHP Version: 4.0CVS-2001-09-21
New Comment:

hmm, don't know how this got duplicated.

Previous Comments:


[2001-09-21 07:51:57] [EMAIL PROTECTED]

Bug 2181 is marked closed, but last comment indicates it should be re-opened (sorry, 
I'm not the opener of 2181).  This would be what $struct-type would normally be used 
for:

$types = array(
  0 = TEXT,
  1 = MULTIPART,  
  2 = MESSAGE,
  3 = APPLICATION,
  4 = AUDIO,
  5 = IMAGE,
  6 = VIDEO,
  7 = OTHER
);
if($struct-type) {
  $type = $types[$struct-type];
} else {
  $type = UNKNOWN;
}

$struct-type will always evaluate as false, but you can see from serializing the 
struct object that the type isn't being set at all.  This probably should be fixed 
either way.

On the other hand, can we always assume that if $struct-type is false/null/whatever, 
it is a text part?





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13374 Updated: imap_fetchstructure() does not return $struct-type for text types

2001-09-20 Thread hholzgra

ID: 13374
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Bogus
Bug Type: IMAP related
Operating System: FreeBSD 4.3
PHP Version: 4.0CVS-2001-09-21


Previous Comments:


[2001-09-21 07:51:57] [EMAIL PROTECTED]

Bug 2181 is marked closed, but last comment indicates it should be re-opened (sorry, 
I'm not the opener of 2181).  This would be what $struct-type would normally be used 
for:

$types = array(
  0 = TEXT,
  1 = MULTIPART,  
  2 = MESSAGE,
  3 = APPLICATION,
  4 = AUDIO,
  5 = IMAGE,
  6 = VIDEO,
  7 = OTHER
);
if($struct-type) {
  $type = $types[$struct-type];
} else {
  $type = UNKNOWN;
}

$struct-type will always evaluate as false, but you can see from serializing the 
struct object that the type isn't being set at all.  This probably should be fixed 
either way.

On the other hand, can we always assume that if $struct-type is false/null/whatever, 
it is a text part?





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13375: bug with include() ?

2001-09-20 Thread kumar

From: [EMAIL PROTECTED]
Operating system: LINUX
PHP version:  4.0.5
PHP Bug Type: Unknown/Other Function
Bug description:  bug with include() ?

hmmm.. didn't catch this in the include() notes or docs: 
PHP 4.0.5 doesn't seem to process an include() file 
correctly if the file has comments on the first line after 
the ? 

took me a while to try it without the comments but my 
function only worked when I did. the include file looked 
like this: 

? 
//some comments on first line 

function null_zero_val($zero_val) { 
if ($zero_val == '0') { 
$zero_val = ''; 
return $zero_val; 
} 
else { 
return $zero_val; 
} 
} 

? 

before I took the comments out all the code was returned in 
the web browser as text without line breaks and an error 
was generated saying call to undefined function

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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] New extension: ext/msession

2001-09-20 Thread mlwmohawk

At my company we use Oracle as the main back-end server. We implemented our
own session class system. Unfortunately we noticed that its a pretty big
load on the server. So I started looking at PHP sessions.

The problem was the same, the shared session systems, NFS and SQL, assumed
reliable disk data. It is just seems dumb to put session data in a database.
No matter what database you use, it will never scale much better than the
whole I/O speed of the disk system.

I then started thinking about a shared memory cache on each machine, but
yuck, forcing a load balancer to be sticky is problematic because you just
know that it would always end up that every AOL user would be directed to
the slowest web server.

I then started thinking that what I need is a stand-alone daemon that
handles all the session data. I thought I was brilliant until someone
informed me that Microsoft already had something like that for IIS. So I
wrote one: msession. 

I am fairly new to the PHP hacking end of things, so any help or assistance
you could give me would be greatly appreciated. Also, give it a try and let
me know what's broken. (Anyone want to fix config.m4 to automatically find
the lib and include files?)



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13376: strings from ibase_fetch_row() have hidden garbage at end

2001-09-20 Thread tsnyder

From: [EMAIL PROTECTED]
Operating system: Linux 2.4.4-ac9 Debian viariant
PHP version:  4.0.5
PHP Bug Type: Unknown/Other Function
Bug description:  strings from ibase_fetch_row() have hidden garbage at end

I'm getting hidden garbage at the end of string values 
returned from Interbase; I'm using these strings as keys 
to arrays and getting back nothing.  It appears there is 
junk at the end of the string (on the stack) that the 
array-index routine is picking up, but the string routines 
don't:

  $row = ibase_fetch_row($queryRv);
  $STATE = $row[0];

  // this line prints foo[RAW] = []
  echo foo[$STATE] = [.$foo[$STATE].];

  // this line prints foo[RAW] = [1]
  echo foo[$STATE] = [.$foo[trim($STATE)].];

For more detail see:

http://www.shalos.com/trent/phpbug.tgz

Any idea what might be wrong here?
t.
Trent W. Snyder


P.S. from phpinfo():

'./configure' '--with-apxs' '--with-mysql' 
'--with-interbase=/usr/local/interbase' 
'--enable-trans-sid' '--enable-trackvars'

Apache/1.3.19 (Unix) PHP/4.0.5 mod_perl/1.25 mod_ssl/2.8.1 
OpenSSL/0.9.6a



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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13376 Updated: strings from ibase_fetch_row() have hidden garbage at end

2001-09-20 Thread rasmus

ID: 13376
Updated by: rasmus
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Linux 2.4.4-ac9 Debian viariant
PHP Version: 4.0.5
New Comment:

I think this may be fixed.  Could you try a current snapshot from http://snaps.php.net 
and let us know?

Previous Comments:


[2001-09-21 12:03:02] [EMAIL PROTECTED]

I'm getting hidden garbage at the end of string values 
returned from Interbase; I'm using these strings as keys 
to arrays and getting back nothing.  It appears there is 
junk at the end of the string (on the stack) that the 
array-index routine is picking up, but the string routines 
don't:

  $row = ibase_fetch_row($queryRv);
  $STATE = $row[0];

  // this line prints foo[RAW] = []
  echo foo[$STATE] = [.$foo[$STATE].];

  // this line prints foo[RAW] = [1]
  echo foo[$STATE] = [.$foo[trim($STATE)].];

For more detail see:

http://www.shalos.com/trent/phpbug.tgz

Any idea what might be wrong here?
t.
Trent W. Snyder


P.S. from phpinfo():

'./configure' '--with-apxs' '--with-mysql' 
'--with-interbase=/usr/local/interbase' 
'--enable-trans-sid' '--enable-trackvars'

Apache/1.3.19 (Unix) PHP/4.0.5 mod_perl/1.25 mod_ssl/2.8.1 
OpenSSL/0.9.6a








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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13377: image copyresampled doesn't use srcx and srcy

2001-09-20 Thread tai

From: [EMAIL PROTECTED]
Operating system: Linux and win98
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  image copyresampled doesn't use srcx and srcy

imagecopyresampled always uses the 0, 0 as the srcx and srcy. it should use
a specified x and y like imagecopyresized.

I've setup an example to demonstrate, you can find it at:
http://www.triptosomewhere.com/sizing.php source is included there.

also, the select box which should let me choose which type of bug this is
only has one option ( -Please Select- ), so apologies if this doesn't go
directly to the correct place.

Cheers
Tai :)

below is a snip of phpinfo.

'./configure' '--with-mysql' '--with-apache=../apache_1.3.20'
'--enable-track-vars' '--with-xml' '--enable-memory-limit=yes'
'--enable-bcmath' '--with-gd=../gd-2.0.1' '--enable-gd-native-tt'
'--enable-gd-imgstrttf' '--with-gdbm=/usr/include' '--enable-calendar'
'--with-png-dir=/usr/lib' '--with-zlib-dir=/usr/include'
'--with-freetype-dir=/usr/local/include/freetype2'
'--with-jpeg-dir=/usr/local/lib' '--with-mcrypt' '--enable-trans-sid'
'--with-sablot=/usr/local/lib' '--with-imap'
'--enable-sablot-errors-descriptive'
-- 
Edit bug report at: http://bugs.php.net/?id=13377edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13376 Updated: strings from ibase_fetch_row() have hidden garbage at end

2001-09-20 Thread tsnyder

ID: 13376
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: Unknown/Other Function
Operating System: Linux 2.4.4-ac9 Debian viariant
PHP Version: 4.0.5
New Comment:

Sure.  It may take a bit (production environment sigh), but I should be able to get 
it at least on my test machine.

Previous Comments:


[2001-09-21 12:08:23] [EMAIL PROTECTED]

I think this may be fixed.  Could you try a current snapshot from http://snaps.php.net 
and let us know?



[2001-09-21 12:03:02] [EMAIL PROTECTED]

I'm getting hidden garbage at the end of string values 
returned from Interbase; I'm using these strings as keys 
to arrays and getting back nothing.  It appears there is 
junk at the end of the string (on the stack) that the 
array-index routine is picking up, but the string routines 
don't:

  $row = ibase_fetch_row($queryRv);
  $STATE = $row[0];

  // this line prints foo[RAW] = []
  echo foo[$STATE] = [.$foo[$STATE].];

  // this line prints foo[RAW] = [1]
  echo foo[$STATE] = [.$foo[trim($STATE)].];

For more detail see:

http://www.shalos.com/trent/phpbug.tgz

Any idea what might be wrong here?
t.
Trent W. Snyder


P.S. from phpinfo():

'./configure' '--with-apxs' '--with-mysql' 
'--with-interbase=/usr/local/interbase' 
'--enable-trans-sid' '--enable-trackvars'

Apache/1.3.19 (Unix) PHP/4.0.5 mod_perl/1.25 mod_ssl/2.8.1 
OpenSSL/0.9.6a








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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13378: Auto session start + obejct

2001-09-20 Thread sagi

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0.6
PHP Bug Type: Unknown/Other Function
Bug description:  Auto session start + obejct

Well, this is not really a bug , but:
When using session.auto_start , there is no way to load a 
class first, so session objects are pretty much not usable 
that way. I may be wrong, but I couldn't find any way to do 
it but doing a session_write_close(); session_start();

However this is not a solution because it wastes resources 
- writing the session files and opening it again for 
nothing. I belive that a session_reload() (or another 
solution for this case) should exist.


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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13358 Updated: Berkeley DB3 and the DBA functions

2001-09-20 Thread mark

ID: 13358
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: DBM/DBA related
Operating System: RedHat 7.1
PHP Version: 4.0.6
New Comment:

Just a couple of more points of information:

1) I have now tried compiling libphp4.so every which way. I have downloaded and 
installed from source db3.1.17, db3.2.9 and db3.3.11 - and have tried configuring 
--with-db3= (path to db3) with each of these different versions. No luck.

2) Again, I have no problem using the db3 driver and the dba functions with the stand 
alone binary of php that I configured --with-db3 Permissions are not a problem.

3) That link I gave to the phpinfo snapshot is gone. I am a dangerous sysadmin when 
logged in as root! But the dynamicly generated phpinfo() page is 
http://neaturl.com/phpinfo.php

I've gone crazy over this. The only solutions I can see is to run the scripts that use 
dba functions on my db3 file as CGI.

Previous Comments:


[2001-09-18 02:33:18] [EMAIL PROTECTED]

Um. yeah, I am using BerkeleyDB3.1.17 which came rpm installed as part of the standard 
install.



[2001-09-18 02:28:28] [EMAIL PROTECTED]

I have noticed that a similar bug has been reported (Bug id #11732) - however I can 
report more details and I have another script with interesting results.

First: the code that was provided in #11732

[code]
?php
if(!$fp = dba_open(test.db, c, db3)) {
print(error);
exit;
}
dba_insert(testkey, testval, $fp);
echo( dba_fetch(testkey, $fp));
dba_close($fp);
?

[/code]
[output]
Warning: driver initialization failed in 
/usr/local/apache/htdocs/www-root/neaturl.com/temp/test.php on line 3
error
[/output]
But get this - test.db is created!

The above code was called through from my browser (thus through the Apache web server)

Here is a link to a snapshot of my php config at the time I ran that code:

http://neaturl.com/temp/phpinfo-0109181613.html


Now - here is the twist! If I call the same script (adding the path to the php binary) 
from bash, it runs fine!

[code]
#!/usr/local/bin/php
?php

if(!$fp = dba_open(test.db, c, db3)) { 
print(error); 
exit; 
} 
dba_insert(testkey, testval, $fp); 
echo( dba_fetch(testkey, $fp)); 
dba_close($fp); 
?
[/code]
[output]
X-Powered-By: PHP/4.0.6
Content-type: text/html

testval
[/output]

Actually, I came accross this problem because I had written a php script to initialize 
the postfix/virtual.db (which I ran from bash and had written a php script to read and 
output the key:value pairs (which again I ran OK from bash). But when I tried to run 
the same script by calling it from my browser - no cigar!

Now I am assuming this is a bug. I would be delighted to learn that perhaps I have 
missed configuring something in php.ini






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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13376 Updated: strings from ibase_fetch_row() have hidden garbage at end

2001-09-20 Thread rasmus

ID: 13376
Updated by: rasmus
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Linux 2.4.4-ac9 Debian viariant
PHP Version: 4.0.5
New Comment:

Sounds odd.  Sorry to keep giving you more stuff to play with, but could you try PHP 
4.0.7RC2 from http://www.php.net/~zeev/php-4.0.7RC2.tar.gz ?

Also, you can have a look at the activity in the interbase extension code here:
http://cvs.php.net/cvs.php/php4/ext/interbase/interbase.c

You may be able to glean the patch out of that which fixes your specific problem.

Previous Comments:


[2001-09-21 13:33:47] [EMAIL PROTECTED]

I managed to get snap php4-200109202235 compiled and 
installed on the test system.  With a very simple test 
script it seems to have worked -- the indexing looks like 
it works.

However, now the real web-pages don't run to completion. 
 I tried commenting out all the rest of the PHP code (just 
neaving enough native HTML to end out the tables, etc.) 
and it still didn't work.  By throwing in copious amounts 
(~2-3k) of extra text (preblah blah blah.../pre) -- 
especially near the end of the file -- I managed to get 
the page to fully display.

Different bug?

Was the indexing a simple patch?  Given that the latest 
snap chokes, I would love to try it on our in production 
code that ... mostly works. g






[2001-09-21 12:24:10] [EMAIL PROTECTED]

Sure.  It may take a bit (production environment sigh), but I should be able to get 
it at least on my test machine.



[2001-09-21 12:08:23] [EMAIL PROTECTED]

I think this may be fixed.  Could you try a current snapshot from http://snaps.php.net 
and let us know?



[2001-09-21 12:03:02] [EMAIL PROTECTED]

I'm getting hidden garbage at the end of string values 
returned from Interbase; I'm using these strings as keys 
to arrays and getting back nothing.  It appears there is 
junk at the end of the string (on the stack) that the 
array-index routine is picking up, but the string routines 
don't:

  $row = ibase_fetch_row($queryRv);
  $STATE = $row[0];

  // this line prints foo[RAW] = []
  echo foo[$STATE] = [.$foo[$STATE].];

  // this line prints foo[RAW] = [1]
  echo foo[$STATE] = [.$foo[trim($STATE)].];

For more detail see:

http://www.shalos.com/trent/phpbug.tgz

Any idea what might be wrong here?
t.
Trent W. Snyder


P.S. from phpinfo():

'./configure' '--with-apxs' '--with-mysql' 
'--with-interbase=/usr/local/interbase' 
'--enable-trans-sid' '--enable-trackvars'

Apache/1.3.19 (Unix) PHP/4.0.5 mod_perl/1.25 mod_ssl/2.8.1 
OpenSSL/0.9.6a








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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13379: Only one user can run php-cgi binary at the same time.

2001-09-20 Thread hdn

From: [EMAIL PROTECTED]
Operating system: Debian GNU/Linux
PHP version:  4.0.6
PHP Bug Type: Session related
Bug description:  Only one user can run php-cgi binary at the same time.

Only one user can run php-cgi binary at the same time.

It reports:
PHP Fatal error:  Unable to start session mm module in Unknown on line 0

It occures because session mm module tries to open file
/tmp/session_mm.sem which is already opened by concurrent process.

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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]