Calling the submit.php

Hello guys,
I am calling my submit.php script on Hugo server, and next see the blank screen with 2 words: read only… Maybe someone knows why that is showing up and how to make it work? Thanks

How do you expect Hugo server to execute PHP?
Whatever you want to do, it will not work this way – use a properly configured webserver like Apache or nginx to server your static site.

The webform.html and submit.php work fine in a folder in my home directory, and the hugo server runs in an adjacent directory, but the PHP stops working when moved into the hugo server. OK, will try it in Apache. Thanks!

Hugo is a static site generator. It generates files out of your given configuration and content. You can copy the generated files to a webserver of your choice.

If you want to execute php scripts, your webserver needs to support this.

Hugo comes with its own limited development webserver which does not execute php. Also you shouldn’t use this server in production.

1 Like