#php
RT igor_os777: Preventing SQL injection attacks with prepared statements in MySQL http://dlvr.it/Slj0zR #Security #MySQL #PHP #PreparedStatements #SQL
It's alive!! The Cross-Site Request Forgery (CSRF) challenges on https://practicallaravelsecurity.com are live! 😁 😎 😈
These were a lot of fun to build, involve a bunch of domains, and should make for a fun challenge! Good luck! (You're gonna need it!)
#Laravel #PHP


Using a headless browser for the first time! I have to automate something via #PHP, and this is the easiest solution I could find..
One day, one decomposition
A013917: a(n) is prime and sum of all primes <= a(n) is prime
3D graph #threejs #webGL ➡️ https://decompwlj.com/3Dgraph/A013917.html
2D graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A013917.html
#decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #sum #primes #primenumbers #graph


From Freelancer Job Post to Web App: A Step-by-Step Guide Using Laravel
Discussions: https://discu.eu/q/https://youtu.be/IyGqRoX7rA0
PHP RFC: Define proper semantics for range() function
https://wiki.php.net/rfc/proper-range-semantics
Discussions: https://discu.eu/q/https://wiki.php.net/rfc/proper-range-semantics
My theme "A touch of glass" for @flatpress got an update: it is compatible to the latest Flatpress version again.
#flatpress #php #opensource

@icedquinn@blob.cat @lore@berserker.town I'm not that old, I started #PHP at 5.4 or a little before that, I think.
@icedquinn@blob.cat @lore@berserker.town I am very happy that I don't have to use either. Though having been a dev for both at some point in my life, I had much less issues with #PHP than #JavaScript. At least in the PHP world they have some level of standardization that you can actually depend on, and the frameworks are much less bonkers.
Trying to host a small #CodeIgniter 4 project on shared webhosting with #Apache, where I have only access to the www (public) folder was a disaster. Stressful 4 hours without any success, all the to-dos and tutorials are worthless. Any straightforward advice how to set up everything and upload via FTP? I guess it's similar on other frameworks as well. #PHP
Help us contact inactive maintainers of LaravelCollective/annotations
https://github.com/LaravelCollective/annotations/issues/124
Discussions: https://discu.eu/q/https://github.com/LaravelCollective/annotations/issues/124
Something they don't tell you about #php #development, some days you spend 8 hours trying to track down a single bug in your code and some days you knock out 5 storys before lunch.

Question for #Symfony folks.
I've implemented user login rate limiting using the rate-limiter package. However it creates an error message with the un-substituted %minutes% string in it.
I'm trying to override onAuthenticationFailure method of my UserAuthenticator class to capture any instances of TooManyLoginAttemptsAuthenticationException but I can't seem to get the interval value that is set in security.yaml.
Fresh post 🚀
A pirate's guide to routing basics in Laravel
https://t.co/aHiWDcByjv
#PHP #Laravel #Routing
“PHP is the most used server-side programming language on the web. In fact, 79.2% of all websites rely on PHP to some degree” 😮 https://kinsta.com/php-market-share/ #PHP #webdev #stats
Latest news about Kahu are here! https://www.reddit.com/r/PHP/comments/125rsdy/dependency_monitoring_security_advisories_and/?utm_source=share&utm_medium=web2x&context=3 There are a lot of goodies in this release 😄 #PHP #Security #Composer #DevSecOps
Quick review of the content presented at https://libreplanet.org/2023, Neptune Room, Session "Free Software in practice", March 18. Thank you Jeanne Rasata, Miriam Bastian and Free community. 🙏🏻
https://www.researchgate.net/publication/368715943_Cataloguing_challenging_museum-libraries_items
https://www.academia.edu/99253302/Cataloguing_challenging_Museum_Libraries_items
https://github.com/silviotamaso
#FreeSoftware #Cataloguing #MuseumStudies #LibraryStudies #InformationScience #LAMP #Linux #Apache #MySQL #PHP
If you propose something to the #PHP internals mailing list, and everyone who responds provides well-reasoned arguments for why the thing is not a good idea, then the appropriate response isn’t “It sounds like this is a great way forward! I will create an RFC.” 🤦♂️
So, I was wondering how many #WordPress security breaches involve outdated #PHP and found this: https://w3techs.com/technologies/details/pl-php. 89.3% of websites use older PHP versions that are no longer getting security updates. Please make sure your sites are running at PHP 8.0.
Have an idea for an article for us to write on Symfony Station? Contact us here on Mastodon! And please sign up for our "newsletter" to get the latest news communiques and original content delivered to your inbox. https://www.symfonystation.com/Contact :symfony: :drupal: :php: #Symfony #PHP #Drupal

All about css update - Benjamin Kott - Web Camp Venlo 2023
I recently learned about #OpenAI's text moderation #API and that it's 🆓
Enabled it on some of sites that have user profiles and happy with the outcome!
Read my blog post to understand how to use it with #PHP https://lostdomain.org/2023/03/29/using-openai-free-content-moderation-api/
Just discovered a drag/drop sorting package for Laravel Nova... massive time saver!
Published a new package for using PHP-VCR within PHPUnit tests - https://github.com/angelov/phpunit-php-vcr/ #php #testing #phpunit #vcr
Explore the @symfonystation PHP and Symfony news Communique from Nov. 26, 2021 https://www.symfonystation.com/Symfony-Station-Communique-26-November-2021 :symfony: :php: #symfony #php #SymfonyCasts #WayBackWednesday

PHP Portugal #7 was a blast! Huge shoutout to Devoteam Creative Tech for sponsoring the event, and to David Adão and José Postiga for their awesome talks. Big thanks to the community for partying with us after. Can't wait for meetup #8 - let's keep the good times rolling! #php #community



Last week at the #wasmio #wasmio23 conference our friends over at the VMWare Wasm Labs (🌐 wasmlabs.dev) presented about bringing interpreted languages to #WebAssembly — such as #ruby, #python, #php, and more, soon even comparably obscure languages like #tcl!).
Okay that was quite enough hashtags for now, but if your first thought was “…but why?!”, that's an easy answer: you want to meet your users where they are! What's better, telling your future users off with "sorry you will need to learn Rust/JavaScript/whatever first", or telling them "You know Python? Great, we support Python!"?
Exactly.
On the other hand, if your first thought was “okay... but how??” boy have I got a blogpost for you! Here we talk about how we use the Wasm Labs team's work in our extension engine at Suborbital:
https://blog.suborbital.dev/bringing-python-to-se2-with-webassembly

One day, one decomposition
A013916: Numbers k such that the sum of the first k primes is prime
3D graph #threejs #webGL ➡️ https://decompwlj.com/3Dgraph/A013916.html
2D graph, first 500 terms ➡️ https://decompwlj.com/2Dgraph500terms/A013916.html
#decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #sum #first #primes #primenumbers #graph


Notback BETA - A new PHP frontend framework
Discussions: https://discu.eu/q/https://notback.io/
JS developers who focus on Single Page Apps are trying to rebrand standard web applications as “multi-page apps”. Don’t play along. Don’t use their words. Just call them web applications or web apps . SPAs are actually non-web apps if you think about it. They don’t actually leverage links, which are a key feature of the web.
Security vulnerabilities are inevitable, and you can't wait for a friendly user to find them before someone less friendly does! Don't wait until it's too late, book in a security audit.🔒💻
DM me or check out: https://valorinsecurity.com #Laravel #PHP
Laravel scout with extra builder features
https://github.com/alibaddd/scout
Discussions: https://discu.eu/q/https://github.com/alibaddd/scout
That people are still releasing *new* #PHP code in 2022/2023 that uses strings for class names instead of the ::class constant hurts me deeply.
It was added in PHP 5.5, people! A third of you weren't even using PHP yet when it was added.
I'm still looking for two full-stack #PHP #Javascript #HTML #SQL developers for my development team with a major telecommunications company. The position is 100% remote and the team mate would work on internal web applications. The team is spread across the country. #Azure #DevOps, #git, #Linux experience a plus. Reach out to me for more information if interested, boosts appreciated. Salary is decent.
Why do I got php code when accessing phpmyadmin? #server #apache2 #php #phpmyadmin
I am finally able to write honest to goodness #php 8 code in production and, man, does it feel good! Between inlining constructor variables, the nullsafe operator, attributes, match(), and the new string helpers there's so much boilerplate eliminated.


Hello everyone! I'm a web developer (#Node and #PHP) in Madison, Wisconsin.
In my free time, I enjoy exploring the idea of #PKM, #SecondBrain, and using #Wiki to improve my #Productivity and #NoteTaking. I'm passionate about the ideals of the #IndieWeb and #SemanticWeb. I'm also interested in #Metaphysics, #Manifestation, and #Synchronicity.
I want to meet new people for conversations. I'd love to connect if any of my interests resonate with you! Thanks for reading my #Introduction.
[Hilfegesuch zu Bloggen/WordPress]
Wer nutzt zum Bloggen eine Alternative zu WordPress mit ähnlichem Funktionsumfang mit PHP und MySQL als Basis sowie entsprechender großen Community anbei? 🤔
Wenn du einen BOOST für diesen Post spendieren magst, würde sich damit die Sichtbarkeit und Reichweite im Fediverse signifikant verbessern. 😉
#WordPress #Alternative #Bloggen #Software #Hilfegesuch #PHP #MySQL
I haven't actually used WP-env yet but it sounds promising. Anyone else using it for local WordPress development now?
https://developer.wordpress.org/news/2023/03/quick-and-easy-local-wordpress-development-with-wp-env/
Nginx parser with PHP and Bison
https://devto.name/mrsuh/nginx-parser-with-php-and-bison-1k5
Discussions: https://discu.eu/q/https://devto.name/mrsuh/nginx-parser-with-php-and-bison-1k5
Explore the @symfonystation PHP & Symfony news Communique from April 29, 2022. https://www.symfonystation.com/Symfony-Station-Communique-29-April-2022 :symfony: :php: :drupal: #Symfony #PHP #SymfonyCasts #lullabot #ThePHPF #phpstan #TakeMeBackTuesday

Implementing Facades from scratch
Discussions: https://discu.eu/q/https://youtu.be/wM7xN70QSiM
Had to explain why `compact()` in #PHP should be avoided due to its magic behavior, and packed it in some more structured notes: https://gist.github.com/Ocramius/c56a8e8ff25a8e0bd96800c41edab02a
Wonder why i put PHP there?
#rustlang #rust #php #developers #WebApps #javascript #typescript

...and the #OpenSource skills for those ^^ (and other) #EdTech, #HigherEd, #jobs?
#Python, 2,156
#Linux, 1,051
#WordPress, 442
#PHP, 421
#Moodle, 360
#MySQL, 282
#Drupal, 274
#GitHub, 224
#Apache, 122
#Kubernetes, 78
#Sakai, 55
Just started really using Laravel Policies... really useful, not sure why I haven't used them before! 🤷♂️
I wrote a tiny PHP tool to backup (your own?) Mastodon posts (“toots”) to a SQLite database. It doesn’t have a UI to browse them yet, but I feel better knowing that in case an instance disappears, my posts are not entirely gone.
Can be automated eg. via cron.
Replace string in file:
-------------------------------
<?php
$path_to_file = 'yourpage.html';
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("/shared_item/https%3A%2F%2Fapp.box.com%2Fs%2Fj7i88s6jb4yyk4wmiti4tol8ejoikdhl/view/", "<img src=https://m.box.com/file/", $file_contents);
file_put_contents($path_to_file, $file_contents);
?>
(Source: https://stackoverflow.com/questions/1438563/find-and-replace-in-a-file )
Actually looks like a good read: 14 #PHP arguments that are not enough used
https://www.exakat.io/en/14-php-arguments-that-are-not-enough-used/
I finished up the documentation that instructs people how to install Underpin using WordPress. I frequently get asked how to set up Composer in a WordPress install, so I took some time to add details on how to do that, too. Hoping this helps people get started.
https://docs.underp.in/Installation/wordpress
Free software is all about knowledge sharing and collaboration! I just proposed a patch fixing a bug in #RubyOnRails that I discovered while porting one of its features to @symfony 🤝
Functional programming isn't just for Haskell developers. It's for #PHP developers, too. "Thinking Functionally in PHP" is available from LeanPub.
Just wrote an absolute shit load of documentation on Underpin's registry/collections API, full of tons of examples with sample code and everything. Hoping I can add to this next week sometime.
https://docs.underp.in/reference/registries
A Drupal Backend developer should have a delicate balance between writing code and site-building skills.
They should know when to use existing entity types (content type, taxonomy etc.), when to create new entity types, and when to extend the existing ones.
They should know when to add a new field, re-use created ones, and develop their field type and formatter or develop just a formatter for the existing field.
They should know when to use existing views by creating a new display mode, creating unique views, or displaying the results using custom queries.
They should know when to use a contributed module, when to extend them and when to build it afresh.
And the list goes on...
If someone is better than one thing and not the other, project architecture and codebase become a mess in a few years, and then technology is blamed.
#Drupal #PHP #CMS #Backend #Architecture #SoftwareEngineering #Website #Technology #Project #Developer
Originally posted on #LinkedIn - https://www.linkedin.com/posts/drupler_drupal-php-cms-activity-7043917395228299264-A-wl
@julesbl
I would also like to use #Twig templates in #CodeIgniter once I get more into complex websites. Do you have your solution somewhere available on the web? I have found this one, maybe that's a good starting point https://github.com/daycry/twig
#PHP
If you're considering attending any #PHP #conferences this year, #tek2023 should be at the top of your list! It's being held May 16-18 in Chicago. More details here: https://tek.phparch.com.
I'll be presenting on "#OpenAPI: More Than #Documentation" and "#RegularExpressions Made Eas(y|ier)."
And, if you use this link, you can get $100 off the price of your conference pass.
Anyone out there #hiring for mid-level #SoftwareEngineers with experience with #nodejs, #dotNET, and #PHP? I know someone that might be on the market that I would love to recommend 😃
Don't miss out on @phptek 2023, the premier conference for PHP developers. Early bird tickets are now on sale at https://tek.phparch.com. Don't wait - get your tickets now and join us for a week of networking, learning, and growth. #PHPTek #PHP
My gosh working with #Symfony (or modern frameworks in general) is such a joy.
Coming from a legacy background where all the logic was in controllers & huge models, ug.
Slimming the models into entities, moving DB logic into repositories & business logic into services is just so clean.
Really sad for all the years that past-me struggled how to conceptualize a better way.
I want to make Underpin something that I can share with others better, and something that others feel comfortable with using. And that starts with taking ownership of the code, stabilizing it, and documenting it.
🔗 Leverage Symfony VarDumper Component to Enhance your Dumps
https://jolicode.com/blog/leverage-symfony-vardumper-component-to-enhance-your-dumps
#php
Today was spent writing a LOT of #java code. Surely there must be an easier way to read and write XML and JSON. By Odin, java's methods for this seem so much more complex than those of #PHP and #python.
I'm familiar with Jax, Stax, Saxon, JSON.org, Jackson, and the DOM, but none of these are easy or straightforward. Enterprise documents do not live in a vacuum!
I've just released a new version of Crell/Serde! 0.6.0 includes:
* Make individual fields required when deserializing
* Customizable datetime formats.
* CSV file support
* Setting field configuration at the whole-class level
* Better support for iterators and generators, allowing for infinite-stream serialization!!!
I'm especially happy about the last one. 🙂
Give it a try here: https://github.com/Crell/Serde
Yak-shaving with #Contao, #symfony and #php:
Why does "vendor/bin/contao-console list" work as expected - but "vendor/bin/contao-console list --format=json" fails due to an Exception in SendmailTransport.php?
The exception is valid, and resolving it is sensible - but why does that happy only with JSON output?!?
The Intl NumberFormatter (#php) has a weird rounding behaviour when fraction digits are used? It's just that the default rounding mode is half-even. Not the most comprehensible rounding mode for a default setting.
(Yes, there are many different rounding modes in Intl/ICU)
I am usually not a big framework guy but I have gotten so much mileage out of this #PHP database library over the years. It’s just a wrapper for #MySQL but it makes it so easy to structure queries and it has some nice debugging and logging stuff built in. One class, one file! https://medoo.in/
Chilling/helping a friend programmer. He is using Windows and PHPStorm to work on some of my code. What a completely different world than my pure Linux world. I don't know how Windows users work on Linux servers... It's bizarre and complicated. #PHP
@julesbl
I just wanted to let you know I will finally (surprisingly) be using Codeigniter for my project. I started playing around with Slim, but I failed because the documentation is minimalistic (completely insufficient), then I started with Symfony and it's just too huge and complex. #Codeigniter is well made, I like it. Had some initial troubles with folder structure and URL rewrite (loading of CSS inside of an own "view" template), but it works now and I can continue learning. #PHP

Laravel 10.4 Released: New File::json() method, converting existing HasMany relationships to a HasOne relationship, a new test response assertion, and more
https://laravel-news.com/laravel-10-4-0
Discussions: https://discu.eu/q/https://laravel-news.com/laravel-10-4-0
Can someone explain to me what is the point of #PHP functions allowing arguments in excess of those that have been declared?
Failing that, why isn't there a way to say "any additional arguments passed should cause an exception"?
Honestly, I shouldn't have to do this:
if (func_num_args() > 0) { throw new exception('Constructor called with arguments ('.func_num_args().') when none were expected.'); }
So #WordPress plugin, or theme, Devs. Is there a #Docker only local plugin(or theme) development environment available? Something that doesn't require me to maintain #Node, #NPM, #PHP, or #Composer on my local machine? Perhaps #VSCode Dev Containers is the closest I'm going to get but I don't want the #IDE lock-in either, as I don't even use VSCode. I've been playing with just a Dockerfile & docker-compose.yml but it has some usability issues currently.