@ollieread@phpc.social avatar

ollieread

@ollieread@phpc.social

I'm Ollie, and I write PHP content and open-source code when i'm not working as a PHP contractor.

Big Laravel fan!

Multitenancy is my thing; ask me about it.

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

ctietze, to php
@ctietze@mastodon.social avatar

A question for more experienced developers than me:

We have this setup where all requests go through a PHP script for authorization (think: cookie) checking before serving files.

That's fine with HTML, but less ideal for 5MB PDFs.

I'm trying to search for ways to use PHP to allow/deny access, but otherwise let the web server (Apache) do its job.

Is there such a facility to rewrite requests for auth, but then go on serve the static files?

ollieread,
@ollieread@phpc.social avatar

@ctietze not sure about Apache, but if switching to Nginx is an option, it supports auth subrequests. I don't know if there's a way to do it with Apache.

https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/#

ollieread, to php
@ollieread@phpc.social avatar

I need to remember that Mastodon exists! I’m currently writing a bunch of content to do with PHP and this would be the perfect place to talk about that.

I’m currently trying to decide whether is an interesting enough topic that people may like an in-depth course/series on it. It seems to be something a lot of people are vaguely aware of, but don’t really know the details.

ollieread,
@ollieread@phpc.social avatar

I’ve also been trying to put together some content that’s more beginner friendly, by researching frequently searched queries on Google.

These are the ones I have so far.

ollieread,
@ollieread@phpc.social avatar

In fact, this is my first draft of the article on covariance and contravariance as concepts but also related to .

I've tried to go for simple, without too many details, but I think this contains the fewest number of details I'm capable of writing 😂

https://gist.github.com/ollieread/273cf344503533ee4c497ab4c62929bf

ollieread,
@ollieread@phpc.social avatar

@grmpyprogrammer well it definitely seems to be something people are interested in, and doesn't seem to be covered anywhere else. Not to any decent degree either, so maybe I will.

ollieread,
@ollieread@phpc.social avatar

@alessandrolai thanks.

It's interesting that you should mention modern PHP and PSRs, as I've long held that some of those could do with being updated, as I think they're bit a limiting at present. (also I think some of them could be improved) 😅

ollieread,
@ollieread@phpc.social avatar

@alessandrolai interestingly, the container PSR is the one that I think is the most limiting, or needs improvement. Honestly, I'd probably create a dependency injection PSR that utilises it but adds some base indication for more advanced features, as well as some attributes for utilisation.

I think attributes are the future of PSRs as they'll let you hook into WAY more systems without making those systems adhere to specific contracts.

ollieread,
@ollieread@phpc.social avatar

@alessandrolai I think it could be achieved without venturing into implementation.

It's super rough (I threw it together in the last 5–10 minutes), but here's a write-up that hopefully explains enough of it. It's concept I was going to explore anyway.

https://gist.github.com/ollieread/144840c92e6829e07134c17b28878510

luis_in_brief, to random
@luis_in_brief@social.coop avatar

I feel like a spammer for showing up so many places in the past 24 hours and saying “yo, the thing you say no one has built: we’ve built it, it’s right here, we’re paying maintainers every month”.

Tidelift isn’t perfect but it is real and targeting exactly these kinds of problems.

https://social.coop/

ollieread,
@ollieread@phpc.social avatar

@ramsey @luis_in_brief this is so true 🥲

I’m on the verge of switching to something that could get me a proper competitive salary, or preferably, contracts. The only reason I haven’t is the whole “experience” aspect. Not a lot of people will care about your general knowledge if you don’t have X years of experience in the specific thing 😅

AstraKernel, to php

PHP conductor 😂

ollieread,
@ollieread@phpc.social avatar
ramsey, to random
@ramsey@phpc.social avatar

Just got one of those scam calls telling me that I’m facing legal trouble because someone has been shipping drugs in my name. They tried to get me to confirm my address by reading off a bunch of addresses, so they’re clearly trying to gain access to something. When I answered “no” to each address, they reminded me that I can be arrested for giving false information.

ollieread,
@ollieread@phpc.social avatar

@ramsey you should have said “I’m not happy giving you my address, but if you like I can provide you with one to forward the drugs to if that’s not too much hassle”

ramsey, to random
@ramsey@phpc.social avatar

Technically, the whole community pays for your shit posts. 😂 /cc @ollieread

https://opencollective.com/phpcommunity/projects/phpc-social

ollieread,
@ollieread@phpc.social avatar

@ramsey I am actually super okay with this! 😂

ollieread,
@ollieread@phpc.social avatar

@ramsey how easy was it to setup with OpenCollective? May have possible use for it for something in the works, maybe, possibly. It’s classified 😅

ollieread,
@ollieread@phpc.social avatar

@ramsey what I meant by it’s classified is that it’s not set in stone yet so I didn’t want to say it out loud, but when it is, it’ll be a public thing.

I can say that it’s a community thing, that in the near future would be looking for a way for people to sponsor it, and I was looking into routes that aren’t as complex as setting up a fully fledged legal entity.

Wouldn’t be huge amounts, mostly hosting and stuff, but in the future we would maybe look for larger donations to fund events.

Girgias, to php
@Girgias@phpc.social avatar

is the child that just keeps on giving with weird features.

Sure let's just disable the Exception class WHAT COULD GO WRONG

Stage 1: UAF of the typed properties:
https://github.com/php/php-src/issues/11960

ollieread,
@ollieread@phpc.social avatar
ramsey, to Amazon
@ramsey@phpc.social avatar

Does anyone else have the problem where you use ’s “Subscribe and Save” to have something delivered monthly, but then when you’re expecting it, it’s out of stock?

How does that happen? I literally told you I want this thing way ahead of time. Why can’t you use that information to plan your stock?

This happens way too often, IME.

ollieread,
@ollieread@phpc.social avatar

@grmpyprogrammer @ramsey That's literally the exact issue we had, where it just wouldn't have the cat litter available, so we just cancelled them.

Only thing it ever did keep up with, was Monin Vanilla Coffee Syrup, which is why I still have like 5 bottles of it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • kavyap
  • DreamBathrooms
  • osvaldo12
  • magazineikmin
  • InstantRegret
  • everett
  • Youngstown
  • ngwrru68w68
  • slotface
  • rosin
  • GTA5RPClips
  • tester
  • PowerRangers
  • anitta
  • thenastyranch
  • mdbf
  • ethstaker
  • cisconetworking
  • Durango
  • vwfavf
  • normalnudes
  • tacticalgear
  • khanakhh
  • modclub
  • cubers
  • Leos
  • megavids
  • All magazines