Hi Guys,

I have access to mini linux PCs that can serve up webpages using the Boa webserver. They also house an sqlite db file.

What I want to do is install the bare-bones of php with only sqlite and PDO functionality, so I can write to and display data from the databases on board with a php page (I already have the code working on a full version of php/apache on my full size machine, with a sqlite .db file copied across from the mini PC).

I guess it is not as simple as commenting everything out of php.ini that I don't need and deleting all the coresponding .dll files to reduce the size?? (it didn't seem to work when I tried it)

All the documentation I can find on the Boa webserver also suggests running php in cgi-mode, which again I've followed a few tutorials on without success.

Ideas/links/tutorials/hints/tips/tricks etc would be most welcome at this point!

Thanks in advance

7 Years
Discussion Span
Last Post by benk1

Well you should be able to delete entire sections of your php.ini file and delete the extensions you don't want from the php.ini and from the file system but remember to keep the dependencies. That is some dll's rely on others. The dependencies documentation can be found at php.net. Also when changing the php.ini file remember to change the right php.ini file which can be found with the php_info(); function.


Thanks for the reply.

I've now managed to lay my hands on a working build; what it consists of is a php file (no extension) in the cgi-bin, and an html file containing:

<TITLE>A test web page</TITLE>
If you are seeing this page,  then your web server is working,  and now
you need to create some nice pages to replace this one.
PHP demo page <a href="/cgi-bin/php/index.php">/cgi-bin/php/index.php</a>

PHP Socket Test page <a href="/cgi-bin/php/ipv4loop.phpt">/cgi-bin/php/ipv4loop.phpt</a>


The index.php link brings up the phpinfo() no problem.

I Just need to replicate this with the sqlite support....

So I've been researching online and trying to build my own php binary by compiling the source code.

When I try the following:

./configure --enable-ftp --host=arm-linux --without-pear --disable-simplexml --disable-mbregex --enable-sockets --disable-libxml --disable-all --oldincludedir=/usr/local/arm-linux/include --with-zlib-dir=/usr/local/arm-linux/lib --enable-pdo=shared --with-sqlite=shared --with-pdo-sqlite=shared --with-zlib-dir

I get:

configure: error: Cannot find libz

I then spent a fruitless couple of hours trying to install zlib, but it was coming up with: "No rule to make Target 'libz.so', needed by 'install-libz'. Stop.

So I moved on (experimenting as I'm not too sure what those lines do anyway) with:

./configure --enable-ftp --host=arm-linux --without-pear --disable-simplexml --disable-mbregex --enable-sockets --disable-libxml --disable-all  --enable-pdo=shared --with-sqlite=shared --with-pdo-sqlite=shared

But then I get:

You've configured extension pdo_sqlite to build statically, but it depends on extension pdo, which you've configured to build shared.

So I finally tried:

./configure --enable-ftp --host=arm-linux --without-pear --disable-simplexml --disable-mbregex --enable-sockets --disable-libxml --disable-all  --enable-pdo=shared --with-sqlite=shared --enable-pdo-sqlite=shared

It builds it all, but then gives:

Notice: Following unknown configure options were used:


I'm not even entirely sure on what to do with the output files to test them - As you can see I'm somewhat out of my depth!

Any tips, or suggestions for reading materials would be good


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.