Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do GitHub pages support PHP? [closed]

Tags:

Thank you for taking the time to review my request for help.

I've been using gh-pages to work on a build for a static site and the server has worked amazing for me throughout the build!

Although I seem to have an issue when submitting my HTML web form to my email through PHP code. When I submit to the gh-pages server I get this error message saying *405 not allowed ngix* I've been digging around to find an answer to this. First I discovered that I did have a few minor errors in my code which I fixed. Then I submitted again to the server with the correct code and still received the same message from the gh-pages server. *405 not allowed ngix* this leads me to believe that the gh-pages server does not support any PHP code.

I found some information on SO about the gh-pages server not supporting PHP. How to publish .php page instead of .html at github to demo some php content?

screen shot 2014-12-27 at 12 44 19 pm

enter image description hereServer side includes alternative

Does PHP run on gh-pages? Or not?

If not then I know that everything on my side is correct and I should not worry about it because when I truly deploy this site live I'll use a server that does support PHP.

Here's my current build so you can test out my issue. http://kapena.github.io/pp_web/#contact-pp

This is what I am getting when I submit the form to the server..

enter image description here

like image 262
brent_white Avatar asked Dec 27 '14 23:12

brent_white


People also ask

Does PHP work on GitHub Pages?

GitHub Pages does not support server-side languages such as PHP, Ruby, or Python.

What should we be careful of before deploying to GitHub Pages?

Even if the repository is private, the site is still publicly available on the internet — so the developer should always check for any sensitive data before deployment. Naturally, sending sensitive data (e.g. passwords or credit card information) is also unsafe.

Can GitHub Pages have backend?

Github pages will not execute any serverside code. You may only upload static files (html,css,js, images, etc.). In order to have a hosted backend you should look for another service like Google Cloud, AWS Lambda, Heroku, etc.


1 Answers

A static site cannot by definition support PHP.

  • Static websites serve content directly from the web-server’s file-system exactly as stored.

  • Dynamic websites generate content live per each request. The request is delegated to a running web-application that builds the content.

What is a Static Website

You might be interested in PieCrust. It is a static site generator.

like image 96
2 revs, 2 users 96% Avatar answered Mar 09 '23 00:03

2 revs, 2 users 96%