mod_rewrite & open_basedir & pear

From: Date: Tue, 28 May 2002 06:50:13 +0000
Subject: mod_rewrite & open_basedir & pear
Groups: php.general 
Request: Send a blank email to php-general+get-99442@lists.php.net to get a copy of this message
Hi Can anyone please help me with a following problem. There's a script which uses PEAR library (namely, DB class) <? $dbhost=... $dblogin=... $dbpassword=... $dbname=... require_once("DB.php"); $dsn = "mysql://$dblogin:$dbpassword@$dbhost/$dbname"; $db = DB::connect($dsn, true); if (DB::isError($db)) die ("*** ".$db->getMessage()); var_dump($db); ?> When i execute it everything is ok. BUT when i access this script via redirect by mod_rewrite it throws an error that open_basedir settings don't allow this require to be made .htaccess: RewriteEngine on RewriteRule test2.php /~xaxa/test/test3.php [L] test2.php,test3.php contain the code that i quoted above error: Warning: open_basedir restriction in effect. File is in wrong directory in /home/xaxa/public_html/test/test3.php on line 4 Fatal error: Failed opening required 'DB.php' (include_path='.:/usr/local/lib/php') in /home/xaxa/public_html/test/test/test3.php on line 4 Is there any way to overcome this problem? mod_rewrite is used to _hide_ urls from users and to _extend_ url with additional params. Alexei

« previous php.general (#99442) next »