PHP :(

27 views
Skip to first unread message

tenable

unread,
Jan 25, 2010, 10:37:09 PM1/25/10
to nanoc
So, I had to resort to using PHP for a contact form, which is cool I
suppose, but the auto-compiler doesn't seem to like files with a php
extension. So, now if I want to work on that page locally, I have to
temporarily comment out the corresponding routing rule. Is there a
better way?

Guido

unread,
Jan 26, 2010, 7:50:29 AM1/26/10
to na...@googlegroups.com

How does your routing like like?

Did you read
http://projects.stoneship.org/trac/nanoc/wiki/Tips/CreatingDynamicPages
?

Guido

tenable

unread,
Jan 26, 2010, 9:40:12 AM1/26/10
to nanoc
> How does your routing like like?
>
> Did you readhttp://projects.stoneship.org/trac/nanoc/wiki/Tips/CreatingDynamicPages
> ?

Thanks for the link. I didn't see that, but my route is the same. Even
still, the auto-compiler gives a File not found. When I type in the
full page, for example, localhost:3000/page/index.php the file gets
downloaded, not displayed.

Brian Bowling

unread,
Jan 26, 2010, 9:48:26 AM1/26/10
to na...@googlegroups.com
In order to process the actual php file you will need to deploy your
site to a server that is configured to support php. I am speculating,
but I doubt that the web server provided by nanoc via the aco command
has php support built in.

Brian

> --
> You received this message because you are subscribed to the nanoc
> discusssion group.
>
> To post to this group, send email to na...@googlegroups.com
> To unsubscribe from this group, send email to nanoc+un...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/nanoc

Denis Defreyne

unread,
Jan 28, 2010, 3:57:19 PM1/28/10
to na...@googlegroups.com
On 26 Jan 2010, at 15:40, tenable wrote:

> Thanks for the link. I didn't see that, but my route is the same. Even
> still, the auto-compiler gives a File not found. When I type in the
> full page, for example, localhost:3000/page/index.php the file gets
> downloaded, not displayed.

Hi,

The autocompiler does not have support for PHP files. If a directory is requested, the autocompiler looks for an index.html file in it, but it will ignore an index.php file. The autocompiler can’t find a MIME type for it, so it sends the file as application/octet-stream back to the browser.

If you want a web server that supports PHP, you should consider using one of the big web servers (apache httpd, lighttpd, nginx) instead. No offense, but I really don’t feel like bloating the autocompiler with a PHP interpreter… :)

Regards,

Denis

--
Denis Defreyne
denis.d...@stoneship.org

tenable

unread,
Feb 2, 2010, 2:22:53 PM2/2/10
to nanoc
No offense taken! ha ha...


On Jan 28, 1:57 pm, Denis Defreyne <denis.defre...@stoneship.org>
wrote:

> denis.defre...@stoneship.org

Reply all
Reply to author
Forward
0 new messages