#42262 [Bgs->Opn]: get_magic_quotes_gpc() should be there and return false

2008-03-01 Thread philip
 ID:   42262
 Updated by:   [EMAIL PROTECTED]
 Reported By:  spam2 at rhsoft dot net
-Status:   Bogus
+Status:   Open
 Bug Type: *Configuration Issues
 Operating System: All
 PHP Version:  6CVS-2007-08-09 (snap)
 New Comment:

Still being discussed... and the thread in question decided to keep
them AFAICT. Where else was a decision made on this?

http://marc.info/?l=php-internals&m=114177891420914&w=2



Previous Comments:


[2008-02-05 11:34:54] [EMAIL PROTECTED]

Hi Philip, see the "Remove magic_quotes and register global" thread two
years ago.

The functions (there is more than the getter) can't exist anymore as
the underlying features do not exist anymore. Using them (in all bad
possible bad ways) can end in a rather unexpected result if they don't
check return values (setter).

A simple if (php_version >= 6) does the job and makes it clear in your
code. Still no bug sorry (that means bogus here).



[2008-02-05 04:02:18] [EMAIL PROTECTED]

As the reporter mentioned outside this report, NEWS indicates this
function should exist whereas various bug reports say it shouldn't, and
I cannot find the decision on internals...

For now we must consider NEWS as the authority in which case this
function should exist so please update NEWS if this has changed and
regardless it will then be documented.

And since it (php5) returns 0 or 1, I reckon if it exists it should
return 0 and not false.



[2008-02-04 13:41:01] [EMAIL PROTECTED]

 > still not bug, please see php.internals archive for the discussion
about this change.



[2008-02-04 13:17:35] [EMAIL PROTECTED]

Hello,

The behavior of get_magic_quotes_gpc has changed. Check the NEWS file:

 "Changed get_magic_quotes_gpc(), get_magic_quotes_runtime to always
return
false and set_magic_quotes_runtime() to raise an E_CORE_ERROR."




[2007-08-09 22:39:12] spam2 at rhsoft dot net

Description:

[10-Aug-2007 00:30:56] PHP Fatal error:  Call to undefined function
get_magic_quotes_gpc() in
/mnt/data/www/sql.rhsoft.net/libraries/common.lib.php on line 2606


The function "get_magic_quotes_gpc()" should available in PHP6 and
return always false, so you dont break applications that check the
setting and make a "stripslashes" if it is on.



Reproduce code:
---
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
{
 @$akt_temp_str_name = stripslashes(@$akt_temp_str_name);
}

Expected result:

if(get_magic_quotes_gpc())
{
 @$akt_temp_str_name = stripslashes(@$akt_temp_str_name);
}

should work also

Actual result:
--
A fatal error





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


#44299 [Opn]: PCRE security issue

2008-03-01 Thread nlopess
 ID:   44299
 Updated by:   [EMAIL PROTECTED]
 Reported By:  test_junk at hotmail dot it
 Status:   Open
 Bug Type: PCRE related
 Operating System: All
 PHP Version:  4.4.8
 New Comment:

I can upgrade it in CVS, but I'm not sure there will be any further PHP
4 release. Derick can you comment on this?


Previous Comments:


[2008-02-29 23:58:05] test_junk at hotmail dot it

Description:

Hello,

PCRE versions prior to 7.6 are affected by a vulnerability:
http://www.securityfocus.com/bid/27786

Unfortunately php 4.4.8 compiled against version 7.6 is unstable, are
you going to fix this issue?

Thanks






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


#43579 [Com]: sessions time out on 5.2.5

2008-03-01 Thread sv4php at fmethod dot com
 ID:   43579
 Comment by:   sv4php at fmethod dot com
 Reported By:  assid at assid dot com
 Status:   Open
 Bug Type: Session related
 Operating System: Debian etch
 PHP Version:  5.2.5
 New Comment:

I had the chance to test this issue with Assid on his server and we
were able to more accurately pin point the issue:

1) the sessions don't time out, instead we're talking about
session_name() selectively being ignored (which results in two session
cookies, and hence sessions, created)

2) the issue seems to only happen on PHP 5.2.5 without --enable-debug.
On 5.2.4 it doesn't happen, on 5.2.5 with --enable-debug we couldn't
repro, but this needs more testing.

3) the issue may be hardware/configuration dependent (32-64 bit? OS
distro? I don't have those details, Assid could provide them). The
Apache server on the tested configuration runs in prefork mode, so it
can't be a threading race condition (as far as I know).

4) we reverted the patch for bug http://bugs.php.net/42596 and
recompiled 5.2.5 but still were able to reproduce the issue. Since this
is the only change in the session module between 5.2.4 and 5.2.5, I have
to conclude the issue is related to some other code (somehow..).

Description of the reproduce steps.

We have userA and userB on different machines, IP-s. They both are
given the url to the example with the counter as Assid provided it.
Notice the example uses session_name('spheretest'). 

If a userA refreshes the page alone, he gains session cookie
'spheretest' and the counter works normally.

If userB refreshed the page, userA gains a new cookie 'PHPSESSID' and a
new session. After userA refreshes few more times, PHP gets back to
using the previous 'spheretest' session/cookie.

We tested if the issue is related to prematurely starting session
*before* the session_name() call. But no, session_id is never defined
before the session_name() call.


Previous Comments:


[2008-03-01 02:36:28] assid at assid dot com

err sorry, session counter reset to 1 on refresh on the previous post.



[2008-03-01 02:34:58] assid at assid dot com

Okay, finally found out how to do valgrind with apache :P

During valgrind, phpmyadmin was behaving properly, squirrelmail as i
mentioned in my previous post is erratic, but it normally takes time to
crash, once it does, then it happens more frequently.

I later tried the session script as spherelinx.com/session.php (check
phps)

This counter was working fine here again. 

I then decided to visit alternate sites on the server perhaps to create
more session files.

I visited www.equineindia.com, and then i started hitting on
session.php again, voila! session counter was reset to 0

I tried to see if i could simulate more of the sessions disappearing
etc, like it going back to the original counter, but it didnt go,
(normally you keep hitting refresh, you just might get back). I guess i
should have tried more, but the day was just beginning and had to let
the public in once again. So i decided, we atleast got the basics of
what was causing this, and atleast report this.

The valgrind log is available at: http://assid.com/apache1.log

Btw: yes apc , and fileinfo from pecl were disabled before I did this.

the main page of equineindia refreshes to login.php ; please visit
login.phps for the source of the same.

Interestingly, the leak summary shows alot of leakage BTW.



[2008-02-28 18:13:40] assid at assid dot com

this will be difficult, we provide shared hosting on this box, and will
be difficult to just shut it down for that period of time. but lets see
what i can do.

Can you tell me how exactly do i put the whole apache process through
valgrind ?



[2008-02-28 17:52:40] [EMAIL PROTECTED]

The libdl stuff can be ignored, so that looks like a clean valgrind
run.  But, are you sure the problem happens on the command line?  I'd
run the entire apache -X through valgrind.  You'd need to do it on a
quiet machine somewhere that isn't getting hit, of course, so you can
control the requests you send to it while valgrind is running.  Hit it
until you see the problem, then stop and show us that valgrind output
from that.



[2008-02-28 11:40:49] assid at assid dot com

Okay ran valgrind (as far as i can understand it)
http://assid.com/valgrind.txt

I have removed some extensions as i was still testing, but to no
success.

I hope the log proves useful to you.



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.

#43358 [Com]: 500 HTTP error when eval()'d code contains a notice/warning

2008-03-01 Thread antonprk at mail dot ru
 ID:   43358
 Comment by:   antonprk at mail dot ru
 Reported By:  andrea dot spacca at gmail dot com
 Status:   Open
 Bug Type: *General Issues
 Operating System: Gentoo
 PHP Version:  5.2.5
 New Comment:

I've got similiar problem.
Server is under CentOS release 4.6 (Final).
The  example  described  in  http://bugs.php.net/bug.php?id=43358
IS NOT working. Scripts that use function eval(); DO NOT work also.
Error message: Parse error: syntax error, unexpected T_STRING,
expecting
T_FUNCTION in /function.php(1) : eval()'d code on line xxx

But  with  previous  version of PHP 5.2.4 everything was working and i
have especially tested it (have installed PHP version 5.2.4).

Disabling or modifying output_buffering do not make it working.
Can you help with any advice?


Previous Comments:


[2008-02-29 19:33:49] not at public dot com

