As I know a fair ammount of people (including myself) enjoy using PHP on Glitch, I created hello-httpd. Aimed to be like hello-express and hello-sqlite, it is the lamp-poc apache server on Glitch with a few fixes including:
Prevent Apache logs from being viewed on the internet
Add more descriptive README.md
Add a sample .htaccess file
Add a better index.php that replicates hello-sqlite
Use MySQL
Enjoy! It would be my dream if Glitch added this to the default starter projects!
This is really cool! I finally have ab exvyse to learn php! One thing is that on form submit the page reloads, unlike hello-sqlite. It would be nice if that changed
No, it’s just too advanced for you. It’s the exact same thing as hello-sqlite (but in PHP), but you keep hating on PHP so much (shoot, you hate on everything) that if you stopped and learned just a little bit of PHP, you would see how it works.
I know a bit of PHP. (as I’m trying to learn it) And I’m bringing no hate. And it’s pretty noice that you made this @RiversideRocks while being under hello-express. It’s just with the amount of files, I looked at index.php a bit and saw that there were a bit of lines, so I guessed that it was too advanced. My bad, @aboutdavid.
This is becoming a rather heated discussion, in my opinion, and y’all should calm down a little bit.
Secondly,
The reason a lot of people hate PHP is because of how the creator of PHP is a people pleaser. PHP was never meant in the beginning to be a logical language. That means you weren’t supposed to be able to do things like SQL queries or math. PHP was made to make templating a hella lot easier than having to write C/C++. The people were mostly fine with all this logic being added to PHP but were very, you could say pissed, at people who then combine logic and templating.
PHP nowadays is a mess, compared to, say, Node.js & templating like Handlebars or Python with Jinja. A lot of people also disliked how slow PHP used to be. However, PHP has improved a lot over the years, and nowadays, the newest versions of PHP are a lot faster than Node.js, Python, and Deno.
Lastly,
To say my own opinions in the matter. I myself used to write code in PHP when I was younger and was learning how to write code. PHP is a great place to start learning how to write backend code and get used to the programming style one would want to learn (considering PHP has both OOP and functional).
I don’t think anyone who hasn’t tried PHP and is familiar with the language, how it works, and the ecosystem shouldn’t say much about what they think of PHP. How can one know anything if one hasn’t tried it yourself?
I myself have tried it. I liked it a lot in the beginning. However, it’s just not my language. I do not carry hatred towards any developer who chooses to write code in PHP; however, I will never recommend learning PHP to anybody either. I say that because I don’t think that the PHP language is worth learning anymore, it might be fast, yes. But, at the end of the day, I will always go back to Node.js and/or Deno. Just because that’s the languages/engines/frameworks I feel more comfortable with. What other people choose to write their code in shouldn’t be judged, but accepted. We’re all different.
@RiversideRocks I’ve remixed this (https://violet-zest-bit.glitch.me), and it’s saying Connection failed: Unknown database 'glitch' - what’s going on there? Is there a command I need to run in the terminal or something?