¿Cómo puedo obtener el mismo resultado del comando de "seguridad" en el código PHP y en la terminal en OSX apache?

I got the bellow result in the terminal on OSX

macpro-terminal$ whoami
testuser

macpro-terminal$ groups
staff com.apple.access_screensharing everyone _appstore localaccounts _appserverusr admin _appserveradm _lpadmin _lpoperator _developer com.apple.sharepoint.group.1

macpro-terminal$ security list-keychains
"/Users/testuser/Library/Keychains/login.keychain" "/Library/Keychains/System.keychain"

macpro-terminal$ xcodebuild -project my.xcodeproj .........
......(build result)..........
Build success

but, I got the different result in PHP code on OSX apache

test.php

    $cpCommand = "whoami";
    $output = shell_exec($cpCommand);
    echo $output;

    $cpCommand = "groups";
    $output = shell_exec($cpCommand);
    echo $output;

    $cpCommand = "security list-keychains";
    $output = shell_exec($cpCommand);
    echo $output;

    $cpCommand = "xcodebuild -project my.xcodeproj ...........";
    $output = shell_exec($cpCommand);
    echo $output;

Resultado

testuser

staff com.apple.access_screensharing everyone _appstore localaccounts _appserverusr admin _appserveradm _lpadmin _lpoperator _developer com.apple.sharepoint.group.1

"/Library/Keychains/System.keychain"
"/Library/Keychains/apsd.keychain"
"/Library/Keychains/System.keychain"
(comment : /Users/testuser/Library/Keychains/login.keychain -> is not exist)

[BEROR]Code Sign error: The identity 'iPhone Distribution: testuser Co.,Ltd' doesn't match any valid, non-expired certificate/private key pair in your keychains

Build failed

I tried OS X 10.8 (mountain lion),built in apache2 & PHP.
¿Cuál es el problema?
How can I get the same result of "security" command in PHP code & in terminal on OSX apache?

Gracias por su atención.

preguntado el 28 de agosto de 12 a las 09:08

1 Respuestas

I had very similar problems but in my case it was attempting to do the build under Bamboo.

I can't tell you what you need to do in your case, but the answers in another question should point you in the right direction.

Ejecutando xcodebuild desde una terminal bifurcada

contestado el 23 de mayo de 17 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.