Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alternative zu PHPs system()?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
schotter
Guru
Guru


Joined: 30 Nov 2004
Posts: 497
Location: Germany, Bavaria, Bayreuth, Pottenstein, Tüchersfeld

PostPosted: Wed Mar 06, 2013 11:12 pm    Post subject: Alternative zu PHPs system()? Reply with quote

Hi,
ich habe hier eine ziemlich schwache Kiste und auf diese könnte ich schon Apache+PHP installieren, aber vielleicht gibt es ja eine mir nicht bekannte schlankere Lösung. Ich will eigentlich nur einen Befehlsaufruf samt Parametern über den Browser ausführen lassen. Zurechtgestrickt wird der Befehl im Browser.
Code:
<?php
    system($command);
?>

Weiß da wer was?
Danke,
schotter
Back to top
View user's profile Send private message
syn0ptik
Apprentice
Apprentice


Joined: 09 Jan 2013
Posts: 267

PostPosted: Thu Mar 07, 2013 12:06 am    Post subject: Reply with quote

Du kannst benutzung exec im perl.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Mar 07, 2013 9:16 am    Post subject: Reply with quote

Dir ist schon klar, dass damit jeder einfach mal jeden Befehl auf dem Server ausführen kann, initial mit den Rechten des Webservers?

Ansonsten könntest sogar ein Shell-Skript als CGI verwenden.
Back to top
View user's profile Send private message
syn0ptik
Apprentice
Apprentice


Joined: 09 Jan 2013
Posts: 267

PostPosted: Thu Mar 07, 2013 10:21 am    Post subject: Reply with quote

Also in perl du kannst mäche ./script.sh für läuft.
Back to top
View user's profile Send private message
schotter
Guru
Guru


Joined: 30 Nov 2004
Posts: 497
Location: Germany, Bavaria, Bayreuth, Pottenstein, Tüchersfeld

PostPosted: Thu Mar 07, 2013 11:51 am    Post subject: Reply with quote

py-ro wrote:
Dir ist schon klar, dass damit jeder einfach mal jeden Befehl auf dem Server ausführen kann, initial mit den Rechten des Webservers?
Ja, ist mir. Die Kiste wird aber niemals Internet sehen ;)

py-ro wrote:
Ansonsten könntest sogar ein Shell-Skript als CGI verwenden.
Das ist mir natürlich noch lieber. Perl brauche ich nicht wirklich.
Back to top
View user's profile Send private message
bell
Guru
Guru


Joined: 27 Nov 2007
Posts: 510

PostPosted: Thu Mar 07, 2013 3:01 pm    Post subject: Reply with quote

Anstatt Apache kannst Du auch zB. www-servers/lighttpd ausprobieren. Anstatt PHP würde ich das in jedem Webserver integriertes CGI /FastCGI nutzen. CGI hat auch ein system() Call.
Schaue mal in die Virtual-Ebuilds
Code:
eix virtual/httpd
rein welche Webserver in Frage kommen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum