Forum

Page downloads instead of opening

Greener
28 February 2016, 14:53
Hi everyone, am new to web design, just installed Hiawatha for testing on windows 8.1.
I can not run the command to install / start Hiawatha as a windows service, I get the message
unknown command in relation to cgwin, which it does not say to install before installing Hiawatha,
even so I got a successfull install according to the default page that one gets at 127.0.0.1
So, do I need cigwin installed?,
Secondly, instead of opening my phpinfo page which i put in the main_site directory, this file
downloads, why did this happen. I have easyphp installed, and just edited the file PHP5-FastCGI as follows
@ECHO ON
"C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php
\php5617x160221000538\php-cgi.exe" -b localhost:2005
IF ERRORLEVEL 1 PAUSE

Is the above entry ok, it seems to be working as I no longer get the errors I first got when I left a space in the path,
yet I can not say for surie as I can not get phpinfo to output in the browser, the file just downloads instead.
I have been using apache and it works fine, just want to set up a VPS with Hiawata as am told it is faster, and secure.
One last note, is it ok to keep doing what I am doing in relation to starting Hiawatha, I just click on the bat file and it starts,
and I did the same for phpfastcgi and it seemed to start too, atleast no errors bounced up.
Any help would be much appreciated
Thank you kindly
Hugo Leisink
29 February 2016, 08:47
Cygwin is not required to run the Windows version of Hiawatha. I don't know EasyPHP. I always the version from www.php.net, which works fine.
Greener
29 February 2016, 16:09
After some experimenting I had to remove Hiawatha, there is always trouble with windows file permissions, I went form starting Hiawatha without errors, to starting it with can not write to the access logs files I created, which were all working before, the logs in question were the new ones that would have facilitated the virtual hosts which I also failed to create, I followed the instructions given from various places on the web, but all I got was not found.
This command also threw up errors regarding cigwin, cygrunsrv.exe -I hiawatha -d "Hiawatha webserver" -f "Secure and advanced webserver" -p "<HIAWATHA_INSTALL_DIR>\program\hiawatha.exe" -a "-d"
I will try Hiawatha later when I find a copy of centOS to install on my windows laptop.
Some of the documentation is also hard to follow, for instance its not clear whether NSTALL_DIR in the config file should be left as is or
whether one needs to replace it with the complete path to the folders and files one needs to point to, this, AccessLogfile = INSTALL_DIR\logfiles\access.log , or for example, C:\Program Files (x86)\Hiawatha\MyNewSite\logfiles\access.log which seems to be
the format used in most examples on the web.
I being new to web design also don't understand how to enable php in the main config file, I uncommented all of the below but not sure if this was all that is required to get php running,
I altered this code from PHP5-FastCGI,
@ECHO OFF
"C:\Program Files\PHP5\php-cgi.exe" -b localhost:2005
IF ERRORLEVEL 1 PAUSE to reflect my php installation
I of course started php by double clicking the bat file.
I also uncommented all the block below in the main config file and updated the paths to my php installation.

#CGIhandler = C:\Program Files\PHP5\php-cgi.exe:php
#CGIhandler = C:\Program Files\PHP5\php-cgi.exe:php
#CGIhandler = INSTALL_DIR\program\ssi-cgi.exe:shtml
#CGIextension = exe
#
#FastCGIserver {
# FastCGIid = PHP5
# ConnectTo = 127.0.0.1:2005
# Extension = php
#}

I uncommented all the above but do not know if this was right or wrong, as I see a lot of paths to php installation, and to fast cgi, are they all needed or do I chose either fastcgi or these entries, #CGIhandler = C:\Program Files\PHP5\php-cgi.exe:php
I also do not know why the php page with phpinfo() downloaded instead of opening to show me that it was installed and working, I placed it in the default_site folder beside the index.html file.

Can anyone put me straight on what I require to ensure php is running, such as what exactly needs uncommented, and where Hiawatha
expects for find script pages, such as php ones, and how to create virtual hosts, I followed the instructions from the Hiawatha docs but to no avail, for a beginner like me I find it difficult to understand how the examples give the likes of naming a virtual host name, www.mysite.com, will actually work on a localhost for testing, sure if I type this in a browser its not going to look in localhost at all, this should be explained, for example, how on earth does one navigate to this host to open it up on 127.0.0.1 or localhost, what would one type in the browser.

Any help would be much appreciated, thank you kindly

Hugo Leisink
1 March 2016, 18:52
How to enable PHP support is all explained in the HOWTO page.
This topic has been closed.