#41921 [NEW]: ext/curl/config.m4 does detect nss crypto usage in curl

2007-07-08 Thread dragonheart at gentoo dot org
From: dragonheart at gentoo dot org
Operating system: all
PHP version:  5CVS-2007-07-08 (CVS)
PHP Bug Type: cURL related
Bug description:  ext/curl/config.m4 does detect nss crypto usage in curl

Description:

when curl is compiled to use NSS as a crypto engine, curl fails to detect
it as a valid crypto engine.

Reproduce code:
---
configure curl with:
./configure --without-ssl --without-gnutls --with-nss

curl --version now shows:
curl 7.16.3 (x86_64-pc-linux-gnu) libcurl/7.16.3 NSS/3.11.5 zlib/1.2.3
libidn/0.6.5
Protocols: tftp ftp telnet dict http file https ftps
Features: IDN IPv6 Largefile SSL libz

php5 configure:
./configure --with-curl
checking for cURL in default path... found in /usr
checking for cURL 7.10.5 or greater... libcurl 7.16.3
checking for SSL support in libcurl... no
checking for curl_easy_perform in -lcurl... yes
checking for curl_version_info in -lcurl... yes
checking for curl_easy_strerror in -lcurl... yes
checking for curl_multi_strerror in -lcurl... yes

Expected result:

to detect the nss crypto engine and work with it
OR bombout nicely with an unsupported error.

Actual result:
--
checking for SSL support in libcurl... no

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


#41922 [NEW]: ini_get() gives ambiguous result

2007-07-08 Thread zoe at uk dot ibm dot com
From: zoe at uk dot ibm dot com
Operating system: Linux
PHP version:  5CVS-2007-07-08 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  ini_get() gives ambiguous result 

Description:

The manual states Returns the value of the configuration option as a
string on success, or an empty string on failure

Some options (eg docref_ext, disable_classes) have default values of an
empty string, in these cases ini_get() will return an empty string when the
function has failed AND when it has succeeded.

The problem is in the following code:
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
 
if (zend_hash_find(EG(ini_directives), name, name_length, (void
**) ini_entry)==SUCCESS) {
if (orig  ini_entry-modified) {
return ini_entry-orig_value;
} else {
return ini_entry-value;
}
}
 
return ;
}



Reproduce code:
---
Here is a test that will always pass even when ini_get fails.
--TEST--
ini_get returns value of the configuration option as a string on success,
empty string on failure
--FILE--
?php
var_dump(ini_get(disable_classes));
?
--EXPECT--
string(0) 





Expected result:

I would like to be able to see a failure - if ini_get() fails. For example
ini_get() could return FALSE on failure (as ini_set() does), if there are
no configuration options that have a default value of FALSE.

Actual result:
--
Always a null string.

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


#41923 [NEW]: ini_set() gives incorrect result

2007-07-08 Thread zoe at uk dot ibm dot com
From: zoe at uk dot ibm dot com
Operating system: Linux
PHP version:  5CVS-2007-07-08 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description:  ini_set() gives incorrect result

Description:

The manual states that ini_set() returns the old value on success, FALSE
on failure.

When the initial value of a configuration option is an empty string
ini_set() will give a misleading result as shown on the test case below. 

This bug is related to 41922.

The ini_set() code which causes the problem is:

old_value = zend_ini_string(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1,
0);

/* copy to return here, because alter might free it! */
if (old_value) {
RETVAL_STRING(old_value, 1);
} else {
RETVAL_FALSE;
}

So if response is NULL  we set a return code of FALSE.





Reproduce code:
---
--TEST--
Test to make sure that ini_set returns old value on success, false on
failure
--FILE--
?php
var_dump(ini_get(error_log));
var_dump(ini_set(error_log,/tmp/log));
var_dump(ini_get(error_log));
?
--EXPECT--
string(0) 
string(0) 
string(8) /tmp/log


Expected result:

See above

Actual result:
--
bool(false) -- see bug 41922
bool(false) -- implies ini_set() failure, it actually succeeds.
string(8) /tmp/log

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


#41923 [Opn-Bgs]: ini_set() gives incorrect result

2007-07-08 Thread zoe
 ID:   41923
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zoe at uk dot ibm dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5CVS-2007-07-08 (CVS)
 New Comment:

Sorry - this is nonsense - willopen another with correct description


Previous Comments:


[2007-07-08 12:09:31] zoe at uk dot ibm dot com

Description:

The manual states that ini_set() returns the old value on success,
FALSE on failure.

When the initial value of a configuration option is an empty string
ini_set() will give a misleading result as shown on the test case below.


This bug is related to 41922.

The ini_set() code which causes the problem is:

old_value = zend_ini_string(Z_STRVAL_PP(varname),
Z_STRLEN_PP(varname)+1, 0);

/* copy to return here, because alter might free it! */
if (old_value) {
RETVAL_STRING(old_value, 1);
} else {
RETVAL_FALSE;
}

So if response is NULL  we set a return code of FALSE.





Reproduce code:
---
--TEST--
Test to make sure that ini_set returns old value on success, false on
failure
--FILE--
?php
var_dump(ini_get(error_log));
var_dump(ini_set(error_log,/tmp/log));
var_dump(ini_get(error_log));
?
--EXPECT--
string(0) 
string(0) 
string(8) /tmp/log


Expected result:

See above

Actual result:
--
bool(false) -- see bug 41922
bool(false) -- implies ini_set() failure, it actually succeeds.
string(8) /tmp/log





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


#41924 [NEW]: symlink() on Windows Vista

2007-07-08 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Windows
PHP version:  5.2.3
PHP Bug Type: Filesystem function related
Bug description:  symlink() on Windows Vista

Description:

Since Windows Vista, Microsoft supports symlinks as unix does since half a
century:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/symbolic_links.asp

It would be nice if php would use this to provide symlink() on windows.


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


#41922 [Opn-WFx]: ini_get() gives ambiguous result

2007-07-08 Thread iliaa
 ID:   41922
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zoe at uk dot ibm dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5CVS-2007-07-08 (CVS)
 New Comment:

While this is a good idea, unfortunately it would introduce API break 
and likely break many apps that utilize this function. 


Previous Comments:


[2007-07-08 11:44:10] zoe at uk dot ibm dot com

Description:

The manual states Returns the value of the configuration option as a
string on success, or an empty string on failure

Some options (eg docref_ext, disable_classes) have default values of an
empty string, in these cases ini_get() will return an empty string when
the function has failed AND when it has succeeded.

The problem is in the following code:
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
 
if (zend_hash_find(EG(ini_directives), name, name_length, (void
**) ini_entry)==SUCCESS) {
if (orig  ini_entry-modified) {
return ini_entry-orig_value;
} else {
return ini_entry-value;
}
}
 
return ;
}



Reproduce code:
---
Here is a test that will always pass even when ini_get fails.
--TEST--
ini_get returns value of the configuration option as a string on
success, empty string on failure
--FILE--
?php
var_dump(ini_get(disable_classes));
?
--EXPECT--
string(0) 





Expected result:

I would like to be able to see a failure - if ini_get() fails. For
example ini_get() could return FALSE on failure (as ini_set() does), if
there are no configuration options that have a default value of FALSE.

Actual result:
--
Always a null string.





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


#41919 [Opn-Csd]: crash in string to array conversion

2007-07-08 Thread iliaa
 ID:   41919
 Updated by:   [EMAIL PROTECTED]
 Reported By:  judas dot iscariote at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: all
 PHP Version:  5CVS-2007-07-08 (CVS)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2007-07-08 03:10:25] judas dot iscariote at gmail dot com

Description:

this is a variation of bug #41813 that produces segmentation fault as
well..



