note 82102 deleted from function.exec by danbrown
| From: | danbrown@php.net | Date: | Sun, 04 Jan 2009 16:20:16 +0000 |
| Subject: | note 82102 deleted from function.exec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148795@lists.php.net to get a copy of this message | ||
Note Submitter: Juan Rey ( email-at-juanrey-dot-net )
----
HOWTO override safe_mode issues on /cgi-bin/:
#!/bin/sh
/bin/sed -e "s/^safe_mode[ ]*=.*/safe_mode = Off/" /etc/php4/cli/php.ini>./php.ini
/bin/sed '1,4d' $0|/usr/bin/php4 --php-ini ./php.ini
exit
Content-type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Sample</title>
</head>
<body>
<?
echo exec('ls -la');
?>
</html>