Page 1 of 1

Problem mit php auf Konsole

Posted: 2004-07-24 11:55
by markusk
Hallo

Folgendes Script auf der Konsole:

Code: Select all

#!/usr/bin/php -n
<?php
system("/bin/cp ./bla ./bla2");
?>
bringt den Fehler: sh: line 1: /usr/lib/php/bin/cp: No such file or directory

Warum!? Das -n benutze ich übrigens, weil in der php.ini "system" deaktiviert wurde.

Gruß, Markus

Re: Problem mit php auf Konsole

Posted: 2004-07-24 11:58
by niklas_
Warum!?
Weil es weder eine Datei noch ein Verzeichnis gibt, das so heisst.

Re: Problem mit php auf Konsole

Posted: 2004-07-24 12:04
by markusk
Ja :) Das ist mir schon klar. Aber warum denkt "er", er muss in /usr/lib/php/bin/cp suchen? Ich habe doch /bin/cp angegeben (man beachte das "/" zu beginn)!?