[PHP-DEV] Bug #13839 Updated: mysql_db_query does converts EURO symbol

2001-10-29 Thread jeroen

ID: 13839
Updated by: jeroen
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: MySQL related
Operating System: Linux 2.2.18
PHP Version: 4.0.6
New Comment:

CHeck the contents of your database with the mysql command line tool. If it really 
says &, post your session here.

Mysql> SELECT headline FROM article;
...
Mysql>

Previous Comments:


[2001-10-29 07:30:19] [EMAIL PROTECTED]

It is not the problem of the character set. It is a matter of changing the data before 
it gets inserted into the database.
example:

the orginal string is "€"
the string that gets inserted by mysql_db_query is: "€"

-> the character "&" gets encoded into "&"!

Only the orginal string "€" displays an EURO character with the browser if you 
read it from the database
with php and display it in a HTML page.

Is there a way to tell mysql_db_query() not to touch the string before inserting it 
into the database??

Thanks
Martin



[2001-10-26 15:44:55] [EMAIL PROTECTED]

mysql uses a different character-set than your browser does. Therefor, it prints 
character 128 (the euro-sign) different than most text-processors.
It is actually stored correctly, if you retrieve it (with i.e. PHP) and display it in 
your browser, it still is a euro-sign.



[2001-10-26 11:15:08] [EMAIL PROTECTED]

Try this

$headline = "This is a € prize";
mysql_db_query( $db, "insert into article set headline='$headline'");

this would insert the string "This is a € prize"!

obviously the command mysql_db_query does a converting on the input string. But in 
this case the result would be
a false string.

Any help?
Martin





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


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




[PHP-DEV] Bug #13867 Updated: ming module known to not work with PHP

2001-10-29 Thread sniper

ID: 13867
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Ming related
Operating System: Debian Woody
PHP Version: 4.0CVS-2001-10-30
New Comment:

This is definately NOT a bug. The module is compiled
with older PHP version. And latest CVS is definately NOT
backwards compatible with old modules.

--Jani


Previous Comments:


[2001-10-30 01:50:01] [EMAIL PROTECTED]

This issue is also listed in the Debian bug tracking sytem- please look under the 
php4-ming package.

When running a simple script (below- taken from opaque.net) I see the following:

Warning: (null): Unable to initialize module Module compiled with debug=8, 
thread-safety=79 module API=1146191744 PHP compiled with debug=0, thread-safety=0 
module API=20010901 These options need to match in /home/julz/public_html/test.php on 
line 2

Fatal error: Call to undefined function: ming_setscale() in /home/julzaddFill(0xff, 0, 0);
  $f2 = $s->addFill(0xff, 0x7f, 0);
  $f3 = $s->addFill(0xff, 0xff, 0);
  $f4 = $s->addFill(0, 0xff, 0);
  $f5 = $s->addFill(0, 0, 0xff);

  $f = new SWFFont('Techno.fdb');

  $s->setRightFill($f1);
  $s->setLine(2, 0x7f, 0, 0);
  $s->drawGlyph($f, '!');
  $s->movePen($f->getWidth('!'), 0);

  $s->setRightFill($f2);
  $s->setLine(2, 0x7f, 0x3f, 0);
  $s->drawGlyph($f, '#');
  $s->movePen($f->getWidth('#'), 0);

  $s->setRightFill($f3);
  $s->setLine(2, 0x7f, 0x7f, 0);
  $s->drawGlyph($f, '%');
  $s->movePen($f->getWidth('%'), 0);

  $s->setRightFill($f4);
  $s->setLine(2, 0, 0x7f, 0);
  $s->drawGlyph($f, '*');
  $s->movePen($f->getWidth('*'), 0);

  $s->setRightFill($f5);
  $s->setLine(2, 0, 0, 0x7f);
  $s->drawGlyph($f, '@');

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $i = $m->add($s);
  $i->scaleTo(2.0);
  $i->moveTo(160-$f->getWidth("!#%*@"), 120+$f->getAscent());

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>/public_html/test.php on line 3

Debian (upstream?) versions:
php4   4.0.99-3
php4-ming  0.2a.cvs200109
Script used:
addFill(0xff, 0, 0);
  $f2 = $s->addFill(0xff, 0x7f, 0);
  $f3 = $s->addFill(0xff, 0xff, 0);
  $f4 = $s->addFill(0, 0xff, 0);
  $f5 = $s->addFill(0, 0, 0xff);

  $f = new SWFFont('Techno.fdb');

  $s->setRightFill($f1);
  $s->setLine(2, 0x7f, 0, 0);
  $s->drawGlyph($f, '!');
  $s->movePen($f->getWidth('!'), 0);

  $s->setRightFill($f2);
  $s->setLine(2, 0x7f, 0x3f, 0);
  $s->drawGlyph($f, '#');
  $s->movePen($f->getWidth('#'), 0);

  $s->setRightFill($f3);
  $s->setLine(2, 0x7f, 0x7f, 0);
  $s->drawGlyph($f, '%');
  $s->movePen($f->getWidth('%'), 0);

  $s->setRightFill($f4);
  $s->setLine(2, 0, 0x7f, 0);
  $s->drawGlyph($f, '*');
  $s->movePen($f->getWidth('*'), 0);

  $s->setRightFill($f5);
  $s->setLine(2, 0, 0, 0x7f);
  $s->drawGlyph($f, '@');

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $i = $m->add($s);
  $i->scaleTo(2.0);
  $i->moveTo(160-$f->getWidth("!#%*@"), 120+$f->getAscent());

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>





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


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




[PHP-DEV] Bug #13867: ming module known to not work with PHP

2001-10-29 Thread jgwr

From: [EMAIL PROTECTED]
Operating system: Debian Woody
PHP version:  4.0CVS-2001-10-30
PHP Bug Type: Ming related
Bug description:  ming module known to not work with PHP

This issue is also listed in the Debian bug tracking sytem- please look
under the php4-ming package.

When running a simple script (below- taken from opaque.net) I see the
following:

Warning: (null): Unable to initialize module Module compiled with debug=8,
thread-safety=79 module API=1146191744 PHP compiled with debug=0,
thread-safety=0 module API=20010901 These options need to match in
/home/julz/public_html/test.php on line 2

Fatal error: Call to undefined function: ming_setscale() in /home/julzaddFill(0xff, 0, 0);
  $f2 = $s->addFill(0xff, 0x7f, 0);
  $f3 = $s->addFill(0xff, 0xff, 0);
  $f4 = $s->addFill(0, 0xff, 0);
  $f5 = $s->addFill(0, 0, 0xff);

  $f = new SWFFont('Techno.fdb');

  $s->setRightFill($f1);
  $s->setLine(2, 0x7f, 0, 0);
  $s->drawGlyph($f, '!');
  $s->movePen($f->getWidth('!'), 0);

  $s->setRightFill($f2);
  $s->setLine(2, 0x7f, 0x3f, 0);
  $s->drawGlyph($f, '#');
  $s->movePen($f->getWidth('#'), 0);

  $s->setRightFill($f3);
  $s->setLine(2, 0x7f, 0x7f, 0);
  $s->drawGlyph($f, '%');
  $s->movePen($f->getWidth('%'), 0);

  $s->setRightFill($f4);
  $s->setLine(2, 0, 0x7f, 0);
  $s->drawGlyph($f, '*');
  $s->movePen($f->getWidth('*'), 0);

  $s->setRightFill($f5);
  $s->setLine(2, 0, 0, 0x7f);
  $s->drawGlyph($f, '@');

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $i = $m->add($s);
  $i->scaleTo(2.0);
  $i->moveTo(160-$f->getWidth("!#%*@"), 120+$f->getAscent());

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>/public_html/test.php on line 3

Debian (upstream?) versions:
php4   4.0.99-3
php4-ming  0.2a.cvs200109
Script used:
addFill(0xff, 0, 0);
  $f2 = $s->addFill(0xff, 0x7f, 0);
  $f3 = $s->addFill(0xff, 0xff, 0);
  $f4 = $s->addFill(0, 0xff, 0);
  $f5 = $s->addFill(0, 0, 0xff);

  $f = new SWFFont('Techno.fdb');

  $s->setRightFill($f1);
  $s->setLine(2, 0x7f, 0, 0);
  $s->drawGlyph($f, '!');
  $s->movePen($f->getWidth('!'), 0);

  $s->setRightFill($f2);
  $s->setLine(2, 0x7f, 0x3f, 0);
  $s->drawGlyph($f, '#');
  $s->movePen($f->getWidth('#'), 0);

  $s->setRightFill($f3);
  $s->setLine(2, 0x7f, 0x7f, 0);
  $s->drawGlyph($f, '%');
  $s->movePen($f->getWidth('%'), 0);

  $s->setRightFill($f4);
  $s->setLine(2, 0, 0x7f, 0);
  $s->drawGlyph($f, '*');
  $s->movePen($f->getWidth('*'), 0);

  $s->setRightFill($f5);
  $s->setLine(2, 0, 0, 0x7f);
  $s->drawGlyph($f, '@');

  $m = new SWFMovie();
  $m->setDimension(320, 240);
  $i = $m->add($s);
  $i->scaleTo(2.0);
  $i->moveTo(160-$f->getWidth("!#%*@"), 120+$f->getAscent());

  header('Content-type: application/x-shockwave-flash');
  $m->output();
?>
-- 
Edit bug report at: http://bugs.php.net/?id=13867&edit=1


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




[PHP-DEV] Bug #13816 Updated: Accessing a static HTML page crashes Apache

2001-10-29 Thread sniper

ID: 13816
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Reproducible crash
Operating System: Solaris 8 SPARC
PHP Version: 4.0.6
New Comment:

Another thing if the previous one didn't help might
be that the fix for largefile support in Perl has
been reverted accidently. You could try disabling that.

--Jani


Previous Comments:


[2001-10-29 23:14:50] [EMAIL PROTECTED]

Have you compiled Apache with: --enable-rule=SHARED_CORE

--Jani



[2001-10-29 03:28:02] [EMAIL PROTECTED]

No crash when Apache is configured without mod_perl.



[2001-10-28 11:50:21] [EMAIL PROTECTED]

Try removing mod_perl and see if it works then.

--Jani




[2001-10-27 06:03:04] [EMAIL PROTECTED]

Did you do 'apachectl stop ; apachectl start' ??
Restart won't work.

--Jani




[2001-10-24 13:17:56] [EMAIL PROTECTED]

Config: Apache 1.3.22, mod_perl 1.26 with perl 5.6.1,
PHP 4.0.6, Sun E250, Solaris 8
PHP configured with apxs like this:
./configure --verbose --prefix=/opt/OCTOapache-1.3.22 
--datadir=/opt/OCTOapache-1.3.22/lib --exec-prefix=/opt/OCTOapache-1.3.22 
--libexecdir=/opt/OCTOapache-1.3.22/helpers --localstatedir=/opt/OCTOapache-1.3.22/lib 
--enable-sysvsem -enable-sysvshm --with-ndbm --with-yp --with-ldap=/opt/local/sparc 
--with-mysql=/opt/OCTOmysql --enable-shmop 
--with-exec-dir=/opt/OCTOapache-1.3.22/safe-exec 
--with-config-file-path=/opt/OCTOapache-1.3.22/conf/php3.ini --enable-safe-mode 
--with-apxs=/opt/OCTOapache-1.3.22/bin/apxs


Just doing a HEAD request on / crashes Apache if libphp4.so
is loaded:

LoadModule php4_modulelibexec/libphp4.so
AddModule mod_php4.c

telnet localhost 8088
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD / HTTP/1.0

Connection closed by foreign host.

This is the tail of the systemcall trace from truss:
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.iso-ru", 0x002E3908)
 = 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.koi8-r", 0x002E3908)
 = 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.ucs2", 0x002E3908) =
 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.ucs4", 0x002E3908) =
 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.utf8", 0x002E3908) =
 0
11140:  getdents64(7, 0x0028C018, 1048) = 128
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.se", 0x002E3908) = 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.zh.Big5", 0x002E7908) =
 0
11140:  getdents64(7, 0x0028C018, 1048) = 0
11140:  close(7)= 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.en", 0x002A7500) = 0
11140:  Incurred fault #6, FLTBOUNDS  %pc = 0xFF05990C
11140:siginfo: SIGSEGV SEGV_MAPERR addr=0x005C
11140:  Received signal #11, SIGSEGV [default]
11140:siginfo: SIGSEGV SEGV_MAPERR addr=0x005C
11140:  *** process killed ***

