PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
CodeIgniter vs "the others"

I saw a similar post the other asking for recommendations between CodeIgniter, Laravel and Symfony. It got me to wondering about some of the comments in that thread.

It is mentioned several times in the comments "if you have large project, go with XYZ". I am curious what your definition of a large project is. I have used CodeIgniter over the years to develop what I consider to be small to medium sized projects (event registration systems mostly). About three years ago I stuck with CodeIgniter (4.x) when I started, what has become, a huge project (at least for me). The controller files, for instance, probably have 200,000+ lines of code in total. Obviously there are dozens and dozens of related files (views, helpers, shared functions, config, etc) as well. Does that fit the definition in your eyes of "large"?

Lately I have begun to wonder if I went down the wrong road and should have looked around a little harder at the alternatives. Are Laravel/Symfony so different that a rewrite would be a ridiculous undertaking? I realize these are pretty broad strokes, but the topic got me curious.

https://redd.it/1o5nqg9
@r_php
Looking for help with a project!

https://github.com/andrewthecodertx/6502-Emulator

This is becoming a really large project and has some complexity to it. Would love some contributers, or even just some more senior devs to offer some advice.

Thanks.

https://redd.it/1o5wdfx
@r_php
OpenCart is awful, what are some decent alternatives written in PHP?

Sorry if this is the wrong subreddit, I wasn't sure where else to post it. If this is the wrong place, please point me to the right sub.

I'm helping a friend convert their shop to an actual ecommerce solution - right now they're just using some fairly insecure, poorly written PHP they made themselves (They learned PHP making this). It has several issues that I'd like to fix by using a proper solution.

