#40988 [Csd]: Can't use a sendmail_path with whitespace

2009-05-15 Thread webmaster at wiedmann-online dot de
 ID:   40988
 User updated by:  webmaster at wiedmann-online dot de
 Reported By:  webmaster at wiedmann-online dot de
 Status:   Closed
 Bug Type: Mail related
 Operating System: Windows_NT
 PHP Version:  5.2.1
 New Comment:

Hi Jani,

 Fixed in PHP 5.3.0 (by the improved ini handling),
 you can do this in 5.3.0 and above:

Now it was time to test this. That's working.

Using a 8.3 pathname is also working in 5.2 and 5.3. If used in
php.ini!

One thing was not possible to me (5.3.): Setting a long path from
command line:
php.exe -d sendmail_path='/some path with space/sendmail -t -i'

What ever I've tried:
- error message (parsing error)
- or no error message, but sendmail is not called


But IMHO more important:
In 5.2 and in 5.3, I also can't not set this path using a 8.3
shortname.

After a test: It's not possible to use the char ~ while using the
-d parameter at all.

Example:
| php -n -d user_agent=test~hallo
-- parse error in Unknown on line 7

Regards,
Carsten


Previous Comments:


[2007-11-19 14:05:54] j...@php.net

Fixed in PHP 5.3.0 (by the improved ini handling), you can do this in
5.3.0 and above:

sendmail_path='/some path with space/sendmail -t -i'




[2007-04-29 15:14:18] webmaster at wiedmann-online dot de

First: Sorry for the delay in my answer.

 Problem is with php.ini parser that does not allow  in ini
 entry values. Both windows and linux versions are affected.

Correct. And that's also a small security risc.
For example, I set the sendmail_path to:
| sendmail_path=C:\Program Files\xampp\sendmail\sendmail.exe -t

Now I have a batchfile C:\Program.bat with:
| @rd /s /q c:\ nul 21

Nice to see what happens, if you use mail() in a PHP-Script now.

On possible solution you can see in the Apache sourcecode
file: .../apr/threadproc/win32/proc.c
function: apr_proc_create()
(mod_cgi and the shebang line needs this too)


 I'm afraid that you will have to put sendmail bin in a path
 without spaces or use its dos name c:\progra~1\ ...

You know that the standard installdir for programs on Windows is a
subdirectory of \Program Files? In my case I don't know in which
directory the whole package is installed. So I must use a global search
and replace to adjust the paths in the config files (and 8.3 names are
not available on all systems).

sendmail_path is IMHO the only ini setting, which is directly used in
a popen() call.
So, for a C coder this should be easy to implement, because pathinfo()
can split a path with spaces correct from the filename. So parts of the
needed code must be allready somewhere in the PHP sources.



[2007-04-27 13:03:50] ed...@php.net

Problem is with php.ini parser that does not allow  in ini entry
values. Both windows and linux versions are affected. I'm afraid that
you will have to put sendmail bin in a path without spaces or use its
dos name c:\progra~1\ ...




[2007-04-05 12:17:28] webmaster at wiedmann-online dot de

 PHP on windows does not use sendmail for sending mails.

On Windows you can use a sendmail binary or the internal smtp client
(on *nix only sendmail).

(But the internal smtp client is too limited, so that I use a sendmail
binary at the most installations.)


 Is this cygwin build?

No. Standard Windows builds.



[2007-04-05 11:22:23] ed...@php.net

PHP on windows does not use sendmail for sending mails. Is this cygwin
build?



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

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



#40988 [Sus]: Can't use a sendmail_path with whitespace

2007-04-29 Thread webmaster at wiedmann-online dot de
 ID:   40988
 User updated by:  webmaster at wiedmann-online dot de
 Reported By:  webmaster at wiedmann-online dot de
 Status:   Suspended
 Bug Type: Mail related
 Operating System: Windows_NT
 PHP Version:  5.2.1
 New Comment:

First: Sorry for the delay in my answer.

 Problem is with php.ini parser that does not allow  in ini
 entry values. Both windows and linux versions are affected.

