Trouble with apache config on Fedora
Page 2 of 2

Author:  killboy [ Wed Jan 27, 2010 7:39 am ]
Post subject:  [Solved] Re: Trouble with apache config on Fedora

Well.... after 3 days of trial and error I managed to get the xplico interface functioning...

php-pdo in Fedora does not include support for sqlite v2 databases, only v3. Sqlite v2 support is included in php5+ but on Fedora php is compiled '--without-sqlite'. Instead of recompiling the whole of php I have just added the sqlite module as per the long-winded instructions below:

Download php-sqlite-1.0.2-3.rf.src.rpm from Dag Wiers

Install it

cd ~/rpmbuild/SOURCES
extract SQLite-1.0.2.tgz
cd SQLite-1.0.2

Instructions below borrowed from: http://www.phpbuilder.com/board/showthr ... t=10307306
Edit sqlite.c, comment out the following line:

/* static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; */

And then change these lines:
function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, arg3_force_ref)
PHP_FE(sqlite_popen, arg3_force_ref)

function_entry sqlite_functions[] = {
PHP_FE(sqlite_open, third_arg_force_ref)
PHP_FE(sqlite_popen, third_arg_force_ref)

cd ~/rpmbuild/SOURCES
tar czvf SQLite-1.0.2.tgz SQLite-1.0.2

Edit ~/rpmbuild/SPECS/php-sqlite.spec
%{__install} -Dp -m0755 sqlite.so %{buildroot}%{libdir}/php4/sqlite.so

%{__install} -Dp -m0755 sqlite.so %{buildroot}%{libdir}/php/sqlite.so



rpmbuild -ba SPECS/php-sqlite.spec

Install the resulting binary rpm

# add sqlite extension to php
cat << EOF > /etc/php.d/sqlite.ini

In any event, once the new xplico version comes out with a sqlite3 format db this will no longer be required.

I have packaged up (rpm) xplico with GeoIP and pcl included if anyone is interested, but due to this messy situation I'll wait for the next xplico version before making it available.

Thanks for all your assistance, looking forward to 0.5.5



Author:  carlos.gacimartin [ Wed Jan 27, 2010 11:54 am ]
Post subject:  Re: Trouble with apache config on Fedora

Ok, thank you, we will look forward you when 0.5.5 is finished.
Thanks again.

Author:  killboy [ Wed Jan 27, 2010 11:50 pm ]
Post subject:  Re: Trouble with apache config on Fedora

Update: If anyone is attempting to follow the procedure in my last post, it doesn't work on Fed 12, I had to download php source rpm, modify and rebuild to generate the php-sqlite rpm

<edit>moved to suggestions</edit>


Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group