Forum

Opening PHP file from another machine

Igor
28 November 2014, 01:07
Hello,

when opening a .php file from another machine (running Windows + Mozilla Firefox) via IP_address/ or IP_address/index.php I get error 500.

When opening a .html file, it works.


Opening on localhost works both for .php and .html.


Error.log is empty, access.log shows only "allow" messages.

Hiawatha version: LHMP-8.0-5.3.4-5.3.10
Operating System: Slacko 5.7 (puppy linux)
Hugo Leisink
28 November 2014, 12:33
Could it be that the 500 error is generated by the PHP script? Try a simple one which only prints 'hello world'.
Igor
28 November 2014, 21:44
Hello Hugo, thank you for your response. I read you are the creator of Hiawatha, I like the name Hiawatha very much, great idea cant get it out of my head all day, puts a smile on my face I had an inflating boat Hiawatha when I was a kid

It could be PHP, i thought just because it works on localhost, it should work from remote host. Im new at web server administering, so when I get time I will check more, but...

I have some weird situations. When I installed Slacko, Hiawatha was installed and it was reading /etc/hiawatha/hiawatha.conf, but when I installed LHMP it said hiawatha.conf is missing but it was there, I lost a lot of time when I noticed with hiawatha -k command that it is reading /etc folder, not /etc/hiawatha.

So now Im not sure abbout other settings, for example its not /usr/bin/php-cgi but /usr/sbin/php-fcgi...looks like Im gonna start from scratch again and install everything seperately
Hugo Leisink
28 November 2014, 22:02
I have no idea what you are doing, but I hope it will all work well. If you have any specific questions, let me know.

About the php binary, it still is /usr/bin/php-cgi. The /usr/sbin/php-fcgi binary is a deprecated tool provided by older Hiawatha releases to run PHP in FastCGI mode. You should use php-fpm instead.
Igor
30 November 2014, 09:25
Now it works!

I installed linux again, started from begining.

Hiawatha was there, operational, reading /etc/hiawatha/hiawatha.conf.

Then I installed PHP from menu / setup / puppy package manager (it also needs libmcrypt, net-snmp, t1lib packages).

Into hiawatha.conf I only added
CGIhandler = /usr/bin/php-cgi:php
StartFile = index.php
and Interface = ip_address under Binding {}

Simple as it should be.

Problem is in LHMP, do not install it, if someone also complains, allways first ask if LHMP is installed!!!

Hiawatha in that package is reading from /etc, not /etc/hiawatha, so you should copy hiawatha.conf in /etc but who knows what else is corrupted. PHP files are nowhere to be found, not in /usr/bin/php nor anywhere on disk drive. When I install PHP only from link under this text, I can see that it is installed in puppy package manager, but there are again no PHP files on disk.

problematic LHMP is LHMP-8.0-5.3.4-5.3.10
problematic PHP only: http://www.murga-linux.com/puppy/viewtopic.php?t=95479&sid=0880a4da6a56ab3c809d6d466171167e


So to conclude, best option is to use allready installed Hiawatha, and to add PHP as a puppy package manager packet. Then add those 2-3 lines of code to /etc/hiawatha/hiawatha.conf
Hugo Leisink
30 November 2014, 19:45
Can you please report this issue to the Puppy LHMP package maintainer?
Igor
1 December 2014, 22:41
OK, but it doesnt seem to be an issue, just a regular thing because some people are saying "so I changed /etc/hiawatha.conf...".

I dont know who is maintaining LHMP, but I added a comment which is waiting for aproval at: http://www.distrogeeks.com/install-lhmp-server-puppy-slacko/

I also made a post at: http://www.murga-linux.com/puppy/viewtopic.php?p=812034#812034

If you need me, Im at igor79@gmail.com because of the way this forum works, without registration or notifications.
This topic has been closed.