safe_mode

Apache, Lighttpd, nginx, Cherokee
Post Reply
fakespace
Posts: 48
Joined: 2003-10-17 20:33
 

safe_mode

Post by fakespace »

Hi


ich würde gerne per PHP ein Script auf meinem Server ausführen. Habs mit

Code: Select all

<?php
$output = `ls -al`;
echo "<pre>$output</pre>";
?>
versucht, allerdings kommt dann
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /home/web/test/phpexec.php on line 2
dann hab ich mir mal phpinfo() angesehen, und tatsächlich steht da, safe_mode wäre on. In der php.ini steht aber
safe_mode = Off
habs sogar nochmal ganz ans Ende der php.ini geschrieben und den Apache restartet, aber phpinfo() sagt immer noch safe_mode on ?!

Kann sich das einer erklären ?


THX
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: safe_mode

Post by Joe User »

Bitte lesen, verstehen und umsetzen: http://www.php.net/manual/en/security.index.php
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
fakespace
Posts: 48
Joined: 2003-10-17 20:33
 

Re: safe_mode

Post by fakespace »

auch wenn da von safe_mode on abgeraten wird, würde mich trotzdem interessieren warum er es nich macht
flolein
Posts: 113
Joined: 2003-12-11 14:47
 

Re: safe_mode

Post by flolein »

weil es evtl. in der httpd.conf eingeschaltet wird.
darki
Posts: 36
Joined: 2003-11-25 12:57
Location: Karlsruhe
 

Re: safe_mode

Post by darki »

weil php mit sicherlich mit

Code: Select all

--enable-safe-mode
configuriert wurde :p
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: safe_mode

Post by oxygen »

darki wrote:weil php mit sicherlich mit

Code: Select all

--enable-safe-mode
configuriert wurde :p
Nein, flolein hat schon recht, es ist wahrscheinlich, wie üblich bei confixx, in der httpd.conf bzw. confixx_vhost.conf aktiviert.
Post Reply