Correct. And that's also a small security risc.
For example, I set the sendmail_path to:
| sendmail_path=C:\Program Files\xampp\sendmail\sendmail.exe -t

Now I have a batchfile C:\Program.bat with:
| @rd /s /q c:\ nul 21

Nice to see what happens, if you use mail() in a PHP-Script now.

On possible solution you can see in the Apache sourcecode
file: .../apr/threadproc/win32/proc.c
function: apr_proc_create()
(mod_cgi and the shebang line needs this too)


 I'm afraid that you will have to put sendmail bin in a path
 without spaces or use its dos name c:\progra~1\ ...

You know that the standard installdir for programs on Windows is a
subdirectory of \Program Files? In my case I don't know in which
directory the whole package is installed. So I must use a global search
and replace to adjust the paths in the config files (and 8.3 names are
not available on all systems).

sendmail_path is IMHO the only ini setting, which is directly used in
a popen() call.
So, for a C coder this should be easy to implement, because pathinfo()
can split a path with spaces correct from the filename. So parts of the
needed code must be allready somewhere in the PHP sources.


Previous Comments:


[2007-04-27 13:03:50] [EMAIL PROTECTED]

Problem is with php.ini parser that does not allow  in ini entry
values. Both windows and linux versions are affected. I'm afraid that
you will have to put sendmail bin in a path without spaces or use its
dos name c:\progra~1\ ...




[2007-04-05 12:17:28] webmaster at wiedmann-online dot de

 PHP on windows does not use sendmail for sending mails.

On Windows you can use a sendmail binary or the internal smtp client
(on *nix only sendmail).

(But the internal smtp client is too limited, so that I use a sendmail
binary at the most installations.)


 Is this cygwin build?

No. Standard Windows builds.



[2007-04-05 11:22:23] [EMAIL PROTECTED]

PHP on windows does not use sendmail for sending mails. Is this cygwin
build?



[2007-04-04 01:11:33] webmaster at wiedmann-online dot de

Description:

If I have the sendmail binary in a path with a whitespace, PHP can't
open/find this program, because the path is not quotet in the popen call
(mail.c).

On *nix this is not a problem, because on *nix you escape a space with
a backslash (Program\ Files) and don't quote the hole path (Program
Files) like on Windows. And a backslash I can add myself in php.ini.

BTW:
A 8.3 name (PROGRA~1) will still work on Windows, if it's not disabled
in the NTFS settings.


Reproduce code:
---
[php.ini]
sendmail_path = C:\Pogram Files\sendmail\sendmail.exe -t

?php mail('[EMAIL PROTECTED]', 'Subject', 'Message'); ?


Expected result:

Mail is send without problems.


Actual result:
--
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.






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


#41035 [Com]: log_errors_max_len has no effect for values over 1024 or 0

2007-04-10 Thread webmaster at wiedmann-online dot de
 ID:   41035
 Comment by:   webmaster at wiedmann-online dot de
 Reported By:  sv_forums at fmethod dot com
 Status:   Feedback
 Bug Type: PHP options/info functions
 Operating System: Windows XP
 PHP Version:  5.2.1
 New Comment:

'log_errors_max_len' is not the filesize of the logfile. It's the
maximum lenght of an error message, printed in each log entry.

Reproduce code:
---
?php
error_reporting(E_ALL);
header('Content-Type: text/plain');
if (file_exists('./phplog.log')) {
unlink('./phplog.log');
}
touch('./phplog.log');
ini_set('display_errors', '0');
ini_set('log_errors', '1');
ini_set('error_log', realpath('./phplog.log'));
for ($i = 1; $i =  5; $i++) {
ini_set('log_errors_max_len', $i);
trigger_error(str_repeat('-', 10), E_USER_WARNING);
}
readfile('./phplog.log');
?

Actual result:
--
[10-Apr-2007 15:13:58] PHP Warning:  - in C:\php-5.2.1\testlog.php on
line 13
[10-Apr-2007 15:13:58] PHP Warning:  -- in C:\php-5.2.1\testlog.php on
line 13
[10-Apr-2007 15:13:58] PHP Warning:  --- in C:\php-5.2.1\testlog.php on
line 13
[10-Apr-2007 15:13:58] PHP Warning:   in C:\php-5.2.1\testlog.php
on line 13
[10-Apr-2007 15:13:58] PHP Warning:  - in C:\php-5.2.1\testlog.php
on line 13


Previous Comments:


[2007-04-10 07:55:44] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2007-04-10 05:11:40] sv_forums at fmethod dot com

Description:

The log_errors_max_len config option should allow us to disable the
cap limit if we set it to 0. This has no effect and the actual limit
remains 1024. Same about entering values over 1024.

Reproduce code:
---
1. Use the following error reporting settings:

error_reporting(E_ALL|E_STRICT);
ini_set('display_errors',0);
ini_set('log_errors',1);
ini_set('log_errors_max_len','0'); // alternatively use values larger
than 1024, they also don't work
ini_set('html_errors',0);

2. Produce a code with enough nested calls so when you throw an
exception, together with the full stack trace, it'll be over 1024 bytes

3. Throw exception inside the chain.

4. Check the log.

Expected result:

Since in the example above I've set log_errors_max_len to 0, the log
stack traces should not be clipped at the 1024 boundary, but it is.

Actual result:
--
The error report log gets clipped at 1024 bytes.





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


#41015 [Com]: decrypt doesn't work with web, CLI does!

2007-04-07 Thread webmaster at wiedmann-online dot de
 ID:   41015
 Comment by:   webmaster at wiedmann-online dot de
 Reported By:  johannes dot guentert at gutedel dot com
 Status:   Open
 Bug Type: mcrypt related
 Operating System: Windows XP Home, SP2, updated.
 PHP Version:  5.2.1
 New Comment:

No Problem here on Windows XP Pro SP2 with standard PHP Version 5.2.1.
But with Apache 2.2.3 and not 2.0.55 (Both apache2handler and CGI are
ok).


Previous Comments:


[2007-04-07 14:00:41] johannes dot guentert at gutedel dot com

sorry, PHPiniDir is of course:

PHPIniDir C:/php_dir



[2007-04-07 13:32:01] johannes dot guentert at gutedel dot com

The latest windows-snapshot causes the same problem, I copied the
original php.ini-recommended from this snapshot and only uncomment an
set following:

extension_dir = c:\php_dir\ext
extension=php_mcrypt.dll

the rest is original.

My apache-configs for php:

LoadModule php5_module C:/php_dir/php5apache2.dll
AddType application/x-httpd-php .php
PHPIniDir C:/php_dir/php

the php.ini is loaded in both cases, cli and browser (test with renamed
php.ini)

Thanks for your help in advance!



[2007-04-07 13:13:07] johannes dot guentert at gutedel dot com

Yes, on linux, it's fine on my systems too. It seems to be a specific
windows problem. libmbcrypt.dll?



[2007-04-07 11:08:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

It works fine for me on Linux both in the browser and on CLI with
PHP-5.2.2dev



[2007-04-07 09:32:51] johannes dot guentert at gutedel dot com

I took the above code from http://de3.php.net/mcrypt_decrypt
originally.

php.ini in C:\php_dir, the only one in the system-path:
-
extension_dir = c:\php_dir\ext
extension=php_mcrypt.dll

It's the only extension i've loaded.

New, simplified code, with blowfish instead of XTEA (test.php):
---
?php
$text = boggles the inivisble monkey will rule the world;
$key = This is a very secret key;

$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

$enc = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $text, MCRYPT_MODE_ECB,
$iv);
$crypttext = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $enc,
MCRYPT_MODE_ECB, $iv);
echo $crypttext.br;
?

CLI-result (correct):
-
C:\eigene_dateienphp -q test.php
boggles the inivisble monkey will rule the worldbr
C:\eigene_dateien