And this is the stack when the crash happens:
core file = /opt/OCTOapache-1.3.22/core -- program ``httpd'' on platform 
SUNW,Ultra-250
SIGSEGV: Segmentation Fault
$C
yy_get_next_buffer(0x1aafd8,0x1a2818,0x2,0x0,0x0,0x0) + 21c
[savfp=0xffbef830,savpc=0x7555c]
ap_clear_pool(0x1a2818,0x1a6818,0x0,0x0,0x0,0x0) + 4c
[savfp=0xffbef8a0,savpc=0x755ec]
ap_destroy_pool(0x1a2818,0x19e818,0x0,0xff238018,0xffbeda11,0x0) + 14
[savfp=0xffbef910,savpc=0x75544]
ap_clear_pool(0x19e818,0xff23fa9c,0x0,0xa,0x0,0xffbed9d0) + 34
[savfp=0xffbef980,savpc=0x755ec]
ap_destroy_pool(0x19e818,0x19a9a0,0xd,0x1a2840,0x0,0x16ca98) + 14
[savfp=0xffbef9f0,savpc=0x8b0b8]
clean_parent_exit(0x0,0x13d2,0xd,0x1a2840,0x16ca98,0x16c800) + 14
[savfp=0xffbefa60,savpc=0x8f044]
standalone_main(0x1,0xffbefbfc,0x0,0x0,0xff23b03c,0x16cb58) + 764
[savfp=0xffbefae8,savpc=0x8f824]
main(0x1,0xffbefbfc,0xffbefc04,0x19b5f4,0x0,0x0) + 51c
[savfp=0xffbefb98,savpc=0x2a320]

When I comment out the LoadModule and the AddModule
line, the HEAD request is OK:

telnet localhost 8088
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Wed, 24 Oct 2001 17:14:57 GMT
Server: Apache/1.3.22 (Unix) mod_perl/1.26
Last-Modified: Fri, 04 May 2001 00:00:38 GMT
ETag: "398ee-5b0-3af1f126"
Accept-Ranges: bytes
Content-Length: 1456
Connection: close
Content-Type: text/html
Content-Language: en

Connection closed by foreign host.

I had PHP 4.0.4pl1 running OK with the same apache.
This happened after I compiled 4.0.6 with the sa

[PHP-DEV] Bug #13816 Updated: Accessing a static HTML page crashes Apache

2001-10-29 Thread sniper

ID: 13816
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Reproducible crash
Operating System: Solaris 8 SPARC
PHP Version: 4.0.6
New Comment:

Have you compiled Apache with: --enable-rule=SHARED_CORE

--Jani

Previous Comments:


[2001-10-29 03:28:02] [EMAIL PROTECTED]

No crash when Apache is configured without mod_perl.



[2001-10-28 11:50:21] [EMAIL PROTECTED]

Try removing mod_perl and see if it works then.

--Jani




[2001-10-27 06:03:04] [EMAIL PROTECTED]

Did you do 'apachectl stop ; apachectl start' ??
Restart won't work.

--Jani




[2001-10-24 13:17:56] [EMAIL PROTECTED]

Config: Apache 1.3.22, mod_perl 1.26 with perl 5.6.1,
PHP 4.0.6, Sun E250, Solaris 8
PHP configured with apxs like this:
./configure --verbose --prefix=/opt/OCTOapache-1.3.22 
--datadir=/opt/OCTOapache-1.3.22/lib --exec-prefix=/opt/OCTOapache-1.3.22 
--libexecdir=/opt/OCTOapache-1.3.22/helpers --localstatedir=/opt/OCTOapache-1.3.22/lib 
--enable-sysvsem -enable-sysvshm --with-ndbm --with-yp --with-ldap=/opt/local/sparc 
--with-mysql=/opt/OCTOmysql --enable-shmop 
--with-exec-dir=/opt/OCTOapache-1.3.22/safe-exec 
--with-config-file-path=/opt/OCTOapache-1.3.22/conf/php3.ini --enable-safe-mode 
--with-apxs=/opt/OCTOapache-1.3.22/bin/apxs


Just doing a HEAD request on / crashes Apache if libphp4.so
is loaded:

LoadModule php4_modulelibexec/libphp4.so
AddModule mod_php4.c

telnet localhost 8088
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD / HTTP/1.0

Connection closed by foreign host.

This is the tail of the systemcall trace from truss:
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.iso-ru", 0x002E3908)
 = 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.koi8-r", 0x002E3908)
 = 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.ucs2", 0x002E3908) =
 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.ucs4", 0x002E3908) =
 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.ru.utf8", 0x002E3908) =
 0
11140:  getdents64(7, 0x0028C018, 1048) = 128
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.se", 0x002E3908) = 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.zh.Big5", 0x002E7908) =
 0
11140:  getdents64(7, 0x0028C018, 1048) = 0
11140:  close(7)= 0
11140:  stat64("/opt/OCTOapache-1.3.22/htdocs/index.html.en", 0x002A7500) = 0
11140:  Incurred fault #6, FLTBOUNDS  %pc = 0xFF05990C
11140:siginfo: SIGSEGV SEGV_MAPERR addr=0x005C
11140:  Received signal #11, SIGSEGV [default]
11140:siginfo: SIGSEGV SEGV_MAPERR addr=0x005C
11140:  *** process killed ***

And this is the stack when the crash happens:
core file = /opt/OCTOapache-1.3.22/core -- program ``httpd'' on platform 
SUNW,Ultra-250
SIGSEGV: Segmentation Fault
$C
yy_get_next_buffer(0x1aafd8,0x1a2818,0x2,0x0,0x0,0x0) + 21c
[savfp=0xffbef830,savpc=0x7555c]
ap_clear_pool(0x1a2818,0x1a6818,0x0,0x0,0x0,0x0) + 4c
[savfp=0xffbef8a0,savpc=0x755ec]
ap_destroy_pool(0x1a2818,0x19e818,0x0,0xff238018,0xffbeda11,0x0) + 14
[savfp=0xffbef910,savpc=0x75544]
ap_clear_pool(0x19e818,0xff23fa9c,0x0,0xa,0x0,0xffbed9d0) + 34
[savfp=0xffbef980,savpc=0x755ec]
ap_destroy_pool(0x19e818,0x19a9a0,0xd,0x1a2840,0x0,0x16ca98) + 14
[savfp=0xffbef9f0,savpc=0x8b0b8]
clean_parent_exit(0x0,0x13d2,0xd,0x1a2840,0x16ca98,0x16c800) + 14
[savfp=0xffbefa60,savpc=0x8f044]
standalone_main(0x1,0xffbefbfc,0x0,0x0,0xff23b03c,0x16cb58) + 764
[savfp=0xffbefae8,savpc=0x8f824]
main(0x1,0xffbefbfc,0xffbefc04,0x19b5f4,0x0,0x0) + 51c
[savfp=0xffbefb98,savpc=0x2a320]

When I comment out the LoadModule and the AddModule
line, the HEAD request is OK:

telnet localhost 8088
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Wed, 24 Oct 2001 17:14:57 GMT
Server: Apache/1.3.22 (Unix) mod_perl/1.26
Last-Modified: Fri, 04 May 2001 00:00:38 GMT
ETag: "398ee-5b0-3af1f126"
Accept-Ranges: bytes
Content-Length: 1456
Connection: close
Content-Type: text/html
Content-Language: en

Connection closed by foreign host.

I had PHP 4.0.4pl1 running OK with the same apache.
This happened after I compiled 4.0.6 with the same
configuration and installed it over 4.0.4pl1.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [E

[PHP-DEV] PHP Session: cache limitter addition request

2001-10-29 Thread Yasuo Ohgaki
When 'private' cache limitter is used, old enough
"Expire" header is added. Recent Mozilla retris to
submit post data with back button and may result in
empty form.

>From RFC2616 13.2.1 Server-Specified Expiration
===
If an origin server wishes to force a semantically transparent
cache to validate every request, it MAY assign an explicit
expiration time in the past. This means that the response is
always stale, and so the cache SHOULD validate it before using it
for subsequent requests. See section 14.9.4 for a more restrictive
way to force revalidation.
===

Validation can be avoided without "Expire" header.

It would be nice to have private cache limitter without
Expire header. Could you apply attached diff (or like) to
session.c? The diff file is taken against today's CVS
HEAD branch.

Thank you.

--
Yasuo Ohgaki

Index: session.c
===
RCS file: /repository/php4/ext/session/session.c,v
retrieving revision 1.259
diff -u -c -r1.259 session.c
cvs server: conflicting specifications of output style
*** session.c   22 Oct 2001 16:07:34 -  1.259
--- session.c   30 Oct 2001 02:48:32 -
***
*** 676,681 
--- 676,691 
last_modified(TSRMLS_C);
  }
  
