Can I run PHP on Glitch?

Ah, I see the issue. You added ‘node’ in the file.js name. Node is the service being used to write and host your JavaScript. In the script in the package.json file we add node before the file name because that’s how you run a file with Node.


So to fix this issue just rename the file to file.js and remove the node.

I get it. I’m trying now

@Crazy .No errors so far…

Alright, it should work then! I would recommend adding the string below above your "script" just so that you package file knows that file.js is your main file.

"main": "server.js",

And if you have any other questions about Node[.js] you can go here or look up tutorials on YouTube! There are tons of places where you can learn how to use it for free.

Ok. I get it. No errors in the logs. But my site is still stuck. It won’t start!

I’m not entirely sure how to make the site load and still have the index.html page show up, but you can get it to load with a package called Express below.

I’ll take a look at that.

Thanks. @Crazy. And thank you too, @etamponi


NodeJS is easy, you should try learning lua first, its easier and nodejs is highly similar to it


this thread went off track, and did not really answer the question so ill have to assume the answer to is this got a php module installed to use php here is no. why not just say no php is not supported here. or yes you may use php. php is a very powerful way for your browser to talk to and operate for your nodejs projects. i would rather php than use javascript as it hides a lot more of the access to your data etc which is why we are useing nodejs in the first love to present my combo chatbot baduk ai here.

The answer is PHP works, but is not supported.

i suppose i could host the php part at hostzinger and have it access the nodejs part of the node host here, which is like i have it on my tablet. cause the slim way just doesn’t turn my crank.

1 Like

ah ty for the quick response. ill try the way i suggest then. the page does not need to be the same host anyway.

you rock riverside rocks! :slight_smile:

1 Like

I am happy to see that you are getting assisted, but please refrain from bumping topics.

can U tell me if this version of Glitch :・゚✧ php has support for metods GET and POST?

Please make a new topic for this question.

Yes, it does ($_GET and $_POST)