I've successfully recompiled PHP with some additional features enabled and have a question about security. I wrote a small php script to ensure that PHP was being restricted to a specfic webroot for any given site.
I created this simple php script
Using something like "www.mydomain.com/test.php?arg=/bin/ls /usr/local/src" I can see the directory listing. However, when I run this script using the php binary that came with LiteSpeed I don't see the directory listing, why???
Restrained is enabled.
Here are the options I compiled PHP with using the LiteSpeed SAPI.
I created this simple php script
Code:
<? system($arg); ?>
Restrained is enabled.
Here are the options I compiled PHP with using the LiteSpeed SAPI.
Code:
--enable-force-cgi-redirect --enable-pic --enable-gd-native-ttf --disable-rpath --enable-inline-optimization --enable-bcmath --enable-exif --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-discard-path --enable-ftp --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --enable-calendar --with-db4 --with-curl --with-png-dir=/usr --with-freetype-dir=/usr --with-openssl=/usr/local/ssl --with-gd --with-ttf --with-gdbm --with-gettext --with-ncurses --with-gmp --with-iconv --with-png --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --without-oci8 --with-imap --with-imap-ssl=/usr/local/ssl --with-mysql=/usr --with-kerberos --with-jpeg-dir=/usr --with-pear --enable-shmop --enable-track-vars --enable-sysvsem --enable-sysvshm --with-litespeed