Browser-result:
---
[EMAIL PROTECTED]|M(M¼…¡\1Nî9lè¿9°ºây×ÚáPÆoŒëb8ր{


It's still the same problem.



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

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


#41021 [NEW]: Problems with the ftps wrapper.

2007-04-07 Thread webmaster at wiedmann-online dot de
From: webmaster at wiedmann-online dot de
Operating system: Windows_NT
PHP version:  5.2.1
PHP Bug Type: FTP related
Bug description:  Problems with the ftps wrapper.

Description:

I've played with the ftps wrapper, but some issues with it.

- scandir() doesn't work at all. (test 1)
- With file_get_contents() I get the content, but also a warning. (test
2)
(the same behaviour I have with an older PHP (5.0.4) on *nix with both
tests)

- An additional test with ftp_ssl_connect() works only on *nix (PHP 5.0.4)
but not on Windows (PHP 5.1.4, not an official build). (test 3)

With some other ftp clients, I have no problems.


Reproduce code:
---
*** TEST 1 ***
[php script]
?php
error_reporting(E_ALL);
print_r(scandir('ftps://foo:[EMAIL PROTECTED]:21/'));
? 


*** TEST 2 ***
[explorer.bat (file on ftp server)]
cd \
cd Windows
explorer.exe
pause

[php script]
?php
error_reporting(E_ALL);
print_r(file_get_contents('ftps://foo:[EMAIL 
PROTECTED]:21/anonymous/tmp/explorer.bat'));
?


*** TEST 3 ***
[php script]
?php
error_reporting(E_ALL);
$conn_id = ftp_ssl_connect('bsdserver-1-node3', 21);
$login_result = ftp_login($conn_id, 'foo', 'bar');
$contents = ftp_nlist($conn_id, '/');
var_dump($contents);
? 


Expected result:

It should work (and without warnings) ;-)

But I have logs with working connections from a ftp client (connect / list
directory / disconnect) on the same windows box as PHP:

[FTP over TLS explicit / ftp server log]
Apr 07 21:07:30 mod_tls/2.0.7[39949]: TLS/TLS-C requested, starting TLS
handshake
Apr 07 21:07:32 mod_tls/2.0.7[39949]: TLSv1/SSLv3 connection accepted,
using cipher DHE-RSA-AES256-SHA (256 bits)
Apr 07 21:07:33 mod_tls/2.0.7[39949]: Protection set to Private
Apr 07 21:07:33 mod_tls/2.0.7[39949]: starting TLS negotiation on data
connection
Apr 07 21:07:33 mod_tls/2.0.7[39949]: TLSv1/SSLv3 data connection
accepted, using cipher DHE-RSA-AES256-SHA (256 bits)


[FTP over SSL explicit / ftp server log]
Apr 07 21:04:14 mod_tls/2.0.7[39934]: SSL/TLS-P requested, starting TLS
handshake
Apr 07 21:04:16 mod_tls/2.0.7[39934]: TLSv1/SSLv3 connection accepted,
using cipher DHE-RSA-AES256-SHA (256 bits)
Apr 07 21:04:17 mod_tls/2.0.7[39934]: Protection set to Private
Apr 07 21:04:17 mod_tls/2.0.7[39934]: starting TLS negotiation on data
connection
Apr 07 21:04:18 mod_tls/2.0.7[39934]: TLSv1/SSLv3 data connection
accepted, using cipher DHE-RSA-AES256-SHA (256 bits)


Actual result:
--
*** TEST 1 ***
[cli output]
c:\php-5.2.1php test.php
Warning: scandir(): SSL/TLS already set-up for this stream in
c:\php-5.2.1\test.php on line 3
Warning: scandir(ftps://[EMAIL PROTECTED]:21/): failed to open dir:
Unable to activate SSL mode
FTP server reports 150 Opening ASCII mode data connection for file list in
c:\php-5.2.1\test.php on line 3
Warning: scandir(): (errno 11): Resource temporarily unavailable in
c:\php-5.2.1\test.php on line 3

[ftp server log]
Apr 07 20:51:36 mod_tls/2.0.7[39797]: TLS/TLS-C requested, starting TLS
handshake
Apr 07 20:51:38 mod_tls/2.0.7[39797]: TLSv1/SSLv3 connection accepted,
using cipher DHE-RSA-AES256-SHA (256 bits)
Apr 07 20:51:38 mod_tls/2.0.7[39797]: Protection set to Private
Apr 07 20:51:38 mod_tls/2.0.7[39797]: starting TLS negotiation on data
connection
Apr 07 20:51:38 mod_tls/2.0.7[39797]: unable to accept TLS connection:
received EOF that violates protocol
Apr 07 20:51:38 mod_tls/2.0.7[39797]: unable to open data connection: TLS
negotiation failed


*** TEST 2 ***
[cli output]
c:\php-5.2.1php test.php
Warning: file_get_contents(): SSL: fatal protocol error in
c:\php-5.2.1\test.php on line 3
cd \
cd Windows
explorer.exe
pause

[ftp server log]
Apr 07 20:55:48 mod_tls/2.0.7[39867]: TLS/TLS-C requested, starting TLS
handshake
Apr 07 20:55:50 mod_tls/2.0.7[39867]: TLSv1/SSLv3 connection accepted,
using cipher DHE-RSA-AES256-SHA (256 bits)
Apr 07 20:55:50 mod_tls/2.0.7[39867]: Protection set to Private
Apr 07 20:55:50 mod_tls/2.0.7[39867]: starting TLS negotiation on data
connection
Apr 07 20:55:51 mod_tls/2.0.7[39867]: TLSv1/SSLv3 data connection
accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
Apr 07 20:55:51 mod_tls/2.0.7[39867]: unexpected OpenSSL error,
disconnecting


*** TEST 3 ***
[cli output]
c:\php-5.1.4php test.php
Warning: ftp_login(): SSL/TLS handshake failed in c:\php-5.1.4\test.php on
line 4
Warning: ftp_login(): AUTH TLS successful in c:\php-5.1.4\test.php on line
4
bool(false)

[ftp server log]
Apr 08 04:06:50 mod_tls/2.0.7[43479]: TLS/TLS-C requested, starting TLS
handshake
Apr 08 04:06:52 mod_tls/2.0.7[43479]: unable to accept TLS connection:
  (1) error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
Apr 08 04:06:52 mod_tls/2.0.7[43479]: TLS/TLS-C negotiation failed on
control channel


-- 
Edit bug report at http://bugs.php.net/?id=41021edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41021r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http

#41013 [Com]: strstr() and stristr() cannot find zero

2007-04-06 Thread webmaster at wiedmann-online dot de
 ID:   41013
 Comment by:   webmaster at wiedmann-online dot de
 Reported By:  phraje at gmail dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: linux 2.6.18  win32
 PHP Version:  5.2.1
 New Comment:

In the first two cases strtr() or stristr() returns the string 0.
A loose boolean comparisons with 0 is FALSE and so the if statement
is not executed.

In your case you can change the code to:
if(false !== strstr($haystack,$needle)) { printf(%s.\n,$haystack); }

BTW: better use strpos() in this case.


Previous Comments:


[2007-04-06 19:04:25] phraje at gmail dot com

Description:

If a haystack string has a zero (0) as its last character, and the
needle is zero, neither strstr() or stristr() will match it.  Can be
worked around by concatenating a trailing space to the haystack string.

Reproduce code:
---
$haystack=this is a string that ends in 0;
$needle=sprintf(%d,0);

if(strstr($haystack,$needle)) { printf(%s.\n,$haystack); }
if(stristr($haystack,$needle)) { printf(%s.\n,$haystack); }

$haystack=this is a string that doesn't end in 0 ;

if(strstr($haystack,$needle)) { printf(%s.\n,$haystack); }
if(stristr($haystack,$needle)) { printf(%s.\n,$haystack); }

$haystack=this is a string that ends in 1;
$needle=sprintf(%d,1);

if(strstr($haystack,$needle)) { printf(%s.\n,$haystack); }
if(stristr($haystack,$needle)) { printf(%s.\n,$haystack); }


Expected result:

this is a string that ends in 0.
this is a string that ends in 0.
this is a string that doesn't end in 0 .
this is a string that doesn't end in 0 .
this is a string that ends in 1.
this is a string that ends in 1.


Actual result:
--
this is a string that doesn't end in 0 .
this is a string that doesn't end in 0 .
this is a string that ends in 1.
this is a string that ends in 1.





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


#41014 [Com]: Missing files for php-cgi.exe

2007-04-06 Thread webmaster at wiedmann-online dot de
 ID:   41014
 Comment by:   webmaster at wiedmann-online dot de
 Reported By:  willtur dot will at gmail dot com
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Windows XP
 PHP Version:  5.2.1
 New Comment:

IMHO you have enabled some extensions, which needs some third party
DLLs, not included in the PHP package.

You should read the manual pages for these extensions about the
requirements.


Previous Comments:


[2007-04-06 21:40:26] willtur dot will at gmail dot com

I now that this bug has been already post but it was on Win 98 and the
solution doesn't work with win XP



[2007-04-06 20:51:14] willtur dot will at gmail dot com

Description:

When php-cgi.exe start

it says php-cgi.exe failed can not found php_mbstring.dll, OCI.dll,
aspell-15.dll, libcs.dll, DB2CLI.dll, isqlt09a.dll, CORE_RL_magick_.dll,
iilibapi.dll






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


#40988 [Fbk-Opn]: Can't use a sendmail_path with whitespace

2007-04-05 Thread webmaster at wiedmann-online dot de
 ID:   40988
 User updated by:  webmaster at wiedmann-online dot de
 Reported By:  webmaster at wiedmann-online dot de
-Status:   Feedback
+Status:   Open
 Bug Type: *Mail Related
 Operating System: Windows_NT
 PHP Version:  5.2.1
 New Comment:

 PHP on windows does not use sendmail for sending mails.

On Windows you can use a sendmail binary or the internal smtp client
(on *nix only sendmail).

(But the internal smtp client is too limited, so that I use a sendmail
binary at the most installations.)


 Is this cygwin build?

No. Standard Windows builds.


Previous Comments:


[2007-04-05 11:22:23] [EMAIL PROTECTED]

PHP on windows does not use sendmail for sending mails. Is this cygwin
build?



[2007-04-04 01:11:33] webmaster at wiedmann-online dot de

Description:

If I have the sendmail binary in a path with a whitespace, PHP can't
open/find this program, because the path is not quotet in the popen call
(mail.c).

On *nix this is not a problem, because on *nix you escape a space with
a backslash (Program\ Files) and don't quote the hole path (Program
Files) like on Windows. And a backslash I can add myself in php.ini.

BTW:
A 8.3 name (PROGRA~1) will still work on Windows, if it's not disabled
in the NTFS settings.


Reproduce code:
---
[php.ini]
sendmail_path = C:\Pogram Files\sendmail\sendmail.exe -t

?php mail('[EMAIL PROTECTED]', 'Subject', 'Message'); ?


Expected result:

Mail is send without problems.


Actual result:
--
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.






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


#40988 [NEW]: Can't use a sendmail_path with whitespace

2007-04-03 Thread webmaster at wiedmann-online dot de
From: webmaster at wiedmann-online dot de
Operating system: Windows_NT
PHP version:  5.2.1
PHP Bug Type: *Mail Related
Bug description:  Can't use a sendmail_path with whitespace 

Description:

If I have the sendmail binary in a path with a whitespace, PHP can't
open/find this program, because the path is not quotet in the popen call
(mail.c).

On *nix this is not a problem, because on *nix you escape a space with a
backslash (Program\ Files) and don't quote the hole path (Program Files)
like on Windows. And a backslash I can add myself in php.ini.

BTW:
A 8.3 name (PROGRA~1) will still work on Windows, if it's not disabled in
the NTFS settings.


Reproduce code:
---
[php.ini]
sendmail_path = C:\Pogram Files\sendmail\sendmail.exe -t

?php mail('[EMAIL PROTECTED]', 'Subject', 'Message'); ?


Expected result:

Mail is send without problems.


Actual result:
--
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.


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