Was able to eliminate this bug by turning output buffering off in
php.ini



[2008-02-26 11:31:05] zorfling at hotmail dot com

Hi,

I've been having the same problem and thought I'd post my workaround.
If you simply overwrite the headers to return a 200, it works.

eg header("Content-type: text/html", true, 200); (second arg is to
overwrite the current header)

NB This needs to be called AFTER the eval that causes the issue.

Hope this helps,


Chris



[2007-12-17 22:28:38] not at public dot com

This is an existing bug. Having the same error on 2.5.4 on FreeBSD.

A failed eval results in a 500 error, although when calling error_log()
on the last line of the code, the php script does reach and execute
that.

The script is executed correctly, and the response from the server also
includes the ( correct ) output of the script without any php errors,
but after the 500 header ofcourse. Browsers hang on the error and don't
show the output.



[2007-11-21 13:41:33] andrea at spacca dot org

here you can test the http response on our enviroment:
http://89.186.95.3/test/testBug.cgi



[2007-11-21 10:23:41] andrea at spacca dot org

from our httpd.conf:
LoadModule php5_module etc etc
AddType application/x-httpd-php .php .cgi



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

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


#44306 [NEW]: bad result of php_uname('m') for MIPS architecture

2008-03-01 Thread a dot u dot savchuk at gmail dot com
From: a dot u dot savchuk at gmail dot com
Operating system: Windows (MIPS)
PHP version:  5.2.5
PHP Bug Type: *General Issues
Bug description:  bad result of php_uname('m') for MIPS architecture

Description:

bad result of php_uname('m') for MIPS architecture

As i lokk in source ext/standart/info.c
there is strange code:

<<<
PHPAPI char *php_get_uname(char mode)
{
char *php_uname;
char tmp_uname[256];
#ifdef PHP_WIN32
<<<
<<< skipped lines
<<<
} else if (mode == 'm') {
switch (SysInfo.wProcessorArchitecture) {
case PROCESSOR_ARCHITECTURE_INTEL :
snprintf(tmp_uname, sizeof(tmp_uname), "i%d",
SysInfo.dwProcessorType);
php_uname = tmp_uname;
break;
case PROCESSOR_ARCHITECTURE_MIPS :
php_uname = "MIPS R4000";
php_uname = tmp_uname;
break;
<<<


Reproduce code:
---
none


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


#44305 [NEW]: odbc_next_result - mysql procedure with multiple results

2008-03-01 Thread martin dot dufka at atlas dot cz
From: martin dot dufka at atlas dot cz
Operating system: WIN2000
PHP version:  5.2.5
PHP Bug Type: ODBC related
Bug description:  odbc_next_result - mysql procedure with multiple results

Description:

problem with: odbc_next_result()
mysql-server: 5.0.51a (.45-the same problem)
odbc driver: Driver={MySQL ODBC 3.51 Driver}

when MySQL procedure returns 2 rowsets, after the second rowset
odbc_next_result() returns true. 

Reproduce code:
---


Expected result:

bool(true) bool(false) bool(false)

Actual result:
--
bool(true) bool(true) 
Warning: odbc_fetch_array() [function.odbc-fetch-array]: No tuples
available at this result index in D:\Apache2.2\htdocs\test\x.php on line
19
bool(false)

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


#40926 [Com]: shared pgsql and curl extensions cause segfault

2008-03-01 Thread jbq at caraldi dot com
 ID:   40926
 Comment by:   jbq at caraldi dot com
 Reported By:  seanius at debian dot org
 Status:   Assigned
 Bug Type: PostgreSQL related
 Operating System: Debian GNU/Linux
 PHP Version:  5.2.1
 Assigned To:  yohgaki
 New Comment:

Another workaround is to recompile PostgreSQL's libpq without OpenSSL
support (ie the --with-openssl configure switch).  After all, OpenSSL is
rarely needed in a typical LAPP installation.


Previous Comments:


[2007-11-12 14:45:13] sam at zoy dot org

Hello, I did read the sources and studied them, and I can confirm
that it is a matter of callback jumping to an invalid address.

libpq's init_ssl_system() installs callbacks by calling
CRYPTO_set_id_callback() and CRYPTO_set_locking_callback(). This
function is called each time initialize_SSL() is called (for instance
through the PHP pg_connect() function) and does not keep a reference
counter, so libpq's destroy_SSL() has no way to know that it should
call a destroy_ssl_system() function, and there is no such function
anyway. So the callbacks are never removed.

But then, upon cleanup, PHP calls zend_shutdown() which properly
unloads pgsql.so and therefore the unused libpq.

Finally, the zend_shutdown procedure calls zm_shutdown_curl()
which in turn calls curl_global_cleanup() which leads to an
ERR_free_strings() call and eventually a CRYPTO_lock() call.
CRYPTO_lock() checks whether there are any callbacks to call,
finds one (the one installed by libpg), calls it, and crashes
because libpq was unloaded and hence the callback is no longer
in mapped memory.

There are a few ways to fix the problem, all of which are highly
unsatisfying or irrealist:

 - always ensure that pgsql.so is loaded before (and therefore
unloaded after) any other SSL-using library.

 - fix libpq so that it keeps a reference count when
initialize_SSL() is called, updates it when destroy_SSL() is
called, and remove SSL callbacks when the reference count
reaches zero.

 - fix libpq so that it removes the SSL callbacks when unloaded
(done in the library's .fini section)

 - hack PHP's module_destructor() so that it does not unload
a module if its name was pgsql.so (or maybe there is already
a mechanism for that).

None of these proposals is really safe because there might be other
conflicts due to libssl not being context-aware.

There is also the possibility to fix libssl by making it reentrant
or context-aware (just kidding, lol). In all cases, libssl can be
copiously blamed.



[2007-05-22 08:13:09] milan dot pikula at ipsec dot info

hello, I didn't read the sources nor studied it thoroughly, but I don't
think it's a matter of callback jumping to an invalid address.

I have started the cli php with dmalloc library preloaded, and found a
problem in libpq, that calls free() on some invalid pointer or
previously deallocated memory. There is no symbol related to any
callback in the stack backtrace.

Also, the problem is persistent regardless of module loading order, it
just doesn't show without dmalloc library in some cases.


** glibc detected *** php: free(): invalid pointer: 0xb6e23380 ***
=== Backtrace: =
/lib/tls/i686/cmov/libc.so.6[0xb7a187cd]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7a1be30]
/usr/lib/libpq.so.5[0xb7149dfa]
/usr/lib/libpq.so.5[0xb714a6d3]
/usr/lib/libpq.so.5(PQconnectStart+0x1a)[0xb714b04a]
/usr/lib/libpq.so.5(PQconnectdb+0x22)[0xb714b0a2]
/usr/lib/php5/20060613+lfs/pgsql.so[0xb713d31f]
php[0x82da470]
php(execute+0x188)[0x82d93e8]
php(zend_execute_scripts+0x84)[0x82b8924]
php(php_execute_script+0x246)[0x8270a46]
php(main+0xf09)[0x8348fd9]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb79c6ebc]
php[0x8096191]
=== Memory map: 
08048000-0854e000 r-xp  09:00 637820 /usr/bin/php5
0854e000-08583000 rw-p 00505000 09:00 637820 /usr/bin/php5
08583000-085a9000 rw-p 08583000 00:00 0 [heap]
b6d6c000-b6d77000 r-xp  09:00 669427 /lib/libgcc_s.so.1
b6d77000-b6d78000 rw-p a000 09:00 669427 /lib/libgcc_s.so.1
b6d82000-b6d83000 rwxp b6d82000 00:00 0
b6d83000-b6d84000 rw-p b6d83000 00:00 0
b6d84000-b6f13000 rwxp b6d84000 00:00 0
b6f13000-b6f1c000 r-xp  09:00 686412
/lib/tls/i686/cmov/libnss_files-2.5.so
b6f1c000-b6f1e000 rw-p 8000 09:00 686412
/lib/tls/i686/cmov/libnss_files-2.5.so
b6f1e000-b6f3b000 rwxp b6f1e000 00:00 0
b6f3b000-b6f3e000 r-xp  09:00 638515
/usr/lib/libgpg-error.so.0.3.0
b6f3e000-b6f3f000 rw-p 2000 09:00 638515
/usr/lib/libgpg-error.so.0.3.0
b6f3f000-b6f8e000 r-xp  09:00 638462
/usr/lib/libgcrypt.so.11.2.2
b6f8e000-b6f9 rw-p 0004e000 09:00 638462
/usr/lib/libgcrypt.so.11.2.2
b6f9-b6fc3000 r-xp  09:00 638730
/usr/lib/libxslt.so.1.1.20
b6fc3000-b6fc4000 rw-p 00032000 09:00 638730
/usr/lib/libxslt.so.1.1.20
b6fc4000-b6fd4000 r-xp  09:00 638441

#44303 [NEW]: Installer for php exits prematurely when trying to install on apache 2.2.8

2008-03-01 Thread david dot emmett at the-can dot com
From: david dot emmett at the-can dot com
Operating system: Vista
PHP version:  5.2.5
PHP Bug Type: Apache2 related
Bug description:  Installer for php exits prematurely when trying to install on 
apache 2.2.8

Description:

installed apache 2.2.8, no problem, installed php 5.2.5 selected the 2.2
install option, and the installer exited


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


#43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible

2008-03-01 Thread losd at mail dot dk
 ID:   43817
 User updated by:  losd at mail dot dk
 Reported By:  losd at mail dot dk
 Status:   Assigned
 Bug Type: Directory function related
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 Assigned To:  dmitry
 New Comment:

Doh, sorry, thought I could edit the original text. Just delete that
comment.

But yes, as Daniel correctly points out, it's all Windows permission
handling (As my reproduce code also shows), not just related to network
shares... I experienced it in one at first, I guess that's why it stuck
in my brain.


Previous Comments:


[2008-03-01 09:02:02] losd at mail dot dk

Description:

If the parent directory of a Windows directory is not accessible,
you are still able to access subdirectories if given explicit
permission.

However, PHP has trouble with the first accessible directory below an
inaccessible directory. This is not a problem for the accessible dir's

subdirs, though.

Scenario:
C:/Test/NoAccess/  -- Not accessible
   Access/-- Accesible from here
  yyy.txt
  Subdir/
 xxx.txt

The problem has been found with opendir(), is_dir() and is_readable().
All directory functions are probably affected.

No workarounds has been found so far (suggestions appreciated).

Reproduce code:
---
";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
echo "";
if ($handle = opendir("C:/Test/NoAccess/Access")) {
echo "Opened directory C:/Test/NoAccess/Access";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
?>

Expected result:

Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Opened dir C:/Test/NoAccess/Access
File: .
File: ..
File: yyy.txt
File: Subdir

Actual result:
--
Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Warning: opendir(C:/Test/NoAccess/Access) [function.opendir]: failed to
open dir: No such file or directory in
C:\Inetpub\wwwroot\pm2\opendir.php on line 13
H, can't open directory, is it accessible?



[2008-03-01 01:10:46] [EMAIL PROTECTED]

I am experiencing this issue as well, but on local directories, not
network shares.  My OS is Windows XP Pro.  The opendir() functionality
works correctly in release 5.2.1.  The functionality is broken in
releases 5.2.2 through 5.2.5, plus the 526-php5.2-win32-200802292130 and
php5.3-win32-200802201330 snapshots.



[2008-01-11 13:36:50] losd at mail dot dk

Temporary workaround found, but only if there is a known subdirectory
inside the top accessible directory:

opendir("C:/Test/NoAccess/Access/Subdir/..");



[2008-01-11 12:23:54] losd at mail dot dk

Description:

If the parent directory of a Windows network share is not accessible,
you are still able to access subdirectories if given explicit
permission.

However, PHP has trouble with the first accessible directory below an
inaccessible directory. This is not a problem for the accessible dir's 
subdirs, though.

Scenario:
C:/Test/NoAccess/  -- Not accessible
   Access/-- Accesible from here
  yyy.txt
  Subdir/
 xxx.txt

The problem has been found with opendir(), is_dir() and is_readable().
All directory functions are probably affected.

No workarounds has been found so far (suggestions appreciated).

Reproduce code:
---
";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
echo "";
if ($handle = opendir("C:/Test/NoAccess/Access")) {
echo "Opened directory C:/Test/NoAccess/Access";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
?>

Expected result:

Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Opened dir C:/Test/NoAccess/Access
File: .
File: ..
File: yyy.txt
File: Subdir




Actual result:
--
Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt


Warning: opendir(C:/Test/NoAccess/Access) [function.opendir]: failed to
open dir: No such file or directory in
C:\Inetpub\wwwroot\pm2\opendir.php on line 13
H, can't open directory, is it accessible?


---

#43817 [Asn]: opendir() fails on Windows directories with parent directory unaccessible

2008-03-01 Thread losd at mail dot dk
 ID:   43817
 User updated by:  losd at mail dot dk
 Reported By:  losd at mail dot dk
 Status:   Assigned
 Bug Type: Directory function related
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 Assigned To:  dmitry
 New Comment:

Description:

If the parent directory of a Windows directory is not accessible,
you are still able to access subdirectories if given explicit
permission.

However, PHP has trouble with the first accessible directory below an
inaccessible directory. This is not a problem for the accessible dir's

subdirs, though.

Scenario:
C:/Test/NoAccess/  -- Not accessible
   Access/-- Accesible from here
  yyy.txt
  Subdir/
 xxx.txt

The problem has been found with opendir(), is_dir() and is_readable().
All directory functions are probably affected.

No workarounds has been found so far (suggestions appreciated).

Reproduce code:
---
";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
echo "";
if ($handle = opendir("C:/Test/NoAccess/Access")) {
echo "Opened directory C:/Test/NoAccess/Access";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
?>

Expected result:

Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Opened dir C:/Test/NoAccess/Access
File: .
File: ..
File: yyy.txt
File: Subdir

Actual result:
--
Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Warning: opendir(C:/Test/NoAccess/Access) [function.opendir]: failed to
open dir: No such file or directory in
C:\Inetpub\wwwroot\pm2\opendir.php on line 13
H, can't open directory, is it accessible?


Previous Comments:


[2008-03-01 01:10:46] [EMAIL PROTECTED]

I am experiencing this issue as well, but on local directories, not
network shares.  My OS is Windows XP Pro.  The opendir() functionality
works correctly in release 5.2.1.  The functionality is broken in
releases 5.2.2 through 5.2.5, plus the 526-php5.2-win32-200802292130 and
php5.3-win32-200802201330 snapshots.



[2008-01-11 13:36:50] losd at mail dot dk

Temporary workaround found, but only if there is a known subdirectory
inside the top accessible directory:

opendir("C:/Test/NoAccess/Access/Subdir/..");



[2008-01-11 12:23:54] losd at mail dot dk

Description:

If the parent directory of a Windows network share is not accessible,
you are still able to access subdirectories if given explicit
permission.

However, PHP has trouble with the first accessible directory below an
inaccessible directory. This is not a problem for the accessible dir's 
subdirs, though.

Scenario:
C:/Test/NoAccess/  -- Not accessible
   Access/-- Accesible from here
  yyy.txt
  Subdir/
 xxx.txt

The problem has been found with opendir(), is_dir() and is_readable().
All directory functions are probably affected.

No workarounds has been found so far (suggestions appreciated).

Reproduce code:
---
";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
echo "";
if ($handle = opendir("C:/Test/NoAccess/Access")) {
echo "Opened directory C:/Test/NoAccess/Access";
while (false !== ($file = readdir($handle)))
echo"File: $file";
closedir($handle);
} else {
echo "H, can't open directory, is it accessible?";
}
?>

Expected result:

Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt

Opened dir C:/Test/NoAccess/Access
File: .
File: ..
File: yyy.txt
File: Subdir




Actual result:
--
Opened dir C:/Test/NoAccess/Access/Subdir
File: .
File: ..
File: xxx.txt


Warning: opendir(C:/Test/NoAccess/Access) [function.opendir]: failed to
open dir: No such file or directory in
C:\Inetpub\wwwroot\pm2\opendir.php on line 13
H, can't open directory, is it accessible?





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


#44297 [Opn->Bgs]: XSLTProcessor::transformToXML doesn't change content-type's charset

2008-03-01 Thread chregu
 ID:   44297
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jaap dot taal at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: XSLT related
 Operating System: Windows
 PHP Version:  5.2.5
 New Comment:

It's not the XSLT extension, which sends the COntent-Type header. It's
- 
at the end - apache, so if you don't tell apache (via php), which 
content type it should use, it takes the default one.. And that is 
obviously different from what you expect :)


Previous Comments:


[2008-02-29 22:28:33] jaap dot taal at gmail dot com

Description:

When I execute the code on linux the dash (–) is shown as a dash.
This is because PHP adds a "Content-Type: text/html; charset=UTF-8"
header (used firebug to view the info).
On my windows installation, however, the header isn't modified so my
browser is displaying "–" instead of a dash.

Manually adding the header works, but it's only a workaround.

I've found a similar bugreport from two years:
http://bugs.php.net/bug.php?id=36415

Reproduce code:
---
– is a dash: "–"";
$xmldoc = new DOMDocument();
$xmldoc->loadXML($xml);
$xsl = 'http://www.w3.org/1999/XSL/Transform";
version="1.0"/>';
$xsldoc = new DOMDocument();
$xsldoc->loadXML($xsl);
$proc = new XSLTProcessor();
$proc->importStylesheet($xsldoc);
echo $proc->transformToXML($xmldoc);
?>

Expected result:

– is a dash: "–"

Actual result:
--
– is a dash: "–"





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


#44294 [Opn]: Undefined symobls upon sudo make

2008-03-01 Thread danval at gmail dot com
 ID:   44294
 User updated by:  danval at gmail dot com
-Summary:  Undefined symbols upon sudo make
 Reported By:  danval at gmail dot com
 Status:   Open
 Bug Type: Compile Warning
 Operating System: Mac 10.5 Leopard Client
 PHP Version:  5.2-latest
 New Comment:

Seems it was the way i configured libxml2? this was my setting

./configure --prefix=/Apache/local/libxml \
--enable-shared \
--with-zlib=/Apache/local/zlib

do you see how it would generate that error? is this zlib directory the
same as the one configured in php? 

I was able to use a binary version of libxml2 when i configured php to
successfully build.


Previous Comments:


[2008-03-01 04:09:28] danval at gmail dot com

returned the exact same error?? Anything else it could be? what does
that error mean?

main/internal_functions.o  -lmysqlclient -lmhash -lmcrypt -lltdl
-liconv -lpng -lz -ljpeg -lcurl -lz -lm -lxml2 -lz -liconv -lm -lcurl
-lssl -lcrypto -lldap -lz -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm
-lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm
-lxml2 -lz -liconv -lm  -o libs/libphp5.bundle && cp libs/libphp5.bundle
libs/libphp5.so
Undefined symbols:
  "_xmlTextReaderSchemaValidate", referenced from:
  _zim_xmlreader_setSchema in php_xmlreader.o
  "_xmlTextReaderSetup", referenced from:
  _zim_xmlreader_XML in php_xmlreader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
adsl-69-234-187-240:php5.2-200803010330



[2008-03-01 01:28:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-02-29 16:36:05] danval at gmail dot com

Undefined symbols spelling error



[2008-02-29 16:32:45] danval at gmail dot com

Description:

Installation warning error when compiling php 5

Reproduce code:
---
configuration used with compiled extensions

./configure \
--prefix=/Apache/php \
--with-libxml-dir=/Apache/local/libxml \
--with-zlib-dir=/Apache/local/zlib \
--with-zlib \
--with-curl=/Apache/local/curl \
--with-jpeg-dir=/Apache/local/gd \
--with-png-dir=/Apache/local/gd \
--with-gd \
--with-mcrypt=/Apache/local/mcrypt \
--with-mhash=/Apache/local/mhash \
--with-mysql=/usr/local/mysql \
--with-mysql-sock=/usr/local/mysql/run \
--with-apxs2=/Apache/bin/apxs \
--enable-soap \
--enable-sockets \
--enable-shared \
--enable-cli \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-xmlreader

Expected result:

successful sudo make

Actual result:
--
Last few lines after 'sudo make'

sapi/apache2handler/apache_config.o sapi/apache2handler/php_functions.o
main/internal_functions.o  -lmysqlclient -lmhash -lmcrypt -lltdl -liconv
-lpng -lz -ljpeg -lcurl -lz -lm -lxml2 -lz -liconv -lm -lcurl -lssl
-lcrypto -lldap -lz -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2
-lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz
-liconv -lm  -o libs/libphp5.bundle && cp libs/libphp5.bundle
libs/libphp5.so
Undefined symbols:
  "_xmlTextReaderSchemaValidate", referenced from:
  _zim_xmlreader_setSchema in php_xmlreader.o
  "_xmlTextReaderSetup", referenced from:
  _zim_xmlreader_XML in php_xmlreader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1






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