php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54297 different outputs of the same script
Submitted: 2011-03-17 15:58 UTC Modified: 2015-01-18 04:22 UTC
From: valentiny510 at yahoo dot es Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5.3.5 OS: win xp sp 2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: valentiny510 at yahoo dot es
New email:
PHP Version: OS:

 

 [2011-03-17 15:58 UTC] valentiny510 at yahoo dot es
Description:
------------
I'm not sure it's really a bug but did not find any explanation or on the web or php page.. here I go ..

I run the same script with different slashes and got 2 results

Test script:
---------------
$output = `C:\\WINDOWS\\system32\\cmd.exe /?`;
echo "<pre>$output</pre>";
...............................
$output = `C:/WINDOWS/system32/cmd.exe /?`;
echo "<pre>$output</pre>";


Expected result:
----------------
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] cadena]

/C      Ejecuta el comando especificado en cadena y luego finaliza
/K      Ejecuta el comando especificado en cadena pero sigue activo
/S      Modifica el tratamiento de cadena despu�s de /C o /K (consultar
        m�s abajo)
/Q      Deshabilita el eco
/D      Deshabilita le ejecuci�n de los comandos de AutoRun del registro 
        (consultar m�s abajo)
...........................................ETC

Actual result:
--------------
1 example return:

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] cadena]

/C      Ejecuta el comando especificado en cadena y luego finaliza
/K      Ejecuta el comando especificado en cadena pero sigue activo
/S      Modifica el tratamiento de cadena despu�s de /C o /K (consultar
        m�s abajo)
/Q      Deshabilita el eco
/D      Deshabilita le ejecuci�n de los comandos de AutoRun del registro 
        (consultar m�s abajo)
...............................

2 example return this:

MKDIR [unidad:]ruta
MD [unidad:]ruta

Si las extensiones de comandos est�n habilitadas, MKDIR cambia as�:

MKDIR crea cualquier directorio intermedio de la ruta de acceso siempre 
que sea necesario. Por ejemplo, si \a no existe:

    mkdir \a\b\c\d

es lo mismo que:

    mkdir \a
    chdir \a
    mkdir b
    chdir b
    mkdir c
    chdir c
    mkdir d


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-18 12:45 UTC] carsten_sttgt at gmx dot de
That's just a curios behavior of "cmd.exe" if it's executed with forward slashs (just try it in the shell).
 [2015-01-10 21:01 UTC] danack@php.net
-Status: Open +Status: Feedback
 [2015-01-10 21:01 UTC] danack@php.net
Hi valentiny510,

Did you try Carsten's suggestion of just trying it in the shell? It doesn't sound like it's an issue with PHP.
 [2015-01-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC