php

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

shnizmuffin, in FrankenPHP v1.0 is Here
@shnizmuffin@lemmy.inbutts.lol avatar

As someone who just spent weeks (months?) properly containerizing all his PHP applications with laradock: “Fuck.”

fartsparkles, in Library validate against graphql schema

I’d be interested in something like this for any language. Would be immensely useful!

shnizmuffin, in Improve my code - function to sanitize input fields
@shnizmuffin@lemmy.inbutts.lol avatar

You’d probably get more feedback if you posted a proposed solution (or “correct answer”) to StackOverflow and let the community tell you how dumb you are in between generating exactly what you are looking for.

amargo85,

dumb Lol

shnizmuffin,
@shnizmuffin@lemmy.inbutts.lol avatar

Real answer: consider passing Markdown through instead. You’re getting really close to one of my favorite memes. It’s a dark path, don’t tread down it.

amargo85,

which programming languages do you master? i’d actually like to work with you

shnizmuffin,
@shnizmuffin@lemmy.inbutts.lol avatar

“Master” is a strong word, but when I have to build applications it’s PHP in the back and JS up front. Specifically, Laravel implementations with whatever on top.

I’m extremely proficient with templating languages that eventually turn into HTML (nunjucks, antlers, blade, handlebars, webc, vue) and CSS (SCSS, LESS). A ton of my work winds up being on Static Site Generators and the unholy abomination that is at-scale Email development.

amargo85,

man! you’re good at this

Dirk, in ActivityPub Server in a Single PHP File

Again, this is not suitable for any real world use. This is an educational tool

This is a fully usable bot-in-a-box for Mastodon, you say? Thank you! 😇

dan, in ActivityPub Server in a Single PHP File
@dan@upvote.au avatar

Seems like decent example code.

Technically any PHP site could be in a single file. You can even embed images if you base64 encode them.

I guess what they mean is a single file with a reasonable size.

tsonfeir, in PHP Weekly - March 6th 2024
@tsonfeir@lemm.ee avatar

2024 and we still can’t get mobile right.

shnizmuffin, in I have suddenly inherited a PHP project. What VSCode extension or server is best for developing it locally? I’m down with any other suggestions too!
@shnizmuffin@lemmy.inbutts.lol avatar

Here’s hoping you have Docker installed, because Laradock rules. (It’s not just for Laravel.)

If the project is a Laravel project, Laravel Herd just came out. If you’re on a Mac, there’s also Valet. If you prefer a VM, there’s Homestead - a PHP Vagrant config.

tsonfeir, in I have suddenly inherited a PHP project. What VSCode extension or server is best for developing it locally? I’m down with any other suggestions too!
@tsonfeir@lemm.ee avatar

A lot depends on how the PHP site was set up. Does it have requirements? Apache? What version? MySQL? Is it using a framework? Composer, hopefully?

Theoretically all you need is PHP installed. You can run it from the command line with -S… maybe.

More information would be helpful.

gofsckyourself,

Seconded.

Also, what OS are you on?

For Windows, Laragon is super easy and convenient.

Or Devpod might be a good choice, too.

rikudou, in I have suddenly inherited a PHP project. What VSCode extension or server is best for developing it locally? I’m down with any other suggestions too!
@rikudou@lemmings.world avatar

I recommend using PhpStorm - nothing else even approaches it in terms of features and code analysis.

JDubbleu,

I’ve become the primary maintainer of a jumbled mess of a PHP/Laravel project we use as our"mission control" at work and I’ve been dying due to lack of dev tools. Might have to take a look at this (pester my manager for a license) assuming it has Laravel support.

rikudou,
@rikudou@lemmings.world avatar

Not sure if natively, but there will definitely be a plugin for Laravel if not.

You can try it for 30 days for free and see for yourself. Or you can always use the early access builds for free.

lemmy_in, in I have suddenly inherited a PHP project. What VSCode extension or server is best for developing it locally? I’m down with any other suggestions too!

Jetbrains Phpstorm is probably best in class, but you’ll have to pay for it.

sjpwarren,

I don’t do PHP. But I used other JetBrains tools for Go, Python and Java and they are very helpful. The AI Assistant is pretty good for explaining code. I am not in anyway paid by them. Good Luck

littleme, in Help installing PHP on Ubuntu (Solved. Thank you!)

Have you tried enabling php with the a2enmod command ? serverlab.ca/…/installing-php-for-apache-on-ubunt…

GardenVarietyAnxiety,

It returned: Module php8.1 already enabled

onlinepersona,

Was that the output of sudo a2enmod php ?

GardenVarietyAnxiety,

I wiped and reinstalled everything php and apache… It still didn’t work, so I tried to simply put

<?php phpinfo();

as suggested by someone else …and it works now? I reverted my .php file to what I listed in my op and that works now, too.

Oi.

onlinepersona,

😂 welcome to the wonderful world of computing.

If it shan’t dance to your flute, reboot

Anti Commercial AI thingyCC BY-NC-SA 4.0

raoul, in Help installing PHP on Ubuntu (Solved. Thank you!)

Maybe there is a conflict between libapache2-mod-php and php-cgi?

According to your doc, it seems to be one or the other.

GardenVarietyAnxiety,

I wiped and reinstalled everything php and apache… It still didn’t work, so I tried to simply put

<?php phpinfo();

as suggested by someone else …and it works now? I reverted my .php file to what I listed in my op and that works now, too.

Oi.

hitmyspot, in Help installing PHP on Ubuntu (Solved. Thank you!)

Have you tried a html file to ensure Apache is ok? Or no files and Apache should show a server page.

Also, the test file can just be

<?php phpinfo(); ?>

GardenVarietyAnxiety,

I wiped and reinstalled everything php and apache… It still didn’t work, so I tried to simply put

<?php phpinfo();

as suggested by someone else …and it works now? I reverted my .php file to what I listed in my op and that works now, too.

Oi.

hitmyspot,

Lol, turn it off and back on!

GardenVarietyAnxiety,

Basically, lol

sloppy_diffuser, in Help installing PHP on Ubuntu (Solved. Thank you!)

I don’t have a solution, but wanted to comment this is a reason to use docker. Instead of tinkering with your host system in ways you’ll probably forget, declare all the steps in a nice containerized system that does one thing: hosts a php website as you develop.

Expose your project through a volume for a mostly seamless file sharing experience between the host and container.

GardenVarietyAnxiety,

I’ve seen a lot about docker, and it looks pretty awesome.

I’ll definitely get to it eventually, I’m just trying to learn the basics for now.

dbx12, (edited ) in Help installing PHP on Ubuntu (Solved. Thank you!)

Looks like your php code is wrong, try this (and just this) for index.php


<span style="color:#323232;"><?php
</span><span style="color:#323232;">phpinfo();
</span>

You also had Test Text1 inside the php block which is a syntax error. Maybe that’s the cause why you don’t get anything.

Edit corrected the filename to lowercase extension.

GardenVarietyAnxiety,

I wiped and reinstalled everything php and apache… It still didn’t work, so I tried your suggestion and simply put

<?php phpinfo();

It works now? And reverting to my original file works too…

I don’t know how, but your idea worked. Thanks~

dbx12,

Great that it worked out, did you use apt remove or apt purge?

You might want to put your code in triple back ticks so it renders as code block :) Currently isn’t visible on some clients (boost for Lemmy in my case)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php@programming.dev
  • random
  • meta
  • Macbeth
  • All magazines