To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Install

Install Conversation regarding installation and upgrade of PHP

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-24-2005, 01:06 AM   #1
ednark
Senior Member
 
ednark's Avatar
 
Join Date: Oct 2002
Location: DC
Posts: 846
[RESOLVED] php5 Sqlite FC4 RPM

so it turns out the php5 rpm on Fedora Core 4 does not come with Sqlite configured.
I could just recompile php5 but so far everything i've done has been rpm based and there is no php-sqlite rpm available for FC4. how do i mix in Sqlite without having to dump my pretty rpmed php/apache and just start recompiling everything from scratch? can i just compile sqlite myself as a php module and plop it in the extensions directory, if so where do i find info on doing that?
__________________
Depth First Baby!!
Code:
                     i
        think                  poem       
    that     never        as          a     
 i    shall see   a  lovely as  binary tree
ednark is offline   Reply With Quote
Old 08-24-2005, 01:36 AM   #2
thorpe
addicted
 
thorpe's Avatar
 
Join Date: Aug 2004
Location: sydney
Posts: 3,457
are you sure its not available? as far as i know its not an extension, it is part of php5.
thorpe is offline   Reply With Quote
Old 08-24-2005, 06:34 AM   #3
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
In the PHP Compile command with FC4 it uses the --without-sqlite flag. Apparently there is some bug with it not entirely sure about it or what is happening but they are working on it. I found this thread on FedoraForums http://fedoraforum.org/forum/showthr...ght=php+sqlite hopefully should help you out.
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 08-24-2005, 02:11 PM   #4
ednark
Senior Member
 
ednark's Avatar
 
Join Date: Oct 2002
Location: DC
Posts: 846
Yes the link was helpful and now i have sqlite working... here is a summary of that helpful post

------
I eventually figured out how to get this working

Fedora ships php5 compiled with "--without sqlite". I believe the php-pecl-sqlite module is not compiled for php5, there is a bug report filed and it looks like the fedora folks are only supporting php-pecl-pdo-sqlite. However i have a significant amount of code that uses PEAR DB.

Start with installing php-pecl-sqlite
Code:
$ pear download sqlite
OR
$ wget -q http://pecl.php.net/get/SQLite-1.0.3.tgz
then unpacked and began to compile it
Code:
$ tar zxvf SQLite-1.0.3.tgz
$ cd SQLite-1.0.3
$ phpize
$ ./configure
$ make
make failed here with some offset error

edit sqlite.c, comment out the following line:
Code:
/* static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; */
And then change these lines
Code:
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, arg3_force_ref)
PHP_FE(sqlite_popen, arg3_force_ref)
to:
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, third_arg_force_ref)
PHP_FE(sqlite_popen, third_arg_force_ref)
Code:
$ make
$ make install
make install plopped the .so into the correct directory without need of this
Code:
$ cp modules/sqlite.so /usr/lib/php/modules
$ /sbin/service/httpd restart
[quote]
__________________
Depth First Baby!!
Code:
                     i
        think                  poem       
    that     never        as          a     
 i    shall see   a  lovely as  binary tree
ednark is offline   Reply With Quote
Old 03-14-2006, 10:06 AM   #5
cdaniel
Junior Member
 
Join Date: Mar 2006
Posts: 1
I have trouble

Hello!!!!
i was trying your recommended but i have this problem:

When i make a select of tha database from php page, everything is ok..
but when iīm going to make a insert or a update from php page, show an error, that can't open database, but in the select, yes it can!!!!!!!!
And when i trying to do this instructions from the shell, everything right!!
I donīt understand.
I have this situation in two CPU: FC3 + SQLite 2 + Apache 2 + PHP4
and FC4 + Php 5+ Sqlite2 + Apache 2.
And I need that works with the PHP.

I hope you can help me with this trouble.
My name is Daniel and i'm from Colombia, excuse if my english its no good.




[quote=ednark]Yes the link was helpful and now i have sqlite working... here is a summary of that helpful post

------
I eventually figured out how to get this working

Fedora ships php5 compiled with "--without sqlite". I believe the php-pecl-sqlite module is not compiled for php5, there is a bug report filed and it looks like the fedora folks are only supporting php-pecl-pdo-sqlite. However i have a significant amount of code that uses PEAR DB.

Start with installing php-pecl-sqlite
Code:
$ pear download sqlite
OR
$ wget -q http://pecl.php.net/get/SQLite-1.0.3.tgz
then unpacked and began to compile it
Code:
$ tar zxvf SQLite-1.0.3.tgz
$ cd SQLite-1.0.3
$ phpize
$ ./configure
$ make
make failed here with some offset error

edit sqlite.c, comment out the following line:
Code:
/* static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; */
And then change these lines
Code:
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, arg3_force_ref)
PHP_FE(sqlite_popen, arg3_force_ref)
to:
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, third_arg_force_ref)
PHP_FE(sqlite_popen, third_arg_force_ref)
Code:
$ make
$ make install
make install plopped the .so into the correct directory without need of this
Code:
$ cp modules/sqlite.so /usr/lib/php/modules
$ /sbin/service/httpd restart
cdaniel is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:32 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.