+ CACHE_LIMITER_FUNC(private_no_expire)
+ {
+   char buf[MAX_STR + 1];
+   
+   sprintf(buf, "Cache-Control: private, max-age=%ld, pre-check=%ld", 
+PS(cache_expire) * 60, PS(cache_expire) * 60);
+   ADD_COOKIE(buf);
+ 
+   last_modified(TSRMLS_C);
+ }
+ 
  CACHE_LIMITER_FUNC(nocache)
  {
ADD_COOKIE("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
***
*** 688,693 
--- 698,704 
  static php_session_cache_limiter_t php_session_cache_limiters[] = {
CACHE_LIMITER(public)
CACHE_LIMITER(private)
+   CACHE_LIMITER(private_no_expire)
CACHE_LIMITER(nocache)
{0}
  };


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


Re: [PHP-DEV] Weirdness

2001-10-29 Thread Jani Taskinen



The bogus html was in all cases usage of background tag with
incorrect value. (or was it supposed to be bgcolor..don't remember :)

I leave the broken mem thingie for others to check.

--Jani


On Tue, 30 Oct 2001, Yasuo Ohgaki wrote:

>Jani Taskinen wrote:
>
>> First of all, try with plain PHP script, without ANY html.
>> There have been few bug reports about this kind of stuff
>> and all were caused by bogus HTML.
>>
>> --Jani
>
>
>I would say almost all of them :)
>(I'm not sure what you mean "bogus HTML")
>I suggest Ivo to try to find out problems in your script at
>first.
>
>However, I had/have similar problems as he describes. One
>has been fixed. It was caused by insufficient type check in
>foreach(). Others are *still* active...
>
>I verified the behaviour with gdb and putting a little code
>in zend_execute.c. It's hard enough to point out where
>did it go wrong. (Both C source & PHP script)
>
>Anyway, PHP/Zend tends to execute some portion of script or
>whole script multiple times when memory is broken. I mentioned
>this in this list before... When memory, such as op_array, is
>messed up, this can happen...
>
>If anyone cares, you can find problem descriptions and backtrace
>in mail list archive. (the backtrace won't help debugging the
>problem, though)
>
>--
>Yasuo Ohgaki
>
>
>> On Mon, 29 Oct 2001, Ivo van Heel wrote:
>>>I am SURE that this function is called only once. Further more, one of the DB
>>>fields is 100, where it should be 8, which the first database message has. This
>>>value is used in only ONE script, which should not be included and DOES NOT get
>>>included when submitting that form. That same script has numerous echo's, which
>>>do NOT put anything on the screen, but changes in that script (such as
>>>commenting out the call to the DB class that will insert the second message)
>>>WILL "fix" it, that is, only one message will appear in the DB.
>
>
>


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




Re: [PHP-DEV] Weirdness

2001-10-29 Thread Yasuo Ohgaki

Jani Taskinen wrote:

> First of all, try with plain PHP script, without ANY html.
> There have been few bug reports about this kind of stuff
> and all were caused by bogus HTML.
> 
> --Jani


I would say almost all of them :)
(I'm not sure what you mean "bogus HTML")
I suggest Ivo to try to find out problems in your script at
first.

However, I had/have similar problems as he describes. One
has been fixed. It was caused by insufficient type check in
foreach(). Others are *still* active...

I verified the behaviour with gdb and putting a little code
in zend_execute.c. It's hard enough to point out where
did it go wrong. (Both C source & PHP script)

Anyway, PHP/Zend tends to execute some portion of script or
whole script multiple times when memory is broken. I mentioned
this in this list before... When memory, such as op_array, is
messed up, this can happen...

If anyone cares, you can find problem descriptions and backtrace
in mail list archive. (the backtrace won't help debugging the
problem, though)

--
Yasuo Ohgaki


> On Mon, 29 Oct 2001, Ivo van Heel wrote:
>>I am SURE that this function is called only once. Further more, one of the DB
>>fields is 100, where it should be 8, which the first database message has. This
>>value is used in only ONE script, which should not be included and DOES NOT get
>>included when submitting that form. That same script has numerous echo's, which
>>do NOT put anything on the screen, but changes in that script (such as
>>commenting out the call to the DB class that will insert the second message)
>>WILL "fix" it, that is, only one message will appear in the DB.


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




[PHP-DEV] Bug #7930 Updated: List() constructor reference assignment

2001-10-29 Thread nathan

ID: 7930
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Operating System: Linux 2.2
PHP Version: 4.0.2
New Comment:


This feature request has been in the bug database for more than a year now.  Will this 
request ever be implemented? If so, great! Please assign it to a developer. If not, 
then say why and close this request.

Bug #6768 is a duplicate of thsi bug


Previous Comments:


[2000-11-22 12:00:29] [EMAIL PROTECTED]

I request that the list() constructor be able to assign variable references from 
arrays. Like such..

$a = array("string1", "string2");

list($b, $c) =& $a;






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


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




Re: [PHP-DEV] Re: Bug #13700: Database Abstraction API

2001-10-29 Thread Pierre-Alain Joye

Hello,

Not really an expert in both pear or metabase (just tests experiences). imho one thing 
is sure, both got advantage and feel with a completly different approach (philosophy 
?) of an db abstraction layer.
There is many ways to create an abstractions layer, every way will be usefull for a 
need and completly useless for another one. Just a question of what people will do, 
got many choices increases the global goals of php.
And I just think you will better to discuss the real goals of your own philisophy and 
how to make it better. The way of "Mine is better, your not" just makes no sense (in 
dev-ml ;). I just read a few weeks ago another thread from Manuel and Markus; I don't 
remember any question about the goals, approachs or definitions of "What is a real 
Abstraction Layer ? and for which use ?".
Maybe you will better start at this point ? And will follow the threads with all my 
attention.

my 2 "euro" cents ;)

pa

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




Re: [PHP-DEV] [PATCH] for safe_mode

2001-10-29 Thread jimw

Tomek Lipski <[EMAIL PROTECTED]> wrote:
> This is another version of my patch, allowing to set multiple dirs.

there already is a safe_mode_include_dir directive in cvs (and it's been
there since july.) it doesn't handle multiple directories, though.

the related code in fopen_wrapper.c could use some refactoring. there's
a big chunk of duplicated logic for the absolute path and relative path
cases.

jim

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




Re: [PHP-DEV] Re: Bug #13700: Database Abstraction API

2001-10-29 Thread Manuel Lemos

Hello,

Markus Fischer wrote:
> 
> On Mon, Oct 29, 2001 at 08:07:17PM -0200, Manuel Lemos wrote :
> > [...]   lication. I don't think PEAR-DB provides this. [...]
> 
> For me, Metabase and PEAR::DB (and others)  were exactly written
> for that purpose: driver independent database access. Did I miss
> something?
> 
> Or do you just want to say that Metabase abstraction is more
> complete than compared to PEAR::DB?

That's obvious, Metabase was started much sooner and so it is much more
mature, but that is not my point.

My point is that PEAR-DB just treats every DBMS data type as text. For
instance, dates can be represented as text, but each DBMS represents
dates in different formats. If applications that use PEAR-DB want to
handle date field values, they need to know how each of the different
underlying DBMS formats dates. Applications become an headache to
maintain if you want to keep portability.

With Metabase, applications do not have to carry that burden because
Metabase performs the necessary conversions with all the data that goes
in and out the DBMS, not only for date fields, but for a large set of
data types. This is true portability. Compared to Metabase, only JDBC
does a similar job. Like with Java, Metabase database applications are
write once and run everywhere supported.

Regards,
Manuel Lemos

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




Re: [PHP-DEV] [PATCH] for safe_mode

2001-10-29 Thread Tomek Lipski

This is another version of my patch, allowing to set multiple dirs.


-- 
email: [[EMAIL PROTECTED]] gsm: +48 606 787423
echo Ecl.Pl Al. NMP 31 Częstochowa http://www.ecl.pl/
// "I'm willing to sacrifice anything for this cause, even other people's
// lives"


diff -ur main.orig/main.c main/main.c
--- main.orig/main.cTue May  8 22:11:46 2001
+++ main/main.c Sun Oct 28 20:38:18 2001
@@ -221,6 +221,7 @@
PHP_INI_ENTRY("max_execution_time", "30",   
PHP_INI_ALL,OnUpdateTimeout)
STD_PHP_INI_ENTRY("open_basedir",   NULL,   
PHP_INI_SYSTEM, OnUpdateStringUnempty,  open_basedir,   
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY("safe_mode_exec_dir", "1",
PHP_INI_SYSTEM, OnUpdateString, safe_mode_exec_dir,
 php_core_globals,   core_globals)
+   STD_PHP_INI_ENTRY("safe_mode_include_dir",  "1",
+PHP_INI_SYSTEM, OnUpdateString, safe_mode_include_dir,
+  php_core_globals,   core_globals)
STD_PHP_INI_ENTRY("upload_max_filesize","2M",   PHP_INI_ALL,   
 OnUpdateInt,upload_max_filesize,php_core_globals, 
  core_globals)
STD_PHP_INI_ENTRY("file_uploads",   "1",
PHP_INI_ALL,OnUpdateBool,   file_uploads,  
 php_core_globals,   core_globals)
STD_PHP_INI_ENTRY("post_max_size",  "8M",   
PHP_INI_SYSTEM, OnUpdateInt,post_max_size, 
 sapi_globals_struct,sapi_globals)
diff -ur main.orig/php_globals.h main/php_globals.h
--- main.orig/php_globals.h Wed Apr  4 22:46:26 2001
+++ main/php_globals.h  Sun Oct 28 20:20:35 2001
@@ -74,6 +74,7 @@
char *output_handler;
 
char *safe_mode_exec_dir;
+   char *safe_mode_include_dir;
 
long memory_limit;
 
diff -ur main.orig/safe_mode.c main/safe_mode.c
--- main.orig/safe_mode.c   Mon Apr 30 14:43:40 2001
+++ main/safe_mode.cMon Oct 29 23:03:41 2001
@@ -65,10 +65,20 @@
 * If given filepath is a URL, allow - safe mode stuff
 * related to URL's is checked in individual functions
  */
-   if (!strncasecmp(filename,"http://",7) || !strncasecmp(filename,"ftp://",6)) {
+   if (safe_mode_include_check(filename)) {
return 1;
}

+   /* 
+   * Added by [EMAIL PROTECTED] - check if the file is in special
+   * directory where all system includes go [like autoprepend directives]
+   */
+
+if ( !strncasecmp(filename, PG(safe_mode_include_dir),
+strlen( PG(safe_mode_include_dir) )) ) {
+return 1;
+}
+
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
ret = VCWD_STAT(filename, &sb);
if (ret < 0) {
@@ -163,3 +173,44 @@

return SG(request_info).current_user;   
 }  
+
+/*
+* Added by [EMAIL PROTECTED] - check if the file is in special
+* directory where all system includes go [like autoprepend directives]
+*/
+
+int safe_mode_include_check(const char *filename)
+{
+   char *tmp;
+   int len;
+
+   //propably we need less...
+   tmp = PG(safe_mode_include_dir);
+
+   //support multi dirs [separated by colon - won't work under windows
+
+   while (*tmp) {
+
+
+   if (index(tmp, ':')) {
+   len = index(tmp, ':') - tmp;
+   }
+   else {
+   len = strlen(tmp);
+   }
+
+   if ( !strncasecmp(filename, tmp, len) ) {
+   return 1;
+   }
+
+   tmp = index(tmp, ':');
+   if (tmp) {
+   *tmp++;
+   }
+   else {
+   return 0;
+   }
+
+   }
+
+}



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


Re: [PHP-DEV] Re: Bug #13700: Database Abstraction API

2001-10-29 Thread Markus Fischer

On Mon, Oct 29, 2001 at 08:07:17PM -0200, Manuel Lemos wrote : 
> [...]   lication. I don't think PEAR-DB provides this. [...]

For me, Metabase and PEAR::DB (and others)  were exactly written
for that purpose: driver independent database access. Did I miss
something?

Or do you just want to say that Metabase abstraction is more
complete than compared to PEAR::DB?

- Markus

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




Re: [PHP-DEV] Re: Bug #13700: Database Abstraction API

2001-10-29 Thread Manuel Lemos

Hello,

L0t3k wrote:
>   in other words, i dont see the development of an abstraction layer in C
> and PHP as competing propositions. the C layer just allows PHP developers to
> be more productive and focus on higher levels of application development.
> the current PHP abstractions fill the need not only of functionality, but of
> code/work style and "aesthetic" preference. that need will persist whatever
> happens at engine level.

It sounds you did not have taken a good look at Metabase. It seems to do
more than you think. Basically it provides an API to interface with all
DBMS in the same way, so you don't handle each database differences in
your application. I don't think PEAR-DB provides this. Assuming that C
layer will follow the same design lines, it seems it will still not
offer REAL database independence as Metabase does.

 
> One of the biggest pluses of PHP is that implementation of new
> functionality is magnitudes faster than in "C". if a necessary feature is
> needed, we dont have to depend on the release cycle of PHP to have it
> included in a distribution. things in this business happens too quickly. and
> on a personal/ideological level, many of the features included in Metabase
> belong at the engine level (not that theyre not necessary). for instance, i
> think anything touching automatic schema modification or generation should
> absolutely be in user-space. use of PHP or standard extensions should not
> automatically impose a methodology on a user. i like the work you did with
> Metabase and think that the work being done on a new extension will make
> your work easier by being able to focus more on portability issues, which is
> Metabase's strength (imo) and which should be dealt with in PHP.

If and when such C layer comes out, I'll evaluate it and if it is
capable enough, I will write a driver for Metabase to interface with it,
but I am afraid it will something as frustrating as ODBC that does not
expose enough of the capabilities of the underlying database and you
can't tell it to do what the applications need.

Regards,
Manuel Lemos


> Manuel Lemos <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 
> > Hello,
> >
> > Markus Fischer wrote:
> > >
> > > On Sat, Oct 27, 2001 at 12:29:48PM -0200, Manuel Lemos wrote :
> > > > I am afraid that will never happen.
> > >
> > > A project for db abstraction as an extension is already in the
> > > works. History discussions about it can be found on pear-dev
> > > archiv.
> >
> > What I meant that it would never happen is the adoption of an existing
> > database abstraction package.
> >
> 
> >
> > Regards,
> > Manuel Lemos

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




[PHP-DEV] Bug #13841 Updated: new session ID with each session_start()

2001-10-29 Thread sniper

ID: 13841
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Session related
Operating System: Red Hat 6.1
PHP Version: 4.0.6
New Comment:

I can't see the difference, but if it works, fine.

--Jani


Previous Comments:


[2001-10-29 15:51:58] [EMAIL PROTECTED]

YOU CAN MARK AS SOLVED OR BOGUS (or use this as some way to 
improve the system?)

My sessions are fixed. I compaired the two php.ini files 
from the server that works and the server that didn't work.  
Here's the two.  notice the one difference (trans-id).

Working server:
[Session]
session.save_handler  = files   ; handler used to 
store/retrieve data
session.save_path = /tmp; argument passed to 
save_handler
; in the case of files, 
this is the
; path where data files 
are stored
session.use_cookies   = 1   ; whether to use 
cookies
session.name  = PHPSESSID  
; name of the session
; is used as cookie 
name
session.auto_start= 0   ; initialize session on 
request startup
session.cookie_lifetime   = 3600; lifetime in seconds 
of cookie
; or if 0, until 
browser is restarted
session.cookie_path   = /   ; the path the cookie 
is valid for
session.cookie_domain = ; the domain the cookie 
is valid for
session.serialize_handler = php ; handler used to 
serialize data
; php is the standard 
serializer of PHP
session.gc_probability= 1   ; percentual 
probability that the 
; 'garbage collection' 
process is started
; on every session 
initialization
session.gc_maxlifetime= 1440; after this number of 
seconds, stored
; data will be seen as 
'garbage' and
; cleaned up by the gc 
process
session.referer_check = ; check HTTP Referer to 
invalidate 
; externally stored 
URLs containing ids
session.entropy_length= 0   ; how many bytes to 
read from the file
session.entropy_file  = ; specified here to 
create the session id
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache ; set to 
{nocache,private,public} to
; determine HTTP 
caching aspects
session.cache_expire  = 180 ; document expires 
after n minutes

Non-working Server:
[Session]
session.save_handler  = files   ; handler used to 
store/retrieve data
session.save_path = /tmp; argument passed to 
save_handler
; in the case of files, 
this is the
; path where data files 
are stored
session.use_cookies   = 1   ; whether to use 
cookies
session.name  = PHPSESSID  
; name of the session
; is used as cookie 
name
session.auto_start= 0   ; initialize session on 
request startup
session.cookie_lifetime   = 0; lifetime in seconds of 
cookie
; or if 0, until 
browser is restarted
session.use_trans_sid = 1
session.cookie_path   = /   ; the path the cookie 
is valid for
session.cookie_domain = ; the domain the cookie 
is valid for
session.serialize_handler = php ; handler used to 
serialize data
; php is the standard 
serializer of PHP
session.gc_probability= 1   ; percentual 
probability that the 
; 'garbage collection' 
process is started
; on every session 
initialization
session.gc_maxlifetime= 1440; after this number of 
seconds, stored
; data will be seen as 
'garbage' and
; cleaned up by the gc 
process
session.referer_check = 0; check HTTP Referer 
to invalidate 
; externally stored 
URLs containing ids
session.entropy_length= 0   ; how many bytes to 
read from the file
session.entropy_file  = ; specified here to 
create the session id
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache ; set to 
{nocache,private,public} to
; determine HTTP 
caching aspects
session.cache_expire  = 180 ; document expires 
after n minutes
---

[PHP-DEV] Bug #13863 Updated: $HTTP_POST_FILES not available!

2001-10-29 Thread sniper

ID: 13863
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Filesystem function related
Operating System: Win NT4 / IIS 4
PHP Version: 4.0.6
New Comment:

Please ask support questions on the mailing lists:

http://www.php.net/support.php

Hint: HTTP_POST_FILES is available only when you do http upload. 

RTFM: http://www.php.net/manual/en/features.file-upload.php

--Jani


Previous Comments:


[2001-10-29 08:30:16] [EMAIL PROTECTED]

Hi,

No matter how I setup my php.ini file, the $HTTP_POST_FILES array is simply not 
available on my NT4 machine. Setting globals on/off has no effect (yes, I am 
restarting the IIS service after each alteration to the php.ini file). 

Placing a "phpinfo(INFO_VARIABLES);" for instance will list the $HTTP_GET_VARS, 
$HTTP_POST_VARS, $HTTP_SERVER_VARS variables but not the $HTTP_POST_FILES variables - 
they simply aren't there! 

Is it a bug, or a feature, or have I forgotten something?

Best regards,

Robert Banfield
Programmer/Web Administrator
Telair International GmbH - Air Cargo and Baggage Handling Systems
www.telair.com
email: [EMAIL PROTECTED]
phone: ++49 8026 398 81
fax: ++49 8026 398 30






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


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




[PHP-DEV] Bug #13843 Updated: Command arguments under safe mode should not be automatically escaped

2001-10-29 Thread a . genkin

ID: 13843
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: Command line arguments escaped magically and out of control
Status: Open
Bug Type: Program Execution
Operating System: Unix
PHP Version: 4.0.6
New Comment:

Rats! I meant to say "to standard out" in the last sentence.

Previous Comments:


[2001-10-29 16:23:58] [EMAIL PROTECTED]

Rasmus, what you are saying about shell redirection being a threat under safe mode 
makes sesnse.  But how about being able to pass parameters with spaces in them?  I 
cannot see any security implication in that...

In any case, I want to be able to read standard error from the command I'm 
executing...

How about providing a PHP variant of C's execv() in PHP, so that I could pass it an 
array of parameters?  And, perhaps, add a flag to existing program execution functions 
to duplicate standard error to standard in.



[2001-10-29 16:14:34] [EMAIL PROTECTED]

I forgot to add that it appears that this bug is not Solaris-specific, but, rather, 
safe mode specific.



[2001-10-29 16:14:31] [EMAIL PROTECTED]

Well, not being able to use shell redirection and command line args in safe-mode makes 
a lot of sense.  You could trivially circumvent the safe-mode restrictions if you were 
allowed to do this.  Basically safe-mode only allows system calls to very limited 
things.  Basically prepared scripts placed in the safe-mode-exec-dir.  I don't see how 
we could allow arguments and redirects and still maintain the point behind safe-mode.



[2001-10-29 16:09:44] [EMAIL PROTECTED]

I've looked into this further, and here's the scoop.  Under safe mode, php uses 
php_escape_shell_cmd() function to escape any command passed to program execution 
functions.  As a result, if I pass a command like this:

  /www/bin/foo "bar c" 2>&1

it will turn it into

  /www/bin/foo \"bar c\" 2\>\&1
I, as a PHP developer, have no control over this under safe mode.  Among other things, 
this means that I cannot pass my program an argument, containing spaces, nor can I use 
shell redirection machinery.

I propose a patch like below to inhibit this automatic escaping.

diff -rc php-4.0.6-orig/ext/standard/exec.c php-4.0.6/ext/standard/exec.c
*** php-4.0.6-orig/ext/standard/exec.c  Mon Apr 30 08:43:39 2001
--- php-4.0.6/ext/standard/exec.c   Mon Oct 29 15:31:06 2001
***
*** 92,100 
*c = ' ';
strncat(d, c, overflow_limit);
}
-   tmp = php_escape_shell_cmd(d);
-   efree(d);
-   d = tmp;
  #if PHP_SIGCHILD
sig_handler = signal (SIGCHLD, SIG_DFL);
  #endif
--- 92,97 




[2001-10-26 21:29:47] [EMAIL PROTECTED]

4.0.6 (safe mode), Apache 1.3.20, running as server module, under Solaris 8/Sparc

When passing arguments to an executable with either exec(), system() or passthru(), 
special shell characters are escaped automatically, and I have no control over it.  As 
a result, I am unable to pass to the executable a paramter containing white space 
(such as a file name with spaces), because I cannot surround it with quotes or 
backslash the spaces (the automatic escaping protects the quotes or backslash from the 
shell).

Another consequence is that I cannot use shell redirection symbols (e.g. 2>&1): they 
get escaped, too, and the executable receives the string "2>&1" as one of its 
parameters.

If I use escapeshellarg() for each argument (as I should), the single quotes, put 
arround the argument by that function, are passed over as part of the argument.  For 
example:

$arg = escapeshellarg("/var/www/data/foo bar.txt");
passthru( "/var/www/bin/myprog $arg" );

Produces the following output from myprog:

'/var/www/data/foo: No such file or directory
bar.txt': No such file or directory

I suspect that this bug may be specific to Solaris, since I could not reproduce the 
same behaviour under identical configuration under FreeBSD.

Hoping for a fix in the upcoming release,
-- 
Arcady Genkin





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


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




[PHP-DEV] Bug #13843 Updated: Command arguments under safe mode should not be automatically escaped

2001-10-29 Thread a . genkin

ID: 13843
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: Command line arguments escaped magically and out of control
Status: Open
Bug Type: Program Execution
Operating System: Unix
PHP Version: 4.0.6
New Comment:

Rasmus, what you are saying about shell redirection being a threat under safe mode 
makes sesnse.  But how about being able to pass parameters with spaces in them?  I 
cannot see any security implication in that...

In any case, I want to be able to read standard error from the command I'm 
executing...

How about providing a PHP variant of C's execv() in PHP, so that I could pass it an 
array of parameters?  And, perhaps, add a flag to existing program execution functions 
to duplicate standard error to standard in.

Previous Comments:


[2001-10-29 16:14:34] [EMAIL PROTECTED]

I forgot to add that it appears that this bug is not Solaris-specific, but, rather, 
safe mode specific.



[2001-10-29 16:14:31] [EMAIL PROTECTED]

Well, not being able to use shell redirection and command line args in safe-mode makes 
a lot of sense.  You could trivially circumvent the safe-mode restrictions if you were 
allowed to do this.  Basically safe-mode only allows system calls to very limited 
things.  Basically prepared scripts placed in the safe-mode-exec-dir.  I don't see how 
we could allow arguments and redirects and still maintain the point behind safe-mode.



[2001-10-29 16:09:44] [EMAIL PROTECTED]

I've looked into this further, and here's the scoop.  Under safe mode, php uses 
php_escape_shell_cmd() function to escape any command passed to program execution 
functions.  As a result, if I pass a command like this:

  /www/bin/foo "bar c" 2>&1

it will turn it into

  /www/bin/foo \"bar c\" 2\>\&1
I, as a PHP developer, have no control over this under safe mode.  Among other things, 
this means that I cannot pass my program an argument, containing spaces, nor can I use 
shell redirection machinery.

I propose a patch like below to inhibit this automatic escaping.

diff -rc php-4.0.6-orig/ext/standard/exec.c php-4.0.6/ext/standard/exec.c
*** php-4.0.6-orig/ext/standard/exec.c  Mon Apr 30 08:43:39 2001
--- php-4.0.6/ext/standard/exec.c   Mon Oct 29 15:31:06 2001
***
*** 92,100 
*c = ' ';
strncat(d, c, overflow_limit);
}
-   tmp = php_escape_shell_cmd(d);
-   efree(d);
-   d = tmp;
  #if PHP_SIGCHILD
sig_handler = signal (SIGCHLD, SIG_DFL);
  #endif
--- 92,97 




[2001-10-26 21:29:47] [EMAIL PROTECTED]

4.0.6 (safe mode), Apache 1.3.20, running as server module, under Solaris 8/Sparc

When passing arguments to an executable with either exec(), system() or passthru(), 
special shell characters are escaped automatically, and I have no control over it.  As 
a result, I am unable to pass to the executable a paramter containing white space 
(such as a file name with spaces), because I cannot surround it with quotes or 
backslash the spaces (the automatic escaping protects the quotes or backslash from the 
shell).

Another consequence is that I cannot use shell redirection symbols (e.g. 2>&1): they 
get escaped, too, and the executable receives the string "2>&1" as one of its 
parameters.

If I use escapeshellarg() for each argument (as I should), the single quotes, put 
arround the argument by that function, are passed over as part of the argument.  For 
example:

$arg = escapeshellarg("/var/www/data/foo bar.txt");
passthru( "/var/www/bin/myprog $arg" );

Produces the following output from myprog:

'/var/www/data/foo: No such file or directory
bar.txt': No such file or directory

I suspect that this bug may be specific to Solaris, since I could not reproduce the 
same behaviour under identical configuration under FreeBSD.

Hoping for a fix in the upcoming release,
-- 
Arcady Genkin





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


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




[PHP-DEV] Bug #13843 Updated: Command arguments under safe mode should not be automatically escaped

2001-10-29 Thread a . genkin

ID: 13843
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: Command line arguments escaped magically and out of control
Status: Open
Bug Type: Program Execution
Operating System: Unix
PHP Version: 4.0.6
New Comment:

I forgot to add that it appears that this bug is not Solaris-specific, but, rather, 
safe mode specific.

Previous Comments:


[2001-10-29 16:14:31] [EMAIL PROTECTED]

Well, not being able to use shell redirection and command line args in safe-mode makes 
a lot of sense.  You could trivially circumvent the safe-mode restrictions if you were 
allowed to do this.  Basically safe-mode only allows system calls to very limited 
things.  Basically prepared scripts placed in the safe-mode-exec-dir.  I don't see how 
we could allow arguments and redirects and still maintain the point behind safe-mode.



[2001-10-29 16:09:44] [EMAIL PROTECTED]

I've looked into this further, and here's the scoop.  Under safe mode, php uses 
php_escape_shell_cmd() function to escape any command passed to program execution 
functions.  As a result, if I pass a command like this:

  /www/bin/foo "bar c" 2>&1

it will turn it into

  /www/bin/foo \"bar c\" 2\>\&1
I, as a PHP developer, have no control over this under safe mode.  Among other things, 
this means that I cannot pass my program an argument, containing spaces, nor can I use 
shell redirection machinery.

I propose a patch like below to inhibit this automatic escaping.

diff -rc php-4.0.6-orig/ext/standard/exec.c php-4.0.6/ext/standard/exec.c
*** php-4.0.6-orig/ext/standard/exec.c  Mon Apr 30 08:43:39 2001
--- php-4.0.6/ext/standard/exec.c   Mon Oct 29 15:31:06 2001
***
*** 92,100 
*c = ' ';
strncat(d, c, overflow_limit);
}
-   tmp = php_escape_shell_cmd(d);
-   efree(d);
-   d = tmp;
  #if PHP_SIGCHILD
sig_handler = signal (SIGCHLD, SIG_DFL);
  #endif
--- 92,97 




[2001-10-26 21:29:47] [EMAIL PROTECTED]

4.0.6 (safe mode), Apache 1.3.20, running as server module, under Solaris 8/Sparc

When passing arguments to an executable with either exec(), system() or passthru(), 
special shell characters are escaped automatically, and I have no control over it.  As 
a result, I am unable to pass to the executable a paramter containing white space 
(such as a file name with spaces), because I cannot surround it with quotes or 
backslash the spaces (the automatic escaping protects the quotes or backslash from the 
shell).

Another consequence is that I cannot use shell redirection symbols (e.g. 2>&1): they 
get escaped, too, and the executable receives the string "2>&1" as one of its 
parameters.

If I use escapeshellarg() for each argument (as I should), the single quotes, put 
arround the argument by that function, are passed over as part of the argument.  For 
example:

$arg = escapeshellarg("/var/www/data/foo bar.txt");
passthru( "/var/www/bin/myprog $arg" );

Produces the following output from myprog:

'/var/www/data/foo: No such file or directory
bar.txt': No such file or directory

I suspect that this bug may be specific to Solaris, since I could not reproduce the 
same behaviour under identical configuration under FreeBSD.

Hoping for a fix in the upcoming release,
-- 
Arcady Genkin





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


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




[PHP-DEV] Bug #13843 Updated: Command line arguments escaped magically and out of control

2001-10-29 Thread rasmus

ID: 13843
Updated by: rasmus
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Program Execution
Operating System: Unix
PHP Version: 4.0.6
New Comment:

Well, not being able to use shell redirection and command line args in safe-mode makes 
a lot of sense.  You could trivially circumvent the safe-mode restrictions if you were 
allowed to do this.  Basically safe-mode only allows system calls to very limited 
things.  Basically prepared scripts placed in the safe-mode-exec-dir.  I don't see how 
we could allow arguments and redirects and still maintain the point behind safe-mode.

Previous Comments:


[2001-10-29 16:09:44] [EMAIL PROTECTED]

I've looked into this further, and here's the scoop.  Under safe mode, php uses 
php_escape_shell_cmd() function to escape any command passed to program execution 
functions.  As a result, if I pass a command like this:

  /www/bin/foo "bar c" 2>&1

it will turn it into

  /www/bin/foo \"bar c\" 2\>\&1
I, as a PHP developer, have no control over this under safe mode.  Among other things, 
this means that I cannot pass my program an argument, containing spaces, nor can I use 
shell redirection machinery.

I propose a patch like below to inhibit this automatic escaping.

diff -rc php-4.0.6-orig/ext/standard/exec.c php-4.0.6/ext/standard/exec.c
*** php-4.0.6-orig/ext/standard/exec.c  Mon Apr 30 08:43:39 2001
--- php-4.0.6/ext/standard/exec.c   Mon Oct 29 15:31:06 2001
***
*** 92,100 
*c = ' ';
strncat(d, c, overflow_limit);
}
-   tmp = php_escape_shell_cmd(d);
-   efree(d);
-   d = tmp;
  #if PHP_SIGCHILD
