OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: pmf on September 30, 2004, 07:37:04 am

Title: Apache2, PHP
Post by: pmf on September 30, 2004, 07:37:04 am
I have finally managed to compile Apache 2.0.52 and PHP 5.0.2, allowing you to use your Zaurus as a mobile web-development system.

I expected it to be somewhat bloated or slow, but it turned out to run very fast and smooth.

Apache2: apache2_0.52_armv5tel.ipk (http://pmf.neominds.net/feed/apache2_0.52_armv5tel.ipk)
PHP: php_5.0.2_armv5tel.ipk (http://pmf.neominds.net/feed/php_5.0.2_armv5tel.ipk)

Or simply from the pdaXrom-unstable feed. Note that the package name is apache2, not apache.

All modules, including mod_ssh and mod_dav, are functional, so you can configure your Z as a SSL-secured WebDAV-server.

The PHP-distribution includes support for SQLite (http://php.net/sqlite). I could compile in MySQL support, but I don't like MySQL, so this will have to wait until someone tells me one single reason why he needs MySQL-support (Hint: "But everyone uses MySQL!" does not count as valid reason. SQLite is faster, smaller and needs no setup or administration. Over short or long, ISPs and hosting companies will switch options for standard customers to use SQLite instead of wasting resources and administration time on MySQL; trust me on this.)

The default DocumentRoot is /opt/apache2/htdocs/.

If you want to setup a specific wwwrun-user for the webserver process (per default it runs as user nobody), do a
Code: [Select]
adduser wwwrun and change the the User and Group-directives in the httpd.conf-file to
Code: [Select]
User wwwrun
Group wwwrun
. If you want anything more than serving static pages, you need to do this.

Start and stop with apachectl start / stop. The apachectl-script is in /usr/bin, so it should be in your PATH-envvar. Everything else is in /opt/apache2/.

Comments are welcome.
Title: Apache2, PHP
Post by: Randolph_Carter on October 04, 2004, 06:34:43 pm
Hi. I just installed your ports on my Zaurus, and it works very smooth.
However, I'd be grateful if you could turn on mbstring when compiling.
#I have to use them, since I'm Japanese.

Thanks in advance.
Title: Apache2, PHP
Post by: henrysviper on October 05, 2004, 06:34:06 am
Hello

While I agree that SQlite is generally a better option, some of us are forced to use Mysql for development. So could you please compile mysql support?
Thank you.
Title: Apache2, PHP
Post by: raychow on October 05, 2004, 10:06:08 am
I know MySQL is not the best but in fact its the most popular in the -nix world.  I purchased xcart it supports MySQL only.  I have no choice.
Title: Apache2, PHP
Post by: iamasmith on October 12, 2004, 11:59:28 am
Are these applications suitable for RC5 yet ?
Title: Apache2, PHP
Post by: offroadgeek on November 02, 2004, 03:34:09 pm
Quote
Are these applications suitable for RC5 yet ?
yes, it works beautifully with rc5 on my 760!  yippee!!!

though, I would also request mysql to be compiled... too many things support only mysql (mediawiki for example)
Title: Apache2, PHP
Post by: offroadgeek on November 05, 2004, 12:32:04 am
Quote
I could compile in MySQL support, but I don't like MySQL, so this will have to wait until someone tells me one single reason why he needs MySQL-support (Hint: "But everyone uses MySQL!" does not count as valid reason. SQLite is faster, smaller and needs no setup or administration. Over short or long, ISPs and hosting companies will switch options for standard customers to use SQLite instead of wasting resources and administration time on MySQL; trust me on this.)
are you going to compile mysql into php, or are you going make someone else do this?

it seems silly to me that just because you don't like mysql that you would leave it out for others to recompile...
Title: Apache2, PHP
Post by: pmf on November 06, 2004, 01:54:19 pm
Multibyte strings (as requested), GD and MySQL support (traditional and via MySQLi) is there.

You will have to install the mysql-client (required) and mysql-server (optional) packages.

All in the unstable feed.
Title: Apache2, PHP
Post by: shula on November 08, 2004, 07:05:30 pm
i got a fatal error on running the php5 w apache2.

(the apache2 run well by itself and the apache1 & php4 runs perfect, but i need the sqlite extension!)

first it wanted libxml2.so.2   so i installed libxml2-2.4.16.ipk
the i ran apachctl start

the error is:
syntax error in httpds conf [...]
cannot load /[...]/libphp5.so [...]
undefined symbol: xmlSchemaFreeValidCtxt


cacko 1.21b, sl-c860.

(i tried to replace expat ... it just yielded a different missing function.)

any ideas?
Title: Apache2, PHP
Post by: pmf on November 09, 2004, 12:57:49 pm
Quote
i got a fatal error on running the php5 w apache2.

(the apache2 run well by itself and the apache1 & php4 runs perfect, but i need the sqlite extension!)

first it wanted libxml2.so.2   so i installed libxml2-2.4.16.ipk
the i ran apachctl start

the error is:
syntax error in httpds conf [...]
cannot load /[...]/libphp5.so [...]
undefined symbol: xmlSchemaFreeValidCtxt


cacko 1.21b, sl-c860.

(i tried to replace expat ... it just yielded a different missing function.)

any ideas?
I compiled it with the toolchain for pdaXrom, so I don't know how much compatibility with Cacko ROM is possible.

The version of libxml I use is 2.6.13; you could try using it (I could not attach it here; mail me at the contact-address-field of the package in the unstable feed). To avoid conflicts with your installed libxml, I'd suggest putting it into /opt/apache2/lib/ and doing
Code: [Select]
ln -s libxml2.so.2.6.13 libxml2.so.2
ln -s libxml2.so.2 libxml2.so
export LD_LIBRARY_PATH=/opt/apache2/lib/:$LD_LIBRARY_PATH

This should solve the issue with this specific unresolved symbol.

But again, with a ROM other than pdaXrom I cannot really help very much, since I don't have or need a development-environment for Cacko ROM.
Title: Apache2, PHP
Post by: offroadgeek on November 09, 2004, 01:46:44 pm
Quote
i got a fatal error on running the php5 w apache2.

(the apache2 run well by itself and the apache1 & php4 runs perfect, but i need the sqlite extension!)

first it wanted libxml2.so.2   so i installed libxml2-2.4.16.ipk
the i ran apachctl start

the error is:
syntax error in httpds conf [...]
cannot load /[...]/libphp5.so [...]
undefined symbol: xmlSchemaFreeValidCtxt


cacko 1.21b, sl-c860.

(i tried to replace expat ... it just yielded a different missing function.)

any ideas?
when I had the cacko rom flashed on my 760, I used this package.. it's apache 1 with php 4...  it worked fine for me

http://www.zaurususergroup.com/feed/apache...2.3_0.1_arm.ipk (http://www.zaurususergroup.com/feed/apache-1.3.27-php-4.2.3_0.1_arm.ipk)
Title: Apache2, PHP
Post by: shula on December 03, 2004, 07:40:10 am
thanks,
but it doesn't have the SQLITE extension,
not built in, nor precompiled anywhere.

i was looking for PHP+sqlite+apache combination for the Z
(i think of it as a gui toolkit for cross platform development)
Title: Apache2, PHP
Post by: pmf on December 03, 2004, 08:23:16 am
Quote
but it doesn't have the SQLITE extension,
not built in, nor precompiled anywhere.
SQLite is built into libphp5.so.

Why do you think it is not? What packages do you have installed? apache2 and php?
Title: Apache2, PHP
Post by: raychow on December 26, 2004, 08:24:28 am
How can I install lamp under /usr?  /opt is read-only on sl-c3000.
Title: Apache2, PHP
Post by: pmf on December 26, 2004, 09:19:25 am
Quote
How can I install lamp under /usr?  /opt is read-only on sl-c3000.
2 alternatives:

1. remount /opt with read-write access

2. unmount /opt, see if it's a link or a directory. If it's a directory, you can install the software there. If it's a link, remove the link and create an /opt directory instead. You can then create softlinks to the things you previously had in /opt (if any).