Board index   FAQ   Search  
Register  Login
Board index PHP PHP Installation

Php 5 + Sqlite On Redhat9, Need help with SQLite support in

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

Php 5 + Sqlite On Redhat9, Need help with SQLite support in

Postby wkuk74 » Wed Sep 22, 2004 3:28 pm

I have installed apache 2 and php 5 with the sqlite support (--with-sqlite).
However when i try to execute sqlite_open ("database_name") or new SQLiteDatabase("database_name") from the php page i get the following errors:

"Database could not be opened" or "database is encrypted or not found".

The phpinfo(); works just fine but it seems like i can't get or call any sqlite commands.
Can anyone help me getting php 5 with SQLite to work on Redhat 9.
I have also tried installing SQLite from a source and specifying the library during php build (--with-sqlite=/usr/local/sqlite3/lib) to no avail. I don't use php.ini as i understand is not needed.
Any help is appreciated.
Thank you,
Wesley
wkuk74
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Sep 22, 2004 3:20 pm

Postby swirlee » Thu Sep 23, 2004 5:55 am

PHP needs to have write permission to the directory where you're putting your database file (so that it can create the database file).

Also, for security purposes, make sure that your SQLite database file is either above your document root (i.e. not under htdocs/ or public_html/) or it's behind htaccess password protection so that it cannot be accessed by malicious users.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Thanks

Postby wkuk74 » Thu Sep 23, 2004 6:41 am

Great, it worked.
I can't believe i spent 2 days installing php thinking i had no sqlite support.
wkuk74
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Sep 22, 2004 3:20 pm


Return to PHP Installation

Who is online

Users browsing this forum: No registered users and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.