sig_handler = signal (SIGCHLD, SIG_DFL);
  #endif
--- 92,97 




[2001-10-26 21:29:47] [EMAIL PROTECTED]

4.0.6 (safe mode), Apache 1.3.20, running as server module, under Solaris 8/Sparc

When passing arguments to an executable with either exec(), system() or passthru(), 
special shell characters are escaped automatically, and I have no control over it.  As 
a result, I am unable to pass to the executable a paramter containing white space 
(such as a file name with spaces), because I cannot surround it with quotes or 
backslash the spaces (the automatic escaping protects the quotes or backslash from the 
shell).

Another consequence is that I cannot use shell redirection symbols (e.g. 2>&1): they 
get escaped, too, and the executable receives the string "2>&1" as one of its 
parameters.

If I use escapeshellarg() for each argument (as I should), the single quotes, put 
arround the argument by that function, are passed over as part of the argument.  For 
example:

$arg = escapeshellarg("/var/www/data/foo bar.txt");
passthru( "/var/www/bin/myprog $arg" );

Produces the following output from myprog:

'/var/www/data/foo: No such file or directory
bar.txt': No such file or directory

I suspect that this bug may be specific to Solaris, since I could not reproduce the 
same behaviour under identical configuration under FreeBSD.

Hoping for a fix in the upcoming release,
-- 
Arcady Genkin





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


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




