Leser: 1
|< 1 2 >| | 18 Einträge, 2 Seiten |
Strat+2007-11-03 18:18:50--gibt es bei exec die moeglichkeit, fehler abzufangen/abzufragen? wenn ja, dann tu das mal.
renee+2007-11-03 21:55:54--Gibt das Perlskript vielleicht was auf STDERR aus und nicht auf STDOUT?
MisterL+2007-11-04 12:06:14--PHP - pretty hard to program :-))
Warum schreibt das Perl Skript seinen Output nicht in eine Datei/Datenbank und das PHP Skript liest diese Daten dann auf diese Weise aus ?
Gruss MisterL
Strat+2007-11-04 12:23:26--helfen dir vielleicht die kommentare auf exec weiter?
GwenDragon+2007-11-04 13:19:50--
renee+2007-11-04 12:39:33--Das hier funktioniert bei mir:[html]<html>
<body>
<h2>Test</h2>
<?php
exec( "perl test.cgi", $ausgabe );
print_r( $ausgabe );
?>
</body>
</html>[/html]
statt print_r( $ausgabe ); kannst Du auch
[php]
$string = implode( "\n", $ausgabe );
echo $string;[/php]
machen. Dann bekommst Du keinen "Dump", sondern die Ausgabe als String...
1
2
3
4
5
exec("/usr/bin/perl /www/123/cgi-bin/verzeichnis/the_script.pl", $output, $err);
if (is_array($output)) {
print_r($output);
exit(0);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir =
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions =
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
open_basedir =
GwenDragon+2007-11-04 16:52:33--Könnte am safe_mode von PHP liegen.
Beim safe_mode erlaubt PHP exec & Co. nur in einem bestimmten Verzeichnis und/oder bestimmte Funktionen können abgeschaltet werden.
|< 1 2 >| | 18 Einträge, 2 Seiten |