Reproduce code:
---
?php

$foo=50;
$foo[3]-bar[1] = bang;

?


Expected result:

Fatal error: Cannot use string offset as an array.

Actual result:
--
Program received signal SIGSEGV, Segmentation fault.
0x0072e990 in zend_fetch_property_address
(result=0x7fffc1e290a0, container_ptr=0x0, prop_ptr=0x2b8aecc303e8,
type=1)

patch:

Index: Zend/zend_execute.c
===
RCS file: /repository/ZendEngine2/zend_execute.c,v
retrieving revision 1.716.2.12.2.21
diff -u -r1.716.2.12.2.21 zend_execute.c
--- Zend/zend_execute.c 27 Jun 2007 08:51:40 - 
1.716.2.12.2.21
+++ Zend/zend_execute.c 8 Jul 2007 03:07:33 -
@@ -1233,8 +1233,13 @@
 static void zend_fetch_property_address(temp_variable *result, zval
**container_ptr, zval *prop_ptr, int type TSRMLS_DC)
 {
zval *container;
+
+   if (!container_ptr) {
+   zend_error_noreturn(E_ERROR, Cannot use string offset
as an array);
+   }

container = *container_ptr;
+
if (container == EG(error_zval_ptr)) {
if (result) {
result-var.ptr_ptr = EG(error_zval_ptr);






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


#15373 [Com]: mail() not working, no error with invalid SMTP or email address

2007-07-08 Thread kivin_kong at hotmail dot com
 ID:   15373
 Comment by:   kivin_kong at hotmail dot com
 Reported By:  alonso at admintek dot net
 Status:   No Feedback
 Bug Type: Mail related
 Operating System: win2000
 PHP Version:  4.2.1
 Assigned To:  mfischer
 New Comment:

i have windows server 2003 R2 with IIS and php 5.2.3 and the mail()
function ain't working the i use my ISP DNS server and not workin don't
know what to do can someone help it is a recruitment form trying to send
it to my email [EMAIL PROTECTED]


Previous Comments:


[2006-10-05 05:15:04] bigredraddish at hotmail dot com

XP PRO SP2
PHP 5.1.6

This is the error

Warning: mail() [function.mail]: Failed to connect to mailserver at
localhost port 25, verify your SMTP and smtp_port setting in
php.ini or use ini_set() in D:\www\htdocs\sendmail.php on line 43


this is line 43 of my php mail script 

mail([EMAIL PROTECTED], $subject, $message, $from);

This is my PHP.INI

[mail function]
; For Win32 only.
SMTP = smtp.dodo.com.au


; For Win32 only.
sendmail_from = [EMAIL PROTECTED]



[2006-07-21 12:44:33] ishongwe at yahoo dot com

Is it possible to use the mail() function without any network
connection on windows xp, and if possible how do you do it on the
php.ini? 
Remember: Everything seem to be working fine except the mail()
function, yet.

Thanks in advance



[2005-10-01 16:26:07] morebiz at gmail dot com

Hi, 
I have problem like this too.
I try to change to windows 2003 server with php and it work. After I
install antivirus program, can not send mail.
So I just know the reason is Antivirus program !!!.
Now i new install Wins XP Apache+Php and config my antivirus program It
Work !!.
Please check your anivirus program.
Good luck.

Greeting from webmaster Thailand.



[2003-12-19 12:31:03] georgealbert2001 at yahoo dot com

i have win98 and iam using devshed ,and i download easy SMTP
to make my PC an SMTP server
i always try to send mail but i fail
could someone tell me how to cofig to send the email



[2003-11-16 18:59:02] doug32x at hotmail dot com

OS   Windows XP home Editio
Server   Apache 1.3.28
PHP  4.3.3

I tried doing this:
?PHP 
ini_set('smtp_port','25');
mail([EMAIL PROTECTED],Hi,Message)
? 

I get this: 
Warning: mail(): Failed to connect to mailserver at localhost port
25, verify your SMTP and smtp_port setting in php.ini or use
ini_set().

I tried by changin the php.ini and it does not work :(

I hope you can help me
Thanks a lot



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

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


#41926 [NEW]: Dir function unable to view shared folders

2007-07-08 Thread fskbcb at puk dot ac dot za
From: fskbcb at puk dot ac dot za
Operating system: Windows XP
PHP version:  5.2.3
PHP Bug Type: Network related
Bug description:  Dir function unable to view shared folders

Description:

I am unable to access a shared directory on another windows pc by
executing the windows dir \\remoteserver\sharedir function in php.

I have tried this using exec(),system() etc.

When I type the command dir \\remoteserver\sharedir on the windows
command line (cmd) it works fine. If I do a dir \\ownserver\sharedir of
the shares of the pc that I am working on, I am able to view them. It seems
that when php executes the command to read another pc's shares, there may
be permission problems?

Reproduce code:
---
?php
/* Please change server name and directory name to
relevant windows share */
$server_name=radio;
$server_name=radio;
$directory_name=photos;
$share=.$server_name.\\.$directory_name;

$cmd=array(
net use .$share,
dir .$share);

for ($x=0;$x  count($cmd);$x++) {

echo Command: .$cmd[$x]. br;
$result = `$cmd[$x]`;
echo The result is: br.$result. br;

}

?

Expected result:

Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK # Opens
0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is: 


Actual result:
--
Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK # Opens
0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is: 
Volume in drive \\radio\photos is Spare Volume Serial Number is 4C41-9557
Directory of \\radio\photos 05/07/2007  06:13 PMDIR  .
05/07/2007  06:13 PMDIR  ..

etc . . . . .

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


#41927 [NEW]: Dir function unable to view shared folders

2007-07-08 Thread fskbcb at puk dot ac dot za
From: fskbcb at puk dot ac dot za
Operating system: Windows XP
PHP version:  5.2.3
PHP Bug Type: Network related
Bug description:  Dir function unable to view shared folders

Description:

I am unable to access a shared directory on another windows pc by
executing the windows dir \\remoteserver\sharedir function in php.

I have tried this using exec(),system() etc.

When I type the command dir \\remoteserver\sharedir on the windows
command line (cmd) it works fine. If I do a dir \\ownserver\sharedir of
the shares of the pc that I am working on, I am able to view them. It seems
that when php executes the command to read another pc's shares, there may
be permission problems?

Reproduce code:
---
?php
/* Please change server name and directory name to
relevant windows share */
$server_name=radio;
$server_name=radio;
$directory_name=photos;
$share=.$server_name.\\.$directory_name;

$cmd=array(
net use .$share,
dir .$share);

for ($x=0;$x  count($cmd);$x++) {

echo Command: .$cmd[$x]. br;
$result = `$cmd[$x]`;
echo The result is: br.$result. br;

}

?

Expected result:

Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK # Opens
0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is: 
Volume in drive \\radio\photos is Spare Volume Serial Number is 4C41-9557
Directory of \\radio\photos 05/07/2007  06:13 PMDIR  .
05/07/2007  06:13 PMDIR  ..

etc . . . . .

Actual result:
--
Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK # Opens
0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is:

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


#41927 [Opn-Bgs]: Dir function unable to view shared folders

2007-07-08 Thread derick
 ID:   41927
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fskbcb at puk dot ac dot za
-Status:   Open
+Status:   Bogus
 Bug Type: Network related
 Operating System: Windows XP
 PHP Version:  5.2.3
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Dup of #41926.


Previous Comments:


[2007-07-08 18:45:30] fskbcb at puk dot ac dot za

Description:

I am unable to access a shared directory on another windows pc by
executing the windows dir \\remoteserver\sharedir function in php.

I have tried this using exec(),system() etc.

When I type the command dir \\remoteserver\sharedir on the windows
command line (cmd) it works fine. If I do a dir \\ownserver\sharedir
of the shares of the pc that I am working on, I am able to view them. It
seems that when php executes the command to read another pc's shares,
there may be permission problems?

Reproduce code:
---
?php
/* Please change server name and directory name to
relevant windows share */
$server_name=radio;
$server_name=radio;
$directory_name=photos;
$share=.$server_name.\\.$directory_name;

$cmd=array(
net use .$share,
dir .$share);

for ($x=0;$x  count($cmd);$x++) {

echo Command: .$cmd[$x]. br;
$result = `$cmd[$x]`;
echo The result is: br.$result. br;

}

?

Expected result:

Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK #
Opens 0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is: 
Volume in drive \\radio\photos is Spare Volume Serial Number is
4C41-9557 Directory of \\radio\photos 05/07/2007  06:13 PMDIR 
. 05/07/2007  06:13 PMDIR  ..

etc . . . . .

Actual result:
--
Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK #
Opens 0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is:





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


#41926 [Opn-Bgs]: Dir function unable to view shared folders

2007-07-08 Thread sniper
 ID:   41926
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fskbcb at puk dot ac dot za
-Status:   Open
+Status:   Bogus
 Bug Type: Network related
 Operating System: Windows XP
 PHP Version:  5.2.3
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2007-07-08 18:43:45] fskbcb at puk dot ac dot za

Description:

I am unable to access a shared directory on another windows pc by
executing the windows dir \\remoteserver\sharedir function in php.

I have tried this using exec(),system() etc.

When I type the command dir \\remoteserver\sharedir on the windows
command line (cmd) it works fine. If I do a dir \\ownserver\sharedir
of the shares of the pc that I am working on, I am able to view them. It
seems that when php executes the command to read another pc's shares,
there may be permission problems?

Reproduce code:
---
?php
/* Please change server name and directory name to
relevant windows share */
$server_name=radio;
$server_name=radio;
$directory_name=photos;
$share=.$server_name.\\.$directory_name;

$cmd=array(
net use .$share,
dir .$share);

for ($x=0;$x  count($cmd);$x++) {

echo Command: .$cmd[$x]. br;
$result = `$cmd[$x]`;
echo The result is: br.$result. br;

}

?

Expected result:

Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK #
Opens 0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is: 


Actual result:
--
Command: net use \\radio\photos
The result is:
Local name Remote name \\radio\photos Resource type Disk Status OK #
Opens 0 # Connections 1 The command completed successfully.
Command: dir \\radio\photos
The result is: 
Volume in drive \\radio\photos is Spare Volume Serial Number is
4C41-9557 Directory of \\radio\photos 05/07/2007  06:13 PMDIR 
. 05/07/2007  06:13 PMDIR  ..

etc . . . . .





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


#41928 [NEW]: La versi�n de PHP 4.4.7 con la versi�n de Apache 2.2.4 no son compatible.

2007-07-08 Thread cazapata at parquesoft dot com
From: cazapata at parquesoft dot com
Operating system: Windows
PHP version:  4.4.7
PHP Bug Type: Apache2 related
Bug description:  La versión de PHP 4.4.7 con la versión de Apache 2.2.4 no son 
compatible.

Description:

Instalé la versión 4.4.7 de PHP en mi portátil Windows XP y la versión
2.2.4 de Apache. Al tratar de arrancar apache, me salía el siguiente error:


Syntax error on line 173 of C:/srv/www/conf/httpd.conf:
Cannot load C:/php/sapi/php4apache2.dll into server: No se puede encontrar
el módulo especificado.

Después de colocar el php.ini en el directorio Windows, de copiar
php4ts.dll en el PATH del Apache, de tambien luego meterlo en el directorio
C:\php\sapi\ (incluso lo copie en el directorio windows y en el directorio
system de windows), de copiar las dll de PHP en el system32 de Windows
(incluso en el system), realice todas las combinaciones posibles moviendo
dll's, cambiando PATH, cambiando \ por /.
Concluí que tal vez hay un problema en Apache o en PHP.Apache sin soporte
de PHP funciona bien.

La documentación no especifica problemas de incompatibilidad entre estas
dos versiones. Ninguna solución que busque en Internet me solucionó el
problema.

ASi que decidí devolverme a Apache 2.0.59 y deje mi PHP 4.4.7 y me todo
funcionó menos el phpinfo.

Encontré que Apache 2.2.x y 2.0.x necesitan los módulos compilados de
manera diferente. PHP trae módulos compilados para Apache 1.x y 2.0.x, pero
se necesita de un módulo compilado para 2.2.x. PHP 5.x lo trae, pero 4.x
NO. Por eso hay un problema de compatibilidad. PHP 4.x no funciona con
Apache 2.2.x, y no se menciona en ninguna documentación.


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


#41928 [Opn-Bgs]: La versi�n de PHP 4.4.7 con la versi�n de Apache 2.2.4 no son compatible.

2007-07-08 Thread derick
 ID:   41928
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cazapata at parquesoft dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: Windows
 PHP Version:  4.4.7
 New Comment:

Our Windows binaries are not compiled against Apache 2.2, this we will
never support either.


Previous Comments:


[2007-07-08 19:23:24] cazapata at parquesoft dot com

Description:

Instalé la versión 4.4.7 de PHP en mi portátil Windows XP y la versión
2.2.4 de Apache. Al tratar de arrancar apache, me salía el siguiente
error: 

Syntax error on line 173 of C:/srv/www/conf/httpd.conf:
Cannot load C:/php/sapi/php4apache2.dll into server: No se puede
encontrar el módulo especificado.

Después de colocar el php.ini en el directorio Windows, de copiar
php4ts.dll en el PATH del Apache, de tambien luego meterlo en el
directorio C:\php\sapi\ (incluso lo copie en el directorio windows y en
el directorio system de windows), de copiar las dll de PHP en el
system32 de Windows (incluso en el system), realice todas las
combinaciones posibles moviendo dll's, cambiando PATH, cambiando \ por
/.
Concluí que tal vez hay un problema en Apache o en PHP.Apache sin
soporte de PHP funciona bien.

La documentación no especifica problemas de incompatibilidad entre
estas dos versiones. Ninguna solución que busque en Internet me
solucionó el problema.

ASi que decidí devolverme a Apache 2.0.59 y deje mi PHP 4.4.7 y me todo
funcionó menos el phpinfo.

Encontré que Apache 2.2.x y 2.0.x necesitan los módulos compilados de
manera diferente. PHP trae módulos compilados para Apache 1.x y 2.0.x,
pero se necesita de un módulo compilado para 2.2.x. PHP 5.x lo trae,
pero 4.x NO. Por eso hay un problema de compatibilidad. PHP 4.x no
funciona con Apache 2.2.x, y no se menciona en ninguna documentación.






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


#41929 [NEW]: Foreach on object does not iterate over all visible properties

2007-07-08 Thread robin at soal dot org
From: robin at soal dot org
Operating system: Windows
PHP version:  5CVS-2007-07-08 (snap)
PHP Bug Type: Scripting Engine problem
Bug description:  Foreach on object does not iterate over all visible properties

Description:

The documentation states that all visible properties will be used for the
iteration when foreach'ing over an object.
Below is a case where this is not true.

Reproduce code:
---
?php
class C {

  private $priv = A private variable;

  function doLoop() {
echo Proof that the private is visible:  . $this-priv . \n;
foreach ($this as $k=$v) {
  echo The private is visible so should be accessed in the loop:\n;
  echo - $k: $v;
}
  }
  
}

class D extends C {}

$myD = new D;
$myD-doLoop();
?

Expected result:

Proof that the private is visible: A private variable
The private is visible so should be accessed in the loop:
- priv: A private variable

Actual result:
--
Proof that the private is visible: A private variable

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


#41930 [NEW]: Error strings are trimmed in custom error handlers for catchable fatal errors

2007-07-08 Thread andrea dot barani at tin dot it
From: andrea dot barani at tin dot it
Operating system: Windows Vista (32bit)
PHP version:  5.2.3
PHP Bug Type: Unknown/Other Function
Bug description:  Error strings are trimmed in custom error handlers for 
catchable fatal errors

Description:

Error strings are trimmed out in custom error handlers for catchable fatal
errors.
This following code uses type hinting available in Php 5 to produce a
recoverable error. As you can see the last part of the error string is
missing.
This code has been tested under different conditions and paths, the string
is always trimmed after the word 'defined'.

Reproduce code:
---
?php

function handler($errno, $errstr)
{
echo $errstr;
}
set_error_handler('handler');

class Test1
{
public function __construct(Test3 $variable)
{
}
}
class Test2
{
}

$test2 = new Test2;
$test1 = new Test1($test2);

?

Expected result:

Argument 1 passed to Test1::__construct() must be an instance of Test3,
instance of Test2 given, called in D:\Web\test.php on line 20 and defined
in D:\Web\test.php on line 11

Actual result:
--
Argument 1 passed to Test1::__construct() must be an instance of Test3,
instance of Test2 given, called in D:\Web\test.php on line 20 and defined

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


#41929 [Com]: Foreach on object does not iterate over all visible properties

2007-07-08 Thread judas dot iscariote at gmail dot com
 ID:   41929
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  robin at soal dot org
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Windows
 PHP Version:  5CVS-2007-07-08 (snap)
 New Comment:

How do you understand  visibility ?

of course $priv is visible, but **in the context of class C** as you
defined it as private !!! (hint, hint)

$this in your code is(as expected) an instance of class D not of class
C ;-)

if you make $priv protected it will work as expected (hint,hint)


Previous Comments:


[2007-07-08 20:03:41] robin at soal dot org

Description:

The documentation states that all visible properties will be used for
the iteration when foreach'ing over an object.
Below is a case where this is not true.

Reproduce code:
---
?php
class C {

  private $priv = A private variable;

  function doLoop() {
echo Proof that the private is visible:  . $this-priv . \n;
foreach ($this as $k=$v) {
  echo The private is visible so should be accessed in the
loop:\n;
  echo - $k: $v;
}
  }
  
}

class D extends C {}

$myD = new D;
$myD-doLoop();
?

Expected result:

Proof that the private is visible: A private variable
The private is visible so should be accessed in the loop:
- priv: A private variable

Actual result:
--
Proof that the private is visible: A private variable





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


#41931 [NEW]: domdocument-savexml does not have formatoutput effect

2007-07-08 Thread c00lways at gmail dot com
From: c00lways at gmail dot com
Operating system: windows xp prof
PHP version:  5.2.3
PHP Bug Type: DOM XML related
Bug description:  domdocument-savexml does not have formatoutput effect

Description:

when:
domdocument-preserveWhiteSpace = false;
domdocument-formatoutput( true );
...
domdocument-savexml( domelement );

does not have formatoutput effect on savexml( domelement )

the output string is only 1 line...



Reproduce code:
---
$dom = new DomDocument(1.0, iso-8859-1);

$dom-preserveWhiteSpace = false;
$dom-formatOutput = true;

$domme = $dom-createElement( xx );



$domme-appendChild(new DOMElement(subxx));

//try to force, but still same output
$domme-preserveWhiteSpace = false;
$domme-formatOutput = true;

$dom-appendChild( $domme );


return $dom-saveXML( $domme );


Expected result:

xx
  subxx /
/xx

Actual result:
--
xxsubxx //xx

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