Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/08/2009, 07:05
Avatar de gjx2
gjx2
 
Fecha de Ingreso: agosto-2008
Ubicación: R.D
Mensajes: 1.153
Antigüedad: 15 años, 8 meses
Puntos: 139
Respuesta: Problema con la copia de seguridad

El error de 127 puede ser un problema con la ruta.

yo sugiero que estes seguro de dos puntos.

1- Que cuentas con permisos para ejecutar mysqldump.
2- Que la ruta que le estas pasando sea la correcta.

Encontre estas recomendaciones en
http://www.php.net/manual/fr/function.passthru.php


Cita:
If you have chrooted apache and php, you will also want to put /bin/sh into the chrooted environment. Otherwise, the exec() or passthru() will not function properly, and will produce error code 127, file not found.
Cita:
I had an issue when i used exec

I think we were echoing information on the test.php script.
for eg: when we tried

exec(php test.php,$array,$error);

the return was 127 and the code was failing.

checking the note on this page gave us a hint to use passthru instead.
The only thing to note is that you need to provide the fuull path.

now our command became

passthru(/bin/php /pathtotest/test.php,$array,$error);

this works.

yipeee!!!!!

Cita:
Zak Estrada
14-Dec-2004 11:21
Remember to use the full path (IE '/usr/local/bin/foo' instead of 'foo') when using passthru, otherwise you'll get an exit code of 127 (command not found).

Remember, you'll also get this error if your file does not have executable permission.
Espero que te sirvan.