[PHP-DEV] Bug #13843 Updated: Command arguments under safe mode should not be automatically escaped

2001-10-29 Thread a . genkin

ID: 13843
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: Command line arguments escaped magically and out of control
Status: Open
Bug Type: Program Execution
Operating System: Unix
PHP Version: 4.0.6
New Comment:

I've looked into this further, and here's the scoop.  Under safe mode, php uses 
php_escape_shell_cmd() function to escape any command passed to program execution 
functions.  As a result, if I pass a command like this:

  /www/bin/foo "bar c" 2>&1

it will turn it into

  /www/bin/foo \"bar c\" 2\>\&1
I, as a PHP developer, have no control over this under safe mode.  Among other things, 
this means that I cannot pass my program an argument, containing spaces, nor can I use 
shell redirection machinery.

I propose a patch like below to inhibit this automatic escaping.

diff -rc php-4.0.6-orig/ext/standard/exec.c php-4.0.6/ext/standard/exec.c
*** php-4.0.6-orig/ext/standard/exec.c  Mon Apr 30 08:43:39 2001
--- php-4.0.6/ext/standard/exec.c   Mon Oct 29 15:31:06 2001
***
*** 92,100 
*c = ' ';
strncat(d, c, overflow_limit);
}
-   tmp = php_escape_shell_cmd(d);
-   efree(d);
-   d = tmp;
  #if PHP_SIGCHILD
sig_handler = signal (SIGCHLD, SIG_DFL);
  #endif
--- 92,97 


Previous Comments:


[2001-10-26 21:29:47] [EMAIL PROTECTED]

4.0.6 (safe mode), Apache 1.3.20, running as server module, under Solaris 8/Sparc

When passing arguments to an executable with either exec(), system() or passthru(), 
special shell characters are escaped automatically, and I have no control over it.  As 
a result, I am unable to pass to the executable a paramter containing white space 
(such as a file name with spaces), because I cannot surround it with quotes or 
backslash the spaces (the automatic escaping protects the quotes or backslash from the 
shell).

Another consequence is that I cannot use shell redirection symbols (e.g. 2>&1): they 
get escaped, too, and the executable receives the string "2>&1" as one of its 
parameters.

If I use escapeshellarg() for each argument (as I should), the single quotes, put 
arround the argument by that function, are passed over as part of the argument.  For 
example:

$arg = escapeshellarg("/var/www/data/foo bar.txt");
passthru( "/var/www/bin/myprog $arg" );

Produces the following output from myprog:

'/var/www/data/foo: No such file or directory
bar.txt': No such file or directory

I suspect that this bug may be specific to Solaris, since I could not reproduce the 
same behaviour under identical configuration under FreeBSD.

Hoping for a fix in the upcoming release,
-- 
Arcady Genkin





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


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




[PHP-DEV] Bug #13841 Updated: new session ID with each session_start()

2001-10-29 Thread thomas

ID: 13841
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: Red Hat 6.1
PHP Version: 4.0.6
New Comment:

YOU CAN MARK AS SOLVED OR BOGUS (or use this as some way to 
improve the system?)

My sessions are fixed. I compaired the two php.ini files 
from the server that works and the server that didn't work.  
Here's the two.  notice the one difference (trans-id).

Working server:
[Session]
session.save_handler  = files   ; handler used to 
store/retrieve data
session.save_path = /tmp; argument passed to 
save_handler
; in the case of files, 
this is the
; path where data files 
are stored
session.use_cookies   = 1   ; whether to use 
cookies
session.name  = PHPSESSID  
; name of the session
; is used as cookie 
name
session.auto_start= 0   ; initialize session on 
request startup
session.cookie_lifetime   = 3600; lifetime in seconds 
of cookie
; or if 0, until 
browser is restarted
session.cookie_path   = /   ; the path the cookie 
is valid for
session.cookie_domain = ; the domain the cookie 
is valid for
session.serialize_handler = php ; handler used to 
serialize data
; php is the standard 
serializer of PHP
session.gc_probability= 1   ; percentual 
probability that the 
; 'garbage collection' 
process is started
; on every session 
initialization
session.gc_maxlifetime= 1440; after this number of 
seconds, stored
; data will be seen as 
'garbage' and
; cleaned up by the gc 
process
session.referer_check = ; check HTTP Referer to 
invalidate 
; externally stored 
URLs containing ids
session.entropy_length= 0   ; how many bytes to 
read from the file
session.entropy_file  = ; specified here to 
create the session id
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache ; set to 
{nocache,private,public} to
; determine HTTP 
caching aspects
session.cache_expire  = 180 ; document expires 
after n minutes

Non-working Server:
[Session]
session.save_handler  = files   ; handler used to 
store/retrieve data
session.save_path = /tmp; argument passed to 
save_handler
; in the case of files, 
this is the
; path where data files 
are stored
session.use_cookies   = 1   ; whether to use 
cookies
session.name  = PHPSESSID  
; name of the session
; is used as cookie 
name
session.auto_start= 0   ; initialize session on 
request startup
session.cookie_lifetime   = 0; lifetime in seconds of 
cookie
; or if 0, until 
browser is restarted
session.use_trans_sid = 1
session.cookie_path   = /   ; the path the cookie 
is valid for
session.cookie_domain = ; the domain the cookie 
is valid for
session.serialize_handler = php ; handler used to 
serialize data
; php is the standard 
serializer of PHP
session.gc_probability= 1   ; percentual 
probability that the 
; 'garbage collection' 
process is started
; on every session 
initialization
session.gc_maxlifetime= 1440; after this number of 
seconds, stored
; data will be seen as 
'garbage' and
; cleaned up by the gc 
process
session.referer_check = 0; check HTTP Referer 
to invalidate 
; externally stored 
URLs containing ids
session.entropy_length= 0   ; how many bytes to 
read from the file
session.entropy_file  = ; specified here to 
create the session id
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache ; set to 
{nocache,private,public} to
; determine HTTP 
caching aspects
session.cache_expire  = 180 ; document expires 
after n minutes
--

I copied over the config and now it's working fine.

Previous Comments:


[2001-10-29 11:09:26] [EMAIL PROTEC

[PHP-DEV] Bug #13864 Updated: the file exists in directory

2001-10-29 Thread derick

ID: 13864
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: Sablotron XSL
Operating System: windows 2000
PHP Version: 4.0.6
New Comment:

This is very likely not a bug, ask for support on the [EMAIL PROTECTED] 
mailing list.

Derick

Previous Comments:


[2001-10-29 13:39:59] [EMAIL PROTECTED]

d:\php406\extensions/php_sablot.dll
^

shouldn't this be a \ on win32, not / ???
 



[2001-10-29 13:27:00] [EMAIL PROTECTED]

Unable to load dynamic library 'd:\php406\extensions/php_sablot.dll' - The specified 
module could not be found. in Unknown on line 0 





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


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




[PHP-DEV] Bug #13864 Updated: the file exists in directory

2001-10-29 Thread hholzgra

ID: 13864
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Sablotron XSL
Operating System: windows 2000
PHP Version: 4.0.6
New Comment:

d:\php406\extensions/php_sablot.dll
^

shouldn't this be a \ on win32, not / ???
 

Previous Comments:


[2001-10-29 13:27:00] [EMAIL PROTECTED]

Unable to load dynamic library 'd:\php406\extensions/php_sablot.dll' - The specified 
module could not be found. in Unknown on line 0 





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


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




[PHP-DEV] Bug #13864: the file exists in directory

2001-10-29 Thread alcofora

From: [EMAIL PROTECTED]
Operating system: windows 2000
PHP version:  4.0.6
PHP Bug Type: Sablotron XSL
Bug description:  the file exists in directory

Unable to load dynamic library 'd:\php406\extensions/php_sablot.dll' - The
specified module could not be found. in Unknown on line 0 
-- 
Edit bug report at: http://bugs.php.net/?id=13864&edit=1


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




[PHP-DEV] [PHP_DEV] PHP + mysql4 compilation

2001-10-29 Thread Vadka



Note, please, that C API in mysql has changed. So, create_db and drop_db
are gone. See a kind of workaround below.
Thanx!

For create_db function in ext/mysql/php_mysql.c:

int id;
#if MYSQL_VERSION_ID > 3
char buff[80];
#endif
php_mysql_conn *mysql;
MySLS_FETCH();

switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &db)==FAILURE) {
RETURN_FALSE;
}
id = 
php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU MySLS_CC);
CHECK_LINK(id);
break;
case 2:
if (zend_get_parameters_ex(2, &db, &mysql_link)==FAILURE) {
RETURN_FALSE;
}
id = -1;
break;
default:
WRONG_PARAM_COUNT;
break;
}

ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", 
le_link, le_plink);

convert_to_string_ex(db);
#if MYSQL_VERSION_ID < 4
if (mysql_create_db(&mysql->conn, (*db)->value.str.val)==0) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
#else
if((*db)->value.str.len > 64) {
RETURN_FALSE;
}
sprintf(buff,"CREATE DATABASE %s",(*db)->value.str.val);
if (mysql_query(&mysql->conn, buff)!=0) {
RETURN_FALSE;
} else {
RETURN_TRUE;
}
#endif

---
And the same with drop DB:

#if MYSQL_VERSION_ID < 4
convert_to_string_ex(db);
if (mysql_drop_db(&mysql->conn, (*db)->value.str.val)==0) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
#else
if((*db)->value.str.len > 64) {
RETURN_FALSE;
}
sprintf(buff,"DROP DATABASE %s",(*db)->value.str.val);
if (mysql_query(&mysql->conn, buff)!=0) {
RETURN_FALSE;
} else {
RETURN_TRUE;
}
#endif



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




Re: [PHP-DEV] $class::bar() yields parse error

2001-10-29 Thread Sebastian Bergmann

Zeev Suraski wrote:
> Yes, currently this has to be resolved in compile time.

  I see, thanks for the info.

> This may (probably will) change in the Engine 2.0.

  This would be great,
Sebastian

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




[PHP-DEV] Bug #13841 Updated: new session ID with each session_start()

2001-10-29 Thread thomas

ID: 13841
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Session related
Operating System: Red Hat 6.1
PHP Version: 4.0.6
New Comment:

I have two servers setup exactly the same (for the most 
part.)

I don't know much about linux and this other company put it 
together but both installations have the same version of 
Red Hat on it and I use the same exact commands to install 
apache/PHP on both servers.

This second server processes and works with Sessions 
perfectly fine. NO hitches. The problem is that the server 
is password protected so I cannot give access to my 
tests.I'll see if I can get a non-protected virtual server 
on there for you to see.

It's got to be a server installation thing, I think. What 
could be some issues with an OS installation which could 
cause this problem?

Previous Comments:


[2001-10-26 17:43:49] [EMAIL PROTECTED]

I am making a desperate cry. I seem to be the only one on 
the face of the planet who has this problem. Whenever I 
post to the PHP-general group the discussion goes on and 
then ends up with someone writing me saying, "gee man, I 
don't know".

I put in a bug report about this back at php 4.0.1pl2 and 
it was concluded that I was using the POST value instead of 
GET in the form. That bug is this: 
http://bugs.php.net/bug.php?id=5360

Now, in PHP 4.0.6 it still plagues me and there's a program 
I need to run on my server and it won't run because of my 
session problem.

Okay, so this is the deal in a nutshell.  With each 
subsequent call to 'session_start()' instead of picking up 
the existing session, it creates a new PHPID.  This happens 
whether I have the sessionID in a cookie or passed via a 
variable (VIA THE QUERYSTRING).  I have included code for 
two files that I use as a demonstration so you can check 
the code, and I can send you to a website where you can see 
it in action..

Code:

filename: index.php
--


Session Page 1




PHPSESSID: 
Var1: 
Var2: 


Passing sessid: 
VAR 3:  



Try this link


--

filename: index2.php
--


Session Page 2




PHPSESSID: 
Var1: 
Var2: 
VAR3: 



--

in action: http://www.fromtheduke.com/session/index.php

I have noticed with other pages that I have tried this on 
this same server that the session_start() will create a new 
session ID three times, on the third one, it 'sticks' and 
stays with me the rest of the time.

here is my php.ini file which shows my session variable 
options:

[Session]
session.save_handler  = files   ; handler used to 
store/retrieve data
session.save_path = /tmp; argument passed to 
save_handler
; in the case of files, 
this is the
; path where data files 
are stored
session.use_cookies   = 1   ; whether to use 
cookies
session.name  = PHPSESSID
; name of the session
; is used as cookie 
name
session.auto_start= 0   ; initialize session on 
request startup
session.cookie_lifetime   = 0; lifetime in seconds of 
cookie
; or if 0, until 
browser is restarted
session.use_trans_sid = 1
session.cookie_path   = /   ; the path the cookie 
is valid for
session.cookie_domain = ; the domain the cookie 
is valid for
session.serialize_handler = php ; handler used to 
serialize data
; php is the standard 
serializer of PHP
session.gc_probability= 1   ; percentual 
probability that the
; 'garbage collection' 
process is started
; on every session 
initialization
session.gc_maxlifetime= 1440; after this number of 
seconds, stored
; data will be seen as 
'garbage' and
; cleaned up by the gc 
process
session.referer_check = 0; check HTTP Referer 
to invalidate
; externally stored 
URLs containing ids
session.entropy_length= 0   ; how many bytes to 
read from the file
session.entropy_file  = ; specified here to 
create the session id
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache ; set to 
{nocache,private,public} to
; determine HTTP 
caching aspects
session.cache_expire  = 180 ; document expires 
after n minutes


I am at my wit's end. I NEED HELP. Please please help me oh 
PHP programming gods. I have no where else to turn.

This problem happens with Macintosh and

Re: [PHP-DEV] Re: php and winxp

2001-10-29 Thread Sander Roobol

> > Is anyone tested PHP on Windows XP?
>   Yes, it works fine. I have tested Apache 2.0.27-dev, PHP 4.2.0-dev and
>   MySQL 3.23.41 on my notebook (where I have a Windows XP Professional
>   installation) recently.

FYI: it also works fine the latest stable versions: Apache 1.3.22 and PHP
4.0.6.

Sander


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




Re: [PHP-DEV] Re: Bug #13700: Database Abstraction API

2001-10-29 Thread l0t3k

Manuel,
  part of the effort to write an abstraction layer is to factor out common
code and patterns and move this into a common base so that higher level
development becomes easier. a good example of this is persistent connections
handling, which is handled almost identically in all the db extensions.
another example is code implementing the different varieties of fetching
(fetch_array et al).
At the PHP level there are common patterns of use which may be aided by
support at lower levels. bulk fetches and resultset iteration to construct
markup and resultset caching are examples. in addition there are features
which when implemented at a core level, creates value which is automatically
available to users of each backend. while they can be implemented in PHP
itself, but make better sense as "core" functionality from a performance
standpoint. also, there is functionality not covered by the existing APIs,
hence unavailable totally to PHP ( eg fetching multiple resultsets from the
same query ).

  in other words, i dont see the development of an abstraction layer in C
and PHP as competing propositions. the C layer just allows PHP developers to
be more productive and focus on higher levels of application development.
the current PHP abstractions fill the need not only of functionality, but of
code/work style and "aesthetic" preference. that need will persist whatever
happens at engine level.

One of the biggest pluses of PHP is that implementation of new
functionality is magnitudes faster than in "C". if a necessary feature is
needed, we dont have to depend on the release cycle of PHP to have it
included in a distribution. things in this business happens too quickly. and
on a personal/ideological level, many of the features included in Metabase
belong at the engine level (not that theyre not necessary). for instance, i
think anything touching automatic schema modification or generation should
absolutely be in user-space. use of PHP or standard extensions should not
automatically impose a methodology on a user. i like the work you did with
Metabase and think that the work being done on a new extension will make
your work easier by being able to focus more on portability issues, which is
Metabase's strength (imo) and which should be dealt with in PHP.


l0t3k






Manuel Lemos <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

> Hello,
>
> Markus Fischer wrote:
> >
> > On Sat, Oct 27, 2001 at 12:29:48PM -0200, Manuel Lemos wrote :
> > > I am afraid that will never happen.
> >
> > A project for db abstraction as an extension is already in the
> > works. History discussions about it can be found on pear-dev
> > archiv.
>
> What I meant that it would never happen is the adoption of an existing
> database abstraction package.
>

>
> Regards,
> Manuel Lemos



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




[PHP-DEV] Weirdness

2001-10-29 Thread Ivo van Heel

Heyah.

Sorry t' be botherin' ye, but I have some major weirdness going on, and it's
not so substantial as to call it a bug, so I thought to threw the issue at yer
feet and see what you (the knowledgable types) have to say about it.

The application I'll be referring to is running with PHP 4.0.6 as a dynamic
Apache module with Apache 1.3.20 and Linux 2.2.12 (I know, it's ancient).

I have reason to suspect that somehow, before the actual script gets processed,
PHP races through sections of code, in which it has nothing to do in the first
place, not outputting anything, which makes debugging quite difficult, but
executing the code nonetheless.

What!? you say. That's quite a claim. Well, what happens is that after a
certain form post, TWO messages appear in the MySQL database. These DB actions
_always_ happen within the same DB class and within the same function. A few
lines with echo's only output stuff ONCE to the database.

I am SURE that this function is called only once. Further more, one of the DB
fields is 100, where it should be 8, which the first database message has. This
value is used in only ONE script, which should not be included and DOES NOT get
included when submitting that form. That same script has numerous echo's, which
do NOT put anything on the screen, but changes in that script (such as
commenting out the call to the DB class that will insert the second message)
WILL "fix" it, that is, only one message will appear in the DB.

If you understand my story, fire away with your criticism. I do have plenty of
experience developing with PHP, but this just does not compute. I am convinced
I can counter every rational response you provide. :) So that leaves: a bug in
PHP?

-- 
Ivo van Heel
[EMAIL PROTECTED]


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




[PHP-DEV] Bug #13863: $HTTP_POST_FILES not available!

2001-10-29 Thread rbanfield

From: [EMAIL PROTECTED]
Operating system: Win NT4 / IIS 4
PHP version:  4.0.6
PHP Bug Type: Filesystem function related
Bug description:  $HTTP_POST_FILES not available!

Hi,

No matter how I setup my php.ini file, the $HTTP_POST_FILES array is simply
not available on my NT4 machine. Setting globals on/off has no effect (yes,
I am restarting the IIS service after each alteration to the php.ini file).


Placing a "phpinfo(INFO_VARIABLES);" for instance will list the
$HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS variables but not the
$HTTP_POST_FILES variables - they simply aren't there! 

Is it a bug, or a feature, or have I forgotten something?

Best regards,

Robert Banfield
Programmer/Web Administrator
Telair International GmbH - Air Cargo and Baggage Handling Systems
www.telair.com
email: [EMAIL PROTECTED]
phone: ++49 8026 398 81
fax: ++49 8026 398 30

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


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




[PHP-DEV] Bug #11595 Updated: Error in the migration PHP3 to PHP4 with OpenLink-ODBC drive

2001-10-29 Thread ahill

ID: 11595
Updated by: ahill
Reported By: [EMAIL PROTECTED]
Old Status: Assigned
Status: Closed
Bug Type: ODBC related
Operating System: Solaris 2.7
PHP Version: 4.0.4pl1
Assigned To: ahill
New Comment:

unable to duplicate, no feedback

Previous Comments:


