How to setup auto_prepend_file with safe mode and open basedir restriction
You want to setup an auto_prepend_file or auto_append_file on a shared webhosting server. It is enaugh to change setting in php.ini file usually. But it does not work under safe_mode with open basedir restriction and suexec. To run it without turning off your security settings:
- edit php.ini file : pico -w /usr/local/lib/php.ini
- set safe_mode_include_dir = /path/to/your/safe_mode_inc_dir
- add "/path/to/your/safe_mode_inc_dir" to include_path
- set auto_prepend_file = /path/to/your/safe_mode_inc_dir/your_auto_prepend.php
- restart your webserver : httpd restart
Be sure to not blocking anything with your auto_prepend_file errors or header-outputs like spaces newlines etc.
Similar entries
- Set auto_prepend_file with .htaccess on Hosteurope managed hosting
- CuteFTP or FTP Client lists just 1998 / 2000 files
- Url manipulation with mod_rewrite and php-catcher for beginners
- need help for customizing PHP-grep files search
- Get Full Url Path excluding PHP Script's name
- Search in text files recursively with PHP - Grep
- How to mount shared Folder in VirtualBox and Ubuntu Linux
- Fix Cpanel/WHM's easyapache and up2date issue (certificate verify failed)
- Filezilla and plain-text clear, unsecure password storage
- Apache Error: make_sock: could not bind to
- How to set up wildcard subdomains?
- Howto install Volatility (RAM / Memory Forensic Framework) in Windows
- .htaccess examples
- Howto protect admin.php / login.php with htaccess password
- Server Crash - "isc_socket_create: fcntl/reserved: Too many open files" [Howto Fix]
- Do I need suexec, suphp, php-suhosin, mod_security same time?
- How can I disable Firefox Pop-up blocker for local html files?
- Redirect webpages with HTML, PHP, .htaccess, Java+Script, CGI-Perl, ASP.NET and ColdFusion
- Import big SQL Files under WAMP or LAMP ?
- XP like "Show Desktop Icon" for Windows7

Post new comment