Re: Can't open SQLite DB... but only when using mod_php??
| From: | Chris | Date: | Thu, 04 Oct 2007 00:53:45 +0000 |
| Subject: | Re: Can't open SQLite DB... but only when using mod_php?? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44126@lists.php.net to get a copy of this message | ||
Markus Wolff wrote:
Chris schrieb:Some hosts check for and disable access to files that have wide-open permissions - usually when php is running as a cgi but I've seen it when using mod_php too. If you try something other than 777 what happens? (644 just to see if you can open it, then work on writing to it). Can you see the file from this script? $file = dirname(__FILE__) . '/frontend.db'; echo is_file($file) . '<br?>'; -- Postgresql & php tutorials http://www.designmagick.com/Hey Chris, mmh wonder what could possibly be wrong when even trying 777? :-)It can't be file permissions, I've even tried to set the database file to 777... no change at all.My guess is still permissions. If you try a raw fopen instead of using pdo, what happens? <?php error_reporting(E_ALL); ini_set('display_errors', true); $fp = fopen(dirname(__FILE__).'/frontend.db', 'r'); if ($fp) { echo "Opened db<br/>\n"; } else { echo "Unable to open db<br/>\n"; } fclose($fp); ?>