Newbie to Mongoose - Can't get mongoose to serve PHP pages

1,278 views
Skip to first unread message

Srivathsan Madhavan

unread,
Jan 28, 2013, 3:38:11 AM1/28/13
to mongoos...@googlegroups.com
Hi,
 
I am a rank newbie to Mongoose.  It's simplicity has attracted me towards it.  But unfortunately, I couldn't get it running with PHP on my 64-bit Ubuntu 12.10.  The following are details of what I did:
  1. Downloaded Mongoose 3.6 src (the latest I believe) and compiled it successfully
  2. Installed 'php5-cli' and 'php5-cgi' from the (standard) Ubuntu repos.  PHP was successfully installed and 'php' and 'php-cgi' were available in '/usr/bin' (also in my $PATH).  Didn't do any changes to php.ini or whatever (could this be a problem?)
  3. Created the 'phpinfo.php' file with the contents "<?php phpinfo(); ?>
  4. Copied the Mongoose executable to the same directory where 'phpinfo.php' resides
  5. Started Mongoose from the cmd-line (bash shell) by just issuing the command "mongoose" - web-server successfully started listening to port 8080
  6. From the Firefox browser (v18.0.1) I tried navigating to http://localhost:8080/phpinfo.php
  7. Didn't get any output at all
  8. Created a barebones "index.html" in the same directory and I am able to view that successfully thru http://localhost:8080
Where did go wrong?
 
Let me also state me objective - I want to run the latest WordPress (v3.6) as my personal blogging tool for which Mongoose seems to help perfectly
 
Thanks in advance, for all the help that might pour in.
 
rgds,
Vatsan

Srivathsan Madhavan

unread,
Jan 28, 2013, 3:43:15 AM1/28/13
to mongoos...@googlegroups.com
Addendum: I tested the installed php5-cli and php5-cgi with the commands "php -i" and "php-cgi -i".  Both gave the expected output (phpinfo txt and html respectively).
 
Thanks and rgds,
Vatsan

Sergey Lyubka

unread,
Jan 28, 2013, 6:03:41 AM1/28/13
to mongoos...@googlegroups.com
Try:

mongoose -I /full/path/to/php-cgi -r /full/path/to/web_root

On Mon, Jan 28, 2013 at 8:43 AM, Srivathsan Madhavan <m.sriv...@gmail.com> wrote:
output


Vatsan

unread,
Jan 31, 2013, 1:43:11 AM1/31/13
to mongoos...@googlegroups.com
Hi Sergey,

Sorry for the delay in reverting back - got swamped in my office chores.

While I couldn't test in my Ubuntu box, I could simulate the problem (I reported earlier) on Windows itself and your suggestion fixed it!  I am sure that this will work in Ubuntu as well but let me confirm that later.

Also, I compiled the 3.6 src under WinXPSp3 / cygwin (latest) and got the webserver running fine.

Many thanks for the fix!

"Simplicity is the ultimate form of Sophistication" - Da Vinci.  I am a strong believer of that quote.  I am already evangelizing Mongoose to our internal R&D Team.

rgds,
Vatsan


--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To post to this group, send email to mongoos...@googlegroups.com.
To unsubscribe from this group, send email to mongoose-user...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongoose-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sergey Lyubka

unread,
Jan 31, 2013, 4:44:05 AM1/31/13
to mongoos...@googlegroups.com
You're welcome, Vatsan

To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-user...@googlegroups.com.
To post to this group, send email to mongoos...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages