How to add PHP to Hiawatha server?

Under development: PCMCIA, wireless, etc.
Message
Author
SVanguardPH2
Posts: 8
Joined: Wed 20 May 2009, 17:15
Location: GB

php query

#31 Post by SVanguardPH2 »

on a slightly different note...

I see from the original URL : LAMP vs PLHMP

that PHP was compiled with the following:

Code: Select all

./configure --prefix=/usr/local --without-pear --enable-fastcgi
--enable-ftp --with-bz2 --with-gd --with-gettext
--with-mysql=/usr/local --with-mysqli --enable-wddx --enable-mbstring
--with-mcrypt=/usr/lib
the CMS system (PHP-Fusion 6) I've ported to now run on this configuration makes a call to imagecreatefromjpeg() to upload images, create thumbnails of them etc.. I thought that function was part of the gd library?

Apart from that minor blip, I'm happy to say that porting from Windows 2003 Server running Apache, MySql and PHP to Puppy Linux 4.2 running on an eBox 2300 with 200Mhz and 128Mb RAM has been rather entertaining and enjoyable!... now if I could just get that last bit working.... :lol:

User avatar
growler
Posts: 209
Joined: Mon 24 Mar 2008, 04:42
Location: Kapiti - New Zealand

magecreatefromjpeg()

#32 Post by growler »

That's an odd one - I see there is an option in /etc/php.ini

Code: Select all

[gd]
; Tell the jpeg decode to libjpeg warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
;gd.jpeg_ignore_warning = 0
Not sure what difference it will make if you set it to 1.

The gd library definitely works since I am using the phplot scripts for graphing which requires gd. Would be interested to learn the exact message reported and see the code producing it.

SVanguardPH2
Posts: 8
Joined: Wed 20 May 2009, 17:15
Location: GB

#33 Post by SVanguardPH2 »

Apologies for the delay, have been offline for a week (a rare event to accomplish these days!)

Well, after trying numerous things, I've conceded that porting PHP-Fusion 6 from a Windows 2k3 Server to Puppy Linux is a no-go. I've found far too many errors (not just the image creation one). I thought it was the usual permissions issues, but alas it seems like the code that was written just doesn't want to run on Puppy.