So after little research, I decided to go with OpenCart - it looked decent enough on the frontend, so why not? Well... Once I started trying to modify it to how he wanted it (Share the main site's theme, try to recreate the product listing he had for his shop, etc.) I ran into so many problems. I can fix them with enough time, but I'm not getting paid enough to spend 20 hours reworking this for what should be minor changes, or features already built-in.

So - what are some good alternatives written in PHP that are easy to work with, somewhat modern, and customizable?

https://redd.it/1o5wtun
@r_php
can not connect to Xdebug running into docker from phpstorm (waiting for incoming connection with ide key docker)

I have tried many things and searched too much about this but still have no idea why I can not connect, lemme break down all the problem,

this is how I setup docker using this image github.com/8ctopus/apache-php-fpm-alpine/
```>
> services:
> web:
> # php 8.4.8
> image: 8ct8pus/apache-php-fpm-alpine:2.3.4
> hostname: testing
> container_name: web
> ports:
> - "80:80"
> - "443:443"
> - "8025:8025"
> volumes:
> - ./:/sites/localhost/html/public/
> - ./xdebug.ini:/etc/php83/conf.d/xdebug.ini
> environment:
> DATABASE_URL: "mysql://user:password@db:3306/tont_db"
> command:
> [ "sh", "-c", "mkdir -p /sites/localhost/logs/ && chown -R www-data:www-data /sites/localhost/logs &&/tmp/start.sh"]
> depends_on:
> - db
>
```
my xdebug.ini file.ini

```>
> zend_extension=xdebug.so
>
> ##############################################
> # common settings
> ##############################################
>
> # values: off,develop,coverage,debug,profile,trace,gcstats
> # reference: https://xdebug.org/docs/all_settings#mode
> xdebug.mode = develop,debug,coverage
>
> # enable on all requests vs. trigger
> # values: yes,no,trigger,default
> xdebug.start_with_request = yes
>
> # only if trigger mode
> xdebug.trigger_value = ""
>
> # log
> xdebug.log = /sites/localhost/logs/xdebug.log
> xdebug.log_level = 7
>
> ##############################################
> # debugger
> ##############################################
>
> xdebug.discover_client_host = 1
> xdebug.client_host = xdebug://gateway
> xdebug.client_port = 9003
> xdebug.connect_timeout_ms = 1000
>
> ##############################################
> # profiler
> ##############################################
>
> xdebug.output_dir = "/sites/localhost/logs/"
> xdebug.profiler_output_name = "cachegrind.out.%s.%H"
>
> # misc.
> xdebug.profiler_append = 0
>
```
this is docker terminal

```>
> /sites # php -v
> PHP 8.3.22 (cli) (built: Jun 3 2025 22:38:37) (NTS)
> Copyright (c) The PHP Group
> Zend Engine v4.3.22, Copyright (c) Zend Technologies
> with Zend OPcache v8.3.22, Copyright (c), by Zend Technologies
> with Xdebug v3.4.3, Copyright (c) 2002-2025, by Derick Rethans
>
```
so it should be running and I am able to listen right?

when I try to access this page:
[some code](https://i.sstatic.net/gwMe81MI.png)

I get:
[errors](https://i.sstatic.net/cX5JjBgY.png)

a full screan:
[full screen](https://i.sstatic.net/Jpp3ErR2.png)

and this is my phpstorm
[debug](https://i.sstatic.net/fCOCT76t.png)
[debug config](https://i.sstatic.net/jGr5woFd.png)
[xdebug settings](https://i.sstatic.net/GP6uG1AQ.png)
[php server settings](https://i.sstatic.net/LVsiHzdr.png)

and this is all xdebug output in the file /sites/localhost/logs/xdebug.log

```>
> /sites # cat /sites/localhost/logs/xdebug.log
> [18] Log opened at 2025-10-13 20:28:22.987363
> [18] [Config] WARN: Not setting up control socket with default value due to unavailable 'tsc' clock
> [18] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_FORWARDED_FOR,REMOTE_ADDR'.
> [18] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
> [18] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
> [18] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 192.168.65.1:9003.
> [19] Log opened at 2025-10-13 20:28:23.410216
> [19] [Config] WARN: Not setting up control socket with default value due to unavailable 'tsc' clock
> [19] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_FORWARDED_FOR,REMOTE_ADDR'.
> [19] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
> [19] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
> [19] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 192.168.65.1:9003.
> [18] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port:
xdebug://gateway:9003.
> [18] [Step Debug] WARN: Creating socket for 'xdebug://gateway:9003', getaddrinfo: Invalid argument.
> [18] [Step Debug] ERR: Could not connect to debugging client. Tried: 192.168.65.1:9003 (from REMOTE_ADDR HTTP header), xdebug://gateway:9003 (fallback through xdebug.client_host/xdebug.client_port).
> [18] Log closed at 2025-10-13 20:28:23.996907
>
> [19] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: xdebug://gateway:9003.
> [19] [Step Debug] WARN: Creating socket for 'xdebug://gateway:9003', getaddrinfo: Invalid argument.
> [19] [Step Debug] ERR: Could not connect to debugging client. Tried: 192.168.65.1:9003 (from REMOTE_ADDR HTTP header), xdebug://gateway:9003 (fallback through xdebug.client_host/xdebug.client_port).
> [19] Log closed at 2025-10-13 20:28:24.426456
>
```
I really have no idea what should I do

I am running fedora 42

https://redd.it/1o5wruy
@r_php
Question: PHP-FPM Tuning on Synology NAS

Primary use case is a single user of a CPU-intensive NLP (natural language processing) PHP application. Environment is a DS1825+ with 16GB memory - Web Station, Nginx, PHP 8.2. What changes to Synology's FPM settings, shown below, are recommended?

\- FPM Mode: Static (vs. Dynamic, On Demand)

\- Max Processes: 20

\- Max Servers: 2

\- Min Spare Servers: 1

\- Max Spare Servers: 3

We are currently optimizing the PHP code for performance; but we also wanted to look at FPM tuning, PHP Core settings, and other system-level tuning for any possible incremental improvements.

This is outside our area of expertise, so... Thanks for any insights.



https://redd.it/1o5uyhf
@r_php
Consolidating hosting

Hey all, I was wondering if this makes sense or if someone knows a better option. But currently I’ve got shared hosting, email and domains on hostmonster, bluehost, and ionos (I know it’s insane but it was all bought a long time ago when I first got into php and then I started getting into .net so at the time it had to be windows but now it doesn’t really make sense because it’s all Linux now anyways. Also I’m kinda into Laravel right now so I’ll be dropping all my .net stuff and just going with Laravel (php). I’ve also got some domains on namecheap.

Anyways I want to consolidate. I don’t really have a need for something that takes lots of traffic and space for everything just a server that can run Laravel and send out email. All small projects. I was thinking of moving all my hosting to the smallest droplet on DigitalOcean because that’s what most Laravel users suggest. For my domains I was thinking of moving them all to porkbun because I see a lot of love for them and also a lot of people are turning away from namecheap. But I don’t really know what to do with my email, either somehow setup self hosted email on Digital Ocean or pay porkbun $2 for each email. Paying per email was kind of a shock to me because I’m use to getting unlimited emails included in the shared hosting and $2 seems like a lot for just 1 email account, I use several.

https://redd.it/1o5spn3
@r_php
Php and Replit

Want to start learning Php. How to get started w writing code in Replit?

https://redd.it/1o6umg6
@r_php
Is security more important that features?

We all know that handling security is a feature in itself. It's almost understandable when developers cut corners to ship a product faster.

What do you think is the most common cause of software security vulnerabilities today? Is it poor coding, configuration mistakes, or the human element? Is there or will there ever be 'the perfectly secure, unbreakable platform'?


The Dotkernel Headless Platform is doing its part to mitigate basic security concerns that are mentioned in this article. We believe it's a solid start that is a must for any project. Of course, there are many more things not included here, like deployment, server-related tasks, network and infrastructure. Those are topics for a future discussion, as the focus here was on the main codebase.

https://www.dotkernel.com/best-practice/basic-security-in-dotkernel-headless-platform/

https://redd.it/1o77rc3
@r_php
I created Symfony Franken Starter Kit, an open source starter to get started quickly, clean and modern.

🎯 Each Symfony project often starts with the same hassle: config, boilerplate, waste of time…

I created Symfony Franken Starter Kit, an open source starter to get started quickly, clean and modern.

💡 What it brings: • Symfony 7.3 + FrankenPHP, modern PHP server in Go • PostgreSQL 16 + Docker Compose ready to use • Doctrine configured with UUID, timestamps and soft deletes • Messenger for asynchronous tasks • Makefile with 20+ useful commands • app:make:domain-entity command to automatically generate your entities and repositories according to the hexagonal architecture

Tell me what you think about it?

➡️ Find out here: https://github.com/jzohore/symfony-franken-starter-kit.git

Feedback and contributions are welcome!

https://redd.it/1o785gu
@r_php
CodefyPHP 3 Release – performance tweaks, new features, and improvements for rapid development

[CodefyPHP v3](https://codefyphp.com/docs/blog/2025/10/15/codefyphp-3-is-here/), the PHP web framework for complex applications has been released and includes some solid improvements, new features, and bug fixes.

**Highlights:**

* HTTP and content caching options
* New PSR-14 implementation
* Localization improvements
* Supports multiple database drivers (using PDO) - fixed
* Asset management
* Rate Limiting and referrer spam protection
* Minifier middlewares
* Encrypt environment variables; decrypt during runtine
* and much more

Repo: [https://github.com/codefyphp/codefy](https://github.com/codefyphp/codefy)
Docs: [https://codefyphp.com/docs/](https://codefyphp.com/docs/)

I’d love feedback from anyone working with DDD, CQRS, or event-sourced applications — especially around your real-world use cases and what should be improved and/or added in CodefyPHP.

https://redd.it/1o7qcdw
@r_php
🎉 I just published my first Laravel package!

# Laravel User Auditable

A Laravel package that provides user auditing capabilities for your database tables and Eloquent models. Easily track which users create, update, and delete records in your application.

Features:

# Features

(https://github.com/3rn3st0/laravel-user-auditable#features)

🕵️ User Auditing: Automatically track `created_by`, `updated_by`, and `deleted_by`
🔧 Flexible Macros: Schema macros for easy migration creation
🎯 Multiple Key Types: Support for ID, UUID, and ULID
🏷️ Relationships: Built-in relationships to user models
📊 Query Scopes: Easy filtering by user actions
Zero Configuration: Works out of the box

🔗 https://packagist.org/packages/ernestoch/laravel-user-auditable

\#laravel #php #package #opensource

https://redd.it/1o7wj69
@r_php