How to add PHP to Hiawatha server?

Under development: PCMCIA, wireless, etc.
Message
Author
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]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#51 Post by tlchost »

prit1 wrote:Here is another link for downloading the pet.
http://dotpups.de/puppy4/dotpups/Intern ... -5.2.9.pet
Feeling dense, tlchost wonders why when the pet is loaded that browsing to localhost/index.php nothing shows at all? Running the script in /etc/init.d doesn't solve the problem.

Go ahead, tell me I missed something obvious like turning on the computer...I'm here to learn.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#52 Post by 8-bit »

I got Hiawatha up and running.
As to your question, try opening a terminal and type in
'hiawatha.run start'
You should get a message saying it is already running if indeed it is.
I also found that it uses the index.php file in /root/httpd/hiawatha as default.
Also, you can just open the browser and type http:/localhost/
in the address bar and that will pick up that index.php file.
I even went so far as to dl the source for the files page on puppylinux.ca and if I name it as index.php in the above subdirectory, it loads and displays file.
Also, as another test, with the file in my /mnt/home directory, and having one of the files the page lists there, I was able to download it so to speak to my home directory.

But I should mention that to get hiawatha to start, I had to uninstall and reinstall Lamp.

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

#53 Post by prit1 »

I just tested this again and it works fine for me. Installed it fresh and browse to http://localhost to see the phpinfo page there.

What does this command show?

Code: Select all

ps aux | grep hiawatha
If Hiawatha is running, one of the lines should contain

Code: Select all

/usr/sbin/hiawatha -c /etc/hiawatha
if this line is not shown, then Hiawatha is not running. In this case try running hiawatha.run start and let us know the errors (if any) it shows.
[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]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#54 Post by tlchost »

prit1 wrote:I just tested this again and it works fine for me. Installed it fresh and browse to http://localhost to see the phpinfo page there.

What does this command show?

Code: Select all

ps aux | grep hiawatha
root 1192 0.0 0.0 1648 564 pts0 R+ 23:16 0.00 grep hiawatha
prit1 wrote: If Hiawatha is running, one of the lines should contain

Code: Select all

/usr/sbin/hiawatha -c /etc/hiawatha
if this line is not shown, then Hiawatha is not running. In this case try running hiawatha.run start and let us know the errors (if any) it shows.
command not found

I'm running Puppy from a bootable USB..could that be the problem?

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

#55 Post by prit1 »

Looks like the pet never got installed properly.

Can you try running petget from the command line and post any errors?

Code: Select all

petget LAMP-6.16-5.1.35-5.2.9.pet
Also, if a previous version of the LAMP pet was present, try removing that before installing this new one. You can backup any data you had to another directory and restore it later.
[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]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#56 Post by tlchost »

prit1 wrote: Can you try running petget from the command line and post any errors?

Code: Select all

petget LAMP-6.16-5.1.35-5.2.9.pet
/usr/sbin/petget line 1338 25725 Terminated

/usr/sbin/petget line 1417 25782 Terminated

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

#57 Post by prit1 »

Does it show any additional errors or warnings at all? This just says that petget is not working on your installation. Otherwise there would be additional information about starting mysql and hiawatha.

Did you download the latest link or from the earlier link? The earlier link had a problem and growler fixed it and I posted the corrected link. Also, do you have enough space on your USB? The pet is 11MB and will expand further when installing.
[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]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#58 Post by tlchost »

prit1 wrote:Does it show any additional errors or warnings at all? This just says that petget is not working on your installation.
Nope...that's all I got.
prit1 wrote: Did you download the latest link or from the earlier link? The earlier link had a problem and growler fixed it and I posted the corrected link. Also, do you have enough space on your USB? The pet is 11MB and will expand further when installing.
Not sure which link I used...I will have to retry them one by one.

I have 1.3 gig of space left...I believe that's enough.

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

#59 Post by prit1 »

Yeah, please try this link. Lets see if this works.
http://dotpups.de/puppy4/dotpups/Intern ... -5.2.9.pet
[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]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#60 Post by tlchost »

prit1 wrote:Yeah, please try this link. Lets see if this works.
http://dotpups.de/puppy4/dotpups/Intern ... -5.2.9.pet
Downloaded it....and to be safe, before I installed, I drove to the local Native American Cultural Center and visited with the Shaman. I asked if he could help me with Hiawatha.

Alas, he knows no more than I do...so Hiawatha still don't work, even if the ps aux results were as you stated in a previous smoke signal. I do recall him muttering something about the Apache tribe being held in high regard.

Thom

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

#61 Post by prit1 »

What are the outputs from

Code: Select all

ps aux | grep hiawatha
and

Code: Select all

hiawatha.run
[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

#62 Post by prit1 »

Thom,

What version of Puppy are you using? I tested this on 4.2.1 and 4.3 Beta and it works well. However I tested this on 4.2 SMP and it did not work. It gives a error "error redirecting stdout".
[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]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#63 Post by tlchost »

prit1 wrote: What version of Puppy are you using? I tested this on 4.2.1 and 4.3 Beta and it works well. However I tested this on 4.2 SMP and it did not work. It gives a error "error redirecting stdout".
I'm using 4.21 retro....let me try to download again....I suspect a problem here....had a similar issue with an iso. I have downloaded it to 3 locations...all the sizes are the same.

Thom

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

#64 Post by prit1 »

I just finished testing in 4.2retro and 4.21retro and it worked fine.

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#65 Post by tlchost »

prit1 wrote:I just finished testing in 4.2retro and 4.21retro and it worked fine.
Started out with a fresh puppy421retro ... hiawatha or xampp had never been installed. Installed pet file.....when I browsed to localhost, I saw the Hiawatha page....but when I browsed to localhost/index.php I see nothing. Looks like php is not running.

Thom

Post Reply