So..... time to ditch PHP Fusion and install a different light weight CMS that WILL run on Puppy Linux (ditch the CMS rather than the OS - I think I'm a convert now!)

Am going to checkout ZenPhoto with the ZenPage plugin and see how that works out (most of the website that will run from PuppyLinux will just be photos anyhow).

If anyone has any other suggestions for a simple CMS that runs on Puppy, let me know!

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

pplog

#34 Post by raffy »

Barry has originally released Puppy 4 with Hiawatha server and PPLOG. See PPLOG at work in http://puppylinux.com/blog

Forum member prit1 hs ported PPLOG to PHP with PritLog:
http://hardkap.net/pritlog/
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
growler
Posts: 209
Joined: Mon 24 Mar 2008, 04:42
Location: Kapiti - New Zealand

Simple CMS with puppy

#35 Post by growler »

I've been using Joomla with no issues.

I have had silverstripe going and I understand magento can also be used but there is a trick in the configuration of hiawatha since you have to do some URL re-writing hiawatha has a URL toolkit to enable URL re-writing but I must say the syntax is beyond me the author of hiawatha has been helpful getting these going

see http://www.hiawatha-webserver.org/forum/topic/127

of course these all need PHP and mysql - using my pet

SVanguardPH2
Posts: 8
Joined: Wed 20 May 2009, 17:15
Location: GB

#36 Post by SVanguardPH2 »

I tried TinyWebGallery and interestingly it failed at the start with:

Code: Select all

Fatal error: Call to undefined function imagecreatefromjpeg() in /root/httpd/hiawatha/L13NET_CMS/inc/filefunctions.inc.php on line 1507
so my issues do seem to relate to the call to: imagecreatefromjpeg()

which was the initial issue with php-fusion and the same issue arose with ZenPhoto. After some internet searching I then found this reference: http://uk.php.net/imagecreatefromjpeg
Where it states:

Code: Select all

Note: JPEG support is only available if PHP was compiled against GD-1.8 or later.
Maybe that is the issue I've been hitting? Was PHP compiled with this version of GD?

I've checked phpinfo and it thinks that GD is enabled and v2: PHPINFO

am I missing something really obvious? Is there meant to be any extra jpeg libraries in the usr/local/lib folders? (btw - there is no php folder in this location, is that correct?)

SVanguardPH2
Posts: 8
Joined: Wed 20 May 2009, 17:15
Location: GB

#37 Post by SVanguardPH2 »

After viewing the PHPINFO I noticed:

Code: Select all

./configure --prefix=/usr/local --without-pear --enable-fastcgi --enable-ftp --with-bz2 --with-gd --with-gettext --with-mysql=/usr/local --with-mysqli --enable-wddx --enable-mbstring --with-mcrypt=/usr/lib
and then after looking further down I see:

Code: Select all

gd

GD Support	enabled
GD Version	bundled (2.0.34 compatible)
GIF Read Support	enabled
GIF Create Support	enabled
PNG Support	enabled
WBMP Support	enabled
XBM Support	enabled
I see there is no mention of JPEG support. This seems logical considering the error message I'm getting! Any ideas how to include this or is it already there but I do not have it switched on?

User avatar
growler
Posts: 209
Joined: Mon 24 Mar 2008, 04:42
Location: Kapiti - New Zealand

Latest versions with jpeg GD

#38 Post by growler »

I recompiled the latest offerings of

Hiawatha - 6.14
mysql -5.1.34
php - 5.2.9

and made a new .pet

I moved the wiki page explaining the rationale of choices made and the download link to http://www.weberp.org/PuppyLinux

Checking phpinfo() with the new .pet I get:
GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled

mulrah
Posts: 27
Joined: Thu 19 Mar 2009, 06:56

Server issues?

#39 Post by mulrah »

I am trying to download the pet from weberp.org right now, but nothing is happening. Is there another place to get this pet file?

User avatar
growler
Posts: 209
Joined: Mon 24 Mar 2008, 04:42
Location: Kapiti - New Zealand

Dowload link for LAMP

#40 Post by growler »


mulrah
Posts: 27
Joined: Thu 19 Mar 2009, 06:56

Thanks

#41 Post by mulrah »

That's the same link as I was using the other day, but it is working this time. Thanks.

User avatar
Schism
Posts: 78
Joined: Fri 12 Dec 2008, 15:50

#42 Post by Schism »

Thank you growler. I'm using this in Upup476 will there be any problems you can see?

User avatar
growler
Posts: 209
Joined: Mon 24 Mar 2008, 04:42
Location: Kapiti - New Zealand

Using with Upup

#43 Post by growler »

I've not had a play in any of the woof derivatives yet ... would be interested to learn about your experiences.

User avatar
Schism
Posts: 78
Joined: Fri 12 Dec 2008, 15:50

#44 Post by Schism »

I have made a sfs of XAMPP 1.7.1 from the XAMPP site. I changed unchecked the world write permissions of /opt/lampp/etc/my.cnf. Ran /opt/lampp/lampp security to set passwords and all works with no problem, so far.

I have been looking for free filehosting to put the sfs up.

Upup simply worked out of the box with display and wi-fi for me. No adding drivers. Every new Puppy get's better on my Compaq laptop.

SVanguardPH2
Posts: 8
Joined: Wed 20 May 2009, 17:15
Location: GB

#45 Post by SVanguardPH2 »

growler: apologies for the delay (had been working in Dallas and had no access to the hardware) just to let you know I installed your latest PET.

Everything works a treat for me now even with the original CMS system (PHPFusion).

I disabled the GUI for Puppy to get back some valuable RAM (as this eBox only has 128Mb).

Response time is still great and as an end-user I wouldn't know if the web site was running on the eBox with Puppy or a 1U server with win2k3!

superb stuff. thanks once again.

User avatar
taylor
Posts: 10
Joined: Fri 22 Feb 2008, 08:24
Location: Manjimup, Western Australia
Contact:

#46 Post by taylor »

I have not had any success with Hiawatha. I downloaded the
LAMP-6.14-5.1.34-5.2.9.pet and using the Puppy package manager
installed it to my Puppy 4.2 machine. After installation the Package
Manager informed me that the installation was missing libmcrypt.so.4
This did not sound too serious as I only want the server to check out
the perl scripts for my web site. Whatever I did to the config file I
could not persuade Hiawatha to serve any pages at all! But worse
still Puppy can no longer find my serial modem for the dial-up
internet connection.

I have now had the Puppy package manager remove Hiawatha but Puppy can
still not find my serial modem and I am faced with possibly having to
back up all my stuff and reload Puppy Linux completely from the CD
unless someone can point me to the likely source of the corruption and
suggest a fix.

Meanwhile I am posting this from my antique RISC OS machine into which
I have plugged that same invisible modem. I have been successfully
using WebJames on this old machine for years to check my web page
scripts but I feel that it is time that I made the effort to use more
modern equipment.

--
David Taylor
http://member.eezi.net.au/taylor

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#47 Post by prit1 »

I recompiled Hiawatha 6.16 (latest) and added everything else that growler had already packaged.

Hiawatha - 6.16
mysql -5.1.35
php - 5.2.9

You can get the pet from here:
http://tipsforeveryone.com/downloads/LA ... -5.2.9.pet

Here is the changelog from the Hiawatha website:
hiawatha (6.16) stable; urgency=medium

* Main configuration file httpd.conf renamed to hiawatha.conf.
* Improved error detecting and logging in php-fcgi.
* RunOnDownload option added.
* Small bugfixes and improvements.
* Bugfix: repeated PIDs in php-fcgi.pid with multiple servers.
* Bugfix: incorrect extended log format.
* Bugfix: crash on too long StartFile in .hiawatha file.
Edited The links in this post and the next one were edited as growler had found a problem and has fixed it now.
Last edited by prit1 on Sun 16 Aug 2009, 16:34, edited 2 times in total.
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#48 Post by prit1 »

Here is another link for downloading the pet.
http://dotpups.de/puppy4/dotpups/Intern ... -5.2.9.pet

(thanks to MU and growler)
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#49 Post by technosaurus »

I compiled hiawatha against dietlibc in case anyone would like to test it

I didn't add the variables for /var and /etc so they are in /opt/diet/ {var,etc}

I also came across this page which looks to be a nice small PHP alternative

http://dev.pedemont.com/libphp/

is there any reason not to use sqlite instead of mysql?
Attachments
hiawatha-6.16-i486.pet
statically compiled against dietlibc
(108.24 KiB) Downloaded 726 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#50 Post by prit1 »

Sqlite support is already present in the PHP, Hiawatha package. MySQL is another option for DB provided as it is used widely in popular apps.
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

Post Reply