Compile PHP5 with newer SQLite library

software development

#1

Hi all.
While we wait for DH to offer PHP5.3 I’m wondering if one can compile it by himself BUT using a newer SQLite library version than the one bounded with PHP.

The latest SQLite version (3.6.18) includes recursive triggers support and I suppose we are going towards a 3.7 that will have enforcement of foreign keys. Sadly the time needed to PHP team to include it AND to DH to offer the new PHP version will not be short, so my question. Did anyone tried already something similar?

Btw, I’d also like to compile PHP SQLite with FTS (Full Text Search) module enabled. This would be even more useful. Anything on this too?


#2

I’m doing some 5.3.0 stuff later. I might try banging SQLite 3.6.18 into it.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

By way of warning, if you’re going to be building PHP 5.3, make sure to configure it without mysqlnd – that option is incompatible with the way we currently have our database servers configured.


#4

Roger that.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

That would be great, thanks in advance!
Updates: FTS support is directly enabled in PHP5.3.0 and the 5.3.1RC1 contains SQLite 3.6.17 so I suppose that integrating the 3.6.18 shouldn’t require much work (for who knows how to do it).


#6

The hack-job appeared to work, but whether it functions correctly or not is another thing entirely :stuck_out_tongue:

SQLite3 module version 0.7-dev SQLite Library 3.6.18Installed a CMS that uses SQLite as a basic test and it seems to work okay.

Obviously this kinda thing should only be used with learning/development in mind - PHP 5.3 itself is bundled with SQLite versions lower than the latest 5.2 so it’s likely unwise to send something running a knock-up build out into production.

I’ll PM you the shell info so you can have a play around with it and let us know if the build really was successful or not.

- edit

You have PM’s switched off here so I tried the email form at your site.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

First of all, thanks!

Sorry for PM not being enabled… I didn’t check my profile since years. Now it’s enabled (I did not receive messages thru the form, I’ll check the log now; and I’ll have to update that thing too).

Are you sure that PHP5.2.x (latest is .11) has a lower SQLite version? The one I see in 5.2.6 is 3.3.7. Or maybe you mean the SQLite2 extension? I’m mainly refering to the PDO SQLite library which is 3.3.7 in 5.2.x, 3.6.15 in 5.3.0 and 3.6.17 in the 5.3.1rc.


#8

PM sent :wink:

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#9

He did it!
I’m probably one of the first developers to use recursive triggers in SQLite from PHP :wink:

Beware when this comes out to check your SQL because if you don’t exactly know how your triggers work, you’ll have bad surprises :wink: Lucky, for all 3.6.x versions recursive triggers must be enabled before use.

Also, FTS3 (full text search for SQLite, contributed by Google) is so so so nice… but that one is available in vanilla 5.3.0 so I hope DreamHost will offer it asap to anyone.


#10

Yeah, PHP5.3.x + Xcache 1.3.x might be a nice “selectable drop-box” feature for the DreamHost VPS fellas if DreamHost wanted to test the waters. It could serve as an extra carrot for Sales to dangle in front of prospective customers, or current clients who have been contemplating a move from shared to VPS but haven’t made the jump yet.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#11

Hey, by the way, in order to get some visibility, are you, Dreamhost guys, working on it? Will we soon have PHP 5.3 available to enjoy all these new functionalities?

Thanks for your work,

Oscar


#12

We’re just customers like you so we don’t have any inside info on if/when 5.3 will become available by default. 5.3 is quite a big change from 5.2 and I think it unlikely DreamHost (or indeed many shared hosts) would be offering it by default until the big PHP companies like Zend, ionCube, et al. get their software updated to support the 5.3.x builds.

You can install 5.3 yourself if you want to test out your apps on it :slight_smile:

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#13

Sorry for the long absence. Stuff to sort out. I’ll try to compile the thing with the script you provided.

There is a good news: full foreign key support will be added to SQLite minor release 3.6.19 out later this month. This will mean that a) we can expect it on some future 5.3.x release and b. not being a release with api change (as it would be eg. a 3.7.x in the sqlite versioning system) it will be probably easly embedable into current php5.3 as you did with 3.6.18.