[2001-07-30 12:08:34] [EMAIL PROTECTED]

Hi,

Please try with 4.0.6 or submit an ODBC trace; I am unable to reproduce.

Best regards,
Andrew




[2001-07-09 16:08:07] [EMAIL PROTECTED]

Nico,

Can you please generate a trace?  I expect we will see a problem in the SQLPrepare 
where it's dropping your subquery.

To enable tracing, add or uncomment the following line in the $ODBCINI file:

DebugFile=/tmp/opl_debug.out

and then please paste the resultant trace in.

Best regards,
Andrew Hill
OpenLink Software 



[2001-06-26 17:59:09] [EMAIL PROTECTED]

assigning to ahill as he knows openlink best :)



[2001-06-21 11:13:00] [EMAIL PROTECTED]

Sorry,
message error:

Warning: SQL error: [OpenLink][ODBC][Driver]General error, SQL state S1000 in 
SQLPrepare in /psitio/multihomed/www.elsitio.com/pub/cgi-bin/gl/av/player/test.php3 on 
line 19

The most strange is that I reduce the query string "SELECT P.* FROM REAL_CAT_PADRE P 
WHERE IDIOMA = 'C' AND P.ID_PADRE IN ( SELECT ID_HIJO FROM REAL_CAT_HIJO )" to "SELECT 
P.* FROM REAL_CAT_PADRE P WHERE IDIOMA = 'C'" it works fine IN PHP4...

I don't know is very strange.


Nico.



[2001-06-21 11:10:52] [EMAIL PROTECTED]

marking as feedback until user responds...



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/?id=11595


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


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




Re: [PHP-DEV] Bug #13839 Updated: mysql_db_query does converts EURO symbol

2001-10-29 Thread Markus Fischer

mysql_db_query() doesn't touch the data. Plese post the smallest
possible reproduceable example against CVS or a snapshot from
snaps.php.net or RC (php.net/~zeev/ || php.net/~ssb)

- Markus

On Mon, Oct 29, 2001 at 12:30:19PM -, [EMAIL PROTECTED] wrote : 
> ID: 13839
> User updated by: [EMAIL PROTECTED]
> Reported By: [EMAIL PROTECTED]
> Status: Bogus
> Bug Type: MySQL related
> Operating System: Linux 2.2.18
> PHP Version: 4.0.6
> New Comment:
> 
> It is not the problem of the character set. It is a matter of changing the data 
>before it gets inserted into the database.
> example:
> 
> the orginal string is "€"
> the string that gets inserted by mysql_db_query is: "€"
> 
> -> the character "&" gets encoded into "&"!
> 
> Only the orginal string "€" displays an EURO character with the browser if you 
>read it from the database
> with php and display it in a HTML page.
> 
> Is there a way to tell mysql_db_query() not to touch the string before inserting it 
>into the database??
> 
> Thanks
> Martin
> 
> Previous Comments:
> 
> 
> [2001-10-26 15:44:55] [EMAIL PROTECTED]
> 
> mysql uses a different character-set than your browser does. Therefor, it prints 
>character 128 (the euro-sign) different than most text-processors.
> It is actually stored correctly, if you retrieve it (with i.e. PHP) and display it 
>in your browser, it still is a euro-sign.
> 
> 
> 
> [2001-10-26 11:15:08] [EMAIL PROTECTED]
> 
> Try this
> 
> $headline = "This is a € prize";
> mysql_db_query( $db, "insert into article set headline='$headline'");
> 
> this would insert the string "This is a € prize"!
> 
> obviously the command mysql_db_query does a converting on the input string. But in 
>this case the result would be
> a false string.
> 
> Any help?
> Martin
> 
> 
> 
> 
> 
> Edit this bug report at http://bugs.php.net/?id=13839&edit=1
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
  -All your scripts are belong to Zend-

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




[PHP-DEV] Bug #13839 Updated: mysql_db_query does converts EURO symbol

2001-10-29 Thread Martin_Rauch

ID: 13839
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: MySQL related
Operating System: Linux 2.2.18
PHP Version: 4.0.6
New Comment:

It is not the problem of the character set. It is a matter of changing the data before 
it gets inserted into the database.
example:

the orginal string is "€"
the string that gets inserted by mysql_db_query is: "€"

-> the character "&" gets encoded into "&"!

Only the orginal string "€" displays an EURO character with the browser if you 
read it from the database
with php and display it in a HTML page.

Is there a way to tell mysql_db_query() not to touch the string before inserting it 
into the database??

Thanks
Martin

Previous Comments:


[2001-10-26 15:44:55] [EMAIL PROTECTED]

mysql uses a different character-set than your browser does. Therefor, it prints 
character 128 (the euro-sign) different than most text-processors.
It is actually stored correctly, if you retrieve it (with i.e. PHP) and display it in 
your browser, it still is a euro-sign.



[2001-10-26 11:15:08] [EMAIL PROTECTED]

Try this

$headline = "This is a € prize";
mysql_db_query( $db, "insert into article set headline='$headline'");

this would insert the string "This is a € prize"!

obviously the command mysql_db_query does a converting on the input string. But in 
this case the result would be
a false string.

Any help?
Martin





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


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




[PHP-DEV] URL fopen wrappers issue

2001-10-29 Thread Zeev Suraski

Can someone familiar with the code confirm that the conditional 
initialization of the fopen wrappers in basic_functions.c is bogus, and 
that it should be initialized even if fopen wrappers are turned off at the 
startup stage?

Zeev


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




[PHP-DEV] Bug #13861 Updated: Unable to load PHP_OCI8.dll: Access Denied

2001-10-29 Thread sander

ID: 13861
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: OCI8 related
Operating System: WINNT 4.0 & IIS 6
PHP Version: 4.0.5
New Comment:

IIS probably runs as a different user which doesn't have the proper permissions to 
access php_oci8.dll
Check your permissions. Reopen this report if the problem still exists.

Previous Comments:


[2001-10-29 04:28:20] [EMAIL PROTECTED]

I'm using PHP 4.05 in a Win NT 4.0 Server SP 6 and IIS and I have installed Oracle 
client for Oracle 8.
Now when I Uncomment the extensions Php_OCI8.dll and I try to see the Webpage the 
reply of server is ...
 Warning: Unable to load c:\php\extensions\php_oci8.dll
 Access Denied
Instead using the msdos prompt and command PHP all run OK and PHP can connect to 
Oracle server an create the web pages right.







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


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




Re: [PHP-DEV] $class::bar() yields parse error

2001-10-29 Thread Zeev Suraski

At 11:33 29/10/2001, Sebastian Bergmann wrote:
>   Calling static methods on 'variable' classes currently yields a parse
>   error:
>
>  class foo {
>   function bar() {
> echo 'foobar';
>   }
> }
>
> $class = 'foo';
> $class::bar();
> ?>
>
>   I think it would be great if the above syntax would be possible. Any
>   technical obstacles, comments?

Yes, currently this has to be resolved in compile time.  This may (probably 
will) change in the Engine 2.0.

Zeev


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




[PHP-DEV] Bug #13862: Mail() and mb_send_mail() not work on php

2001-10-29 Thread shu-chin . cheeng

From: [EMAIL PROTECTED]
Operating system: Win2K
PHP version:  4.0.6
PHP Bug Type: Mail related
Bug description:  Mail() and mb_send_mail() not work on php

I try to send some large attachments (>1k binary or >1k ascii)via PHP by
functions Mail() or mb_send_mail(), it not work and cause apache.exe
Application Error and memory error and ask for terminate it...
and i try with a very small attachment (<1k ascii), sometime it work.
I wander, is it PHP functions error or PHP error.
but i don't think it is cause by apache..
can you help me on this

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


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




[PHP-DEV] $class::bar() yields parse error

2001-10-29 Thread Sebastian Bergmann

  Calling static methods on 'variable' classes currently yields a parse 
  error:



  I think it would be great if the above syntax would be possible. Any
  technical obstacles, comments?

  Doing

bar();
?>

  is against the idea of static classes, IMHO.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




Re: [PHP-DEV] Debugging tool needed for Win32

2001-10-29 Thread Sebastian Bergmann

Derick Rethans wrote:
> www.sysinternals.com iirc

  That's it! Thanks :-)

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




[PHP-DEV] Bug #13861: Unable to load PHP_OCI8.dll: Access Denied

2001-10-29 Thread alessandro . martinato

From: [EMAIL PROTECTED]
Operating system: WINNT 4.0 & IIS 6
PHP version:  4.0.5
PHP Bug Type: OCI8 related
Bug description:  Unable to load PHP_OCI8.dll: Access Denied

I'm using PHP 4.05 in a Win NT 4.0 Server SP 6 and IIS and I have installed
Oracle client for Oracle 8.
Now when I Uncomment the extensions Php_OCI8.dll and I try to see the
Webpage the reply of server is ...
 Warning: Unable to load c:\php\extensions\php_oci8.dll
 Access Denied
Instead using the msdos prompt and command PHP all run OK and PHP can
connect to Oracle server an create the web pages right.


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


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




[PHP-DEV] Bug #13698 Updated: CGI version segfaults at shutdown

2001-10-29 Thread yasuo_ohgaki

ID: 13698
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Reproducible crash
Old Operating System: Linux 2.4.4/glibc 2.2.2
Operating System: Linux 2.4.14-pre3/glibc 2.2.2
Old PHP Version: 4.0CVS-2001-10-16
PHP Version: 4.0CVS-2001-10-29
New Comment:

It crashes today's CVS source with newer kernel.

Previous Comments:


[2001-10-19 23:17:25] [EMAIL PROTECTED]

I'm using 4.1.0RC1 for this comment.

I build CGI version, with following configure.
'./configure' \
'--enable-mbstring' \
'--enable-mbstr-enc-trans' \
'--enable-debug' \
but, I didn't get segfault this time. Therefore, it may not be related to 
--enable-mbstr-enc-trans after all :)

I still get segfault with longer config and backtrace is the same. Anyway, since no 
one seems to be interested in this bug, I've take look at what is really wrong. The 
segfualt occurs in this macro def. (zend_API.h)

#define CHECK_ZVAL_STRING_REL(z) \
if ((z)->value.str.val[ (z)->value.str.len ] != '\0') zend_error(E_WARNING, 
"String is not zero-terminated (%s) (source: %s:%d)", (z)->value.str.val 
ZEND_FILE_LINE_RELAY_CC);

(gdb) print zvalue->value.str.val[ zvalue->value.str.len ]
Cannot access memory at address 0x0
(gdb) print zvalue->value.str.val
$1 = 0x0
(gdb) print zvalue->value.str.len
$2 = 0
(gdb) 






[2001-10-16 19:23:58] [EMAIL PROTECTED]

CGI version segfaults at the end of test script.(i.e. at the end of "./php -q 
run-tests.php")
It happens both HAED (4.2.0-dev) and RC (4.1.0RC). It seems --enable-mbstr-enc-trans 
is the cause.

==CONFIGURE(4.1.0RC)==
I cannot reproduce segfault with 4.2.0-dev using this simple configure line  I 
attached more complex configure for 4.2.0-dev that causes segfault.

./configure --enable-mbstring --enable-mbstr-enc-trans --ena
ble-debug
without --enable-mbstr-enc-trans, php doesn't segfaults.

==BACKTRACE(4.1.0RC)==
[yohgaki@dev RC]$ gdb -c core
GNU gdb 20010318
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-redhat-linux".
Core was generated by `/home/yohgaki/cvs/php/RC/php -C -q 
/home/yohgaki/cvs/php/RC/run-tests.php /home'.
Program terminated with signal 11, Segmentation fault.
#0  0x0811a453 in ?? ()
(gdb) file php
Reading symbols from php...done.
(gdb) bt
#0  0x0811a453 in _zval_dtor (zvalue=0x81e9c6c, 
__zend_filename=0x817d27c "zend_execute_API.c", __zend_lineno=268)
at zend_variables.c:43
#1  0x08111c82 in _zval_ptr_dtor (zval_ptr=0x81edd60, 
__zend_filename=0x817db13 "zend_variables.c", __zend_lineno=192)
at zend_execute_API.c:268
#2  0x0811a8ab in _zval_ptr_dtor_wrapper (zval_ptr=0x81edd60) at zend_variables.c:192
#3  0x081211b9 in zend_hash_destroy (ht=0x81e5404) at zend_hash.c:541
#4  0x0811a4d1 in _zval_dtor (zvalue=0x81e53c4, 
__zend_filename=0x817d27c "zend_execute_API.c", __zend_lineno=268)
at zend_variables.c:51
#5  0x08111c82 in _zval_ptr_dtor (zval_ptr=0x81eddf8, 
__zend_filename=0x817db13 "zend_variables.c", __zend_lineno=192)
at zend_execute_API.c:268
#6  0x0811a8ab in _zval_ptr_dtor_wrapper (zval_ptr=0x81eddf8) at zend_variables.c:192
#7  0x081211b9 in zend_hash_destroy (ht=0x81befc8) at zend_hash.c:541
#8  0x08111992 in shutdown_executor () at zend_execute_API.c:172
#9  0x0811b782 in zend_deactivate () at zend.c:600
#10 0x0806243c in php_request_shutdown (dummy=0x0) at main.c:736
#11 0x08060d83 in main (argc=5, argv=0xb89c) at cgi_main.c:775
#12 0x400b91be in ?? ()
(gdb) 

==CONFIGURE(4.2.0-dev)==
without --enable-mbstr-enc-trans, php doesn't segfaults.

'./configure' \
'--disable-short-tags' \
'--without-mysql' \
'--with-bz2' \
'--with-curl' \
'--with-ftp' \
'--with-iconv' \
'--with-mhash' \
'--with-mcrypt' \
'--with-openssl' \
'--with-pgsql' \
'--with-regex=system' \
'--with-zlib' \
'--with-gd=/usr' \
'--enable-gd-native-ttf' \
'--with-freetype-dir=/usr/local' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-xpm-dir=/usr/X11R6' \
'--enable-bcmath' \
'--enable-ftp' \
'--enable-shmop' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-sockets' \
'--enable-mbstring' \
'--enable-mbstr-enc-trans' \
'--enable-memory-limit' \
'--enable-wddx' \
'--enable-debug' \


==BACKTRACE(4.2.0-dev)==
[yohgaki@dev HEAD]$ gdb -c core
GNU gdb 20010318
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" t

[PHP-DEV] windows binary package...

2001-10-29 Thread Marc Boeren


Hi,

Who is in charge of the windows binary packages?

Bug id #13664 says php_dbx.dll is not included in the 4.0.6 package (and
since it was EXPERIMENTAL in 4.0.6, that's ok), but it would be nice to have
it in the 4.1.0 package, but I don't know where/how to do that...

Cheerio, Marc.

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




Re: [PHP-DEV] Debugging tool needed for Win32

2001-10-29 Thread Derick Rethans

On Mon, 29 Oct 2001, Sebastian Bergmann wrote:

>   I'm searching for a Win32 tool that shows which process wants to open
>   what files. I used to have a tool like this about two years ago. It was
>   a freeware tool, but I don't remember the name :-(
>
>   Any ideas/suggestions?

www.sysinternals.com iirc

Derick

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


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




[PHP-DEV] Debugging tool needed for Win32

2001-10-29 Thread Sebastian Bergmann

  I'm searching for a Win32 tool that shows which process wants to open
  what files. I used to have a tool like this about two years ago. It was
  a freeware tool, but I don't remember the name :-(

  Any ideas/suggestions?

  I hope this is not too off-topic here, but since I need this for work
  on the Servlet SAPI it should be okay :-)

  Thanks,
Sebastian

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




Re: [PHP-DEV] Bug #10482 Updated: if the filesize if more than 2GB, filesystem functions do not seem to recognize

2001-10-29 Thread Markus Fischer

On Mon, Oct 29, 2001 at 09:42:42AM +0100, Derick Rethans wrote : 
> On Mon, 29 Oct 2001, Markus Fischer wrote:
> 
> > Wait, not so fast. He says the file *is* bigger than 2GB so his
> > FS seems to support it. It may be that PHP has to be rccompiled
> > with the proper setting to it recognized the 64bit fileaccess
> > fucntion. What do you think?
> 
> Maybe, but PHP can't show numbers larger then 2^31 anyways and there
> are already feature requests for that.

*Bummer* good point.

- Markus

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




[PHP-DEV] Bug #10439 Updated: relative chdir from root doesn´t work

2001-10-29 Thread php

ID: 10439
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Filesystem function related
Operating System: W98, W98SE
PHP Version: 4.0.5
New Comment:

now it works (php 4.08dev). could you please explain "..not to out-smart ..",

gustav graf

Previous Comments:


[2001-10-29 02:44:11] [EMAIL PROTECTED]

Reopen if this happens with PHP 4.0.6. Also, try not to out-smart PHP's functions. 
They should know how to handle
different path separators and such things which are platform
specific.


--Jani




[2001-05-02 16:34:59] [EMAIL PROTECTED]

asp-mssql



[2001-05-02 16:34:04] [EMAIL PROTECTED]

Sorry, my only win2000 system is an asp-mysql production system in a network center 
and not available for testing now. I will install php on this system maybe in two 
weeks.



[2001-05-02 16:29:17] [EMAIL PROTECTED]

Do you happen to have an NT machine you can try and reproduce this on? I am on Windows 
2000 and it works.



[2001-05-02 16:24:44] [EMAIL PROTECTED]

No, new version 4.0.5 didn't solve my problem, testesd under win98.



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/?id=10439


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


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




Re: [PHP-DEV] Bug #10482 Updated: if the filesize if more than 2GB,filesystem functions do not seem to recognize

2001-10-29 Thread Derick Rethans

On Mon, 29 Oct 2001, Markus Fischer wrote:

> Wait, not so fast. He says the file *is* bigger than 2GB so his
> FS seems to support it. It may be that PHP has to be rccompiled
> with the proper setting to it recognized the 64bit fileaccess
> fucntion. What do you think?

Maybe, but PHP can't show numbers larger then 2^31 anyways and there
are already feature requests for that.

Derick

>
> - Markus
>
> On Mon, Oct 29, 2001 at 07:47:21AM -, [EMAIL PROTECTED] wrote :
> > ID: 10482
> > Updated by: sniper
> > Reported By: [EMAIL PROTECTED]
> > Old Status: Open
> > Status: Bogus
> > Bug Type: Filesystem function related
> > Operating System: redhat 7.1
> > PHP Version: 4.0.4pl1
> > New Comment:
> >
> > 32 bit=2GB limitation in the ext2 for files.
> > Not a PHP problem.
> >
> > --Jani
> >
> >
> >
> > Previous Comments:
> > 
> >
> > [2001-04-24 20:14:21] [EMAIL PROTECTED]
> >
> >
> >
> > $folder = dir(.);
> > $folder->rewind() ;
> > clearstacache();
> > while ($file=$folder->read()) {
> >  if (is_dir ($file)) {
> > do_some thing...
> >  }
> >  elif (is_file($file)) {
> >  do_somethingelse.
> >  }
> > ..
> > .
> > }
> >
> > is_file() call in the above code does not return ture if the file size is > 2GB.
> >
> > I was able to print $file, just inside the loop (meaning the folder object has the 
>file in the filelist
> > and hence it is the is_file() which is filtering it out.
> > I tried other functions like file_exists(), is_readable() etc in place of 
>is_file() without any success.
> >
> >
> > 
> >
> >
> >
> > Edit this bug report at http://bugs.php.net/?id=10482&edit=1
> >
> >
> > --
> > PHP Development Mailing List 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> Markus Fischer,  http://guru.josefine.at/~mfischer/
> EMail: [EMAIL PROTECTED]
> PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
>   -All your scripts are belong to Zend-
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


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




Re: [PHP-DEV] Bug #10482 Updated: if the filesize if more than 2GB, filesystem functions do not seem to recognize

2001-10-29 Thread Markus Fischer

Wait, not so fast. He says the file *is* bigger than 2GB so his
FS seems to support it. It may be that PHP has to be rccompiled
with the proper setting to it recognized the 64bit fileaccess
fucntion. What do you think?

- Markus

On Mon, Oct 29, 2001 at 07:47:21AM -, [EMAIL PROTECTED] wrote : 
> ID: 10482
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Old Status: Open
> Status: Bogus
> Bug Type: Filesystem function related
> Operating System: redhat 7.1
> PHP Version: 4.0.4pl1
> New Comment:
> 
> 32 bit=2GB limitation in the ext2 for files.
> Not a PHP problem.
> 
> --Jani
> 
> 
> 
> Previous Comments:
> 
> 
> [2001-04-24 20:14:21] [EMAIL PROTECTED]
> 
> 
> 
> $folder = dir(.);
> $folder->rewind() ;
> clearstacache();
> while ($file=$folder->read()) {
>  if (is_dir ($file)) {
> do_some thing...
>  }
>  elif (is_file($file)) {
>  do_somethingelse.
>  }
> ..
> .
> }
> 
> is_file() call in the above code does not return ture if the file size is > 2GB.
> 
> I was able to print $file, just inside the loop (meaning the folder object has the 
>file in the filelist
> and hence it is the is_file() which is filtering it out.
> I tried other functions like file_exists(), is_readable() etc in place of is_file() 
>without any success.
> 
> 
> 
> 
> 
> 
> Edit this bug report at http://bugs.php.net/?id=10482&edit=1
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
  -All your scripts are belong to Zend-

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




Re: [PHP-DEV] Bug #13852 Updated: zlib file reading functions not working in Apache Module version

2001-10-29 Thread Paco Ortiz

Hi,

in case it helps, it works fine for me using 4.0.6, perhaps
you should update.

(Win2000 + PHP 4.0.6 as apache module, Apache Win32 1.3.20,
with Zend Optimizer)

Bye,

F.J. Ortiz

10/28/01 6:55:44 PM, [EMAIL PROTECTED] wrote:

>ID: 13852
>User updated by: [EMAIL PROTECTED]
>Reported By: [EMAIL PROTECTED]
>Status: Bogus
>Bug Type: Zlib Related
>Operating System: Windows 2000
>PHP Version: 4.0.4pl1
>New Comment:
>
>even with error_reporting(E_ALL) i don't get any error messages from the script. i 
>already had tried this.
>i have both the cgi and win-apache server module version of php installed parallely. 
>.php files are mapped to the php 
module and .phpc to cgi. that way it is very easy to compare the output of an 
identical script by just renaming it.
>while as cgi the script outputs the textfile as expected, the module doesn't give me 
>anything. 
>i only have one php.ini on my system, which resides in winnt\system32\php.ini. it is 
>used by the cgi and module.
>
>error_reporting(E_ALL);
>$log = gzfile('test.gz');
>foreach ($log as $l) echo "$l";
>?>
>
>phil.
>
>Previous Comments:
>
>
>[2001-10-28 11:37:48] [EMAIL PROTECTED]
>
>Probably not a bug (cgi does work, so very unlikely to be a bug in PHP or zlib). Ask 
>support questions on 
http://www.php.net/support.php , or reopen if I'm wrong.
>
>Try this:
>Please check the location of your php.ini, that you're editing the right one. (check 
>wether modifications show up in a 
phpinfo() page).
>
>And check your error reporting level, set it to E_ALL (error_reporting(E_ALL); before 
>anything). My guess is it's giving 
undefined function errors.
>
>
>
>[2001-10-27 16:58:01] [EMAIL PROTECTED]
>
>most of the zlib file reading functions, like gzfile,gzread,gzpassthru,gzgetc do not 
>work in the Apache Module version of 
php. 
>the function returns no value - without outputting any error or warning; sometimes 
>the webserver crashes.
>when i switched php to run as cgi everything works as expected.
>don't know if this has been fixed, couldn't find an entry in the bugfinder.
>phil.
>
>running extensions:
>extension=php_zlib.dll
>extension=php_sablot.dll
>extension=php_gd.dll
>extension=php_pdf.dll
>demo script (test.gz would be ascii text):
>$log = gzfile('test.gz');
>foreach ($log as $l) echo "$l";
>
>
>
>
>
>
>Edit this bug report at http://bugs.php.net/?id=13852&edit=1
>
>
>-- 
>PHP Development Mailing List 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

___
Francisco Javier Ortiz Torre
ComuNET,S.A.
mailto:[EMAIL PROTECTED]

ComuNET, S.A
Gral. Concha 39,6º
48012 Bilbao España
Tel: +34 944 700 101 
Fax: +34 944 700 185 
http://www.comunet.es
___



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