r/PHPhelp • • Oct 26 '26

Advice on a growing Symfony app

3 Upvotes

I have a custom commerce app built on Symfony and just upgraded it to Symfony 8 recently.

it’s on a single hostname and has two mobile apps (store and separate admin iOS app).

It has been growing and while I want to scale it out, I’m also thinking of using separate hostnames now for the store and admin.

The admin has plans to grow as well, such as doing a full blown inventory management so I can support multiple warehouses, inventory transfers, etc… along with running marketing campaigns from it

How should I go about handling this?

Keep it a single app? Split the app? Share a kernel?

Should I move the API to a dedicated subdomain like api.example.com ?

Another reason to split is so that a compromised third party storefront script doesn’t affect my admin staff if they access the storefront.


r/PHPhelp • • Oct 25 '26

I need advice on upgrading a legacy PHP application.

11 Upvotes

Hi ,

I need advice on upgrading a legacy PHP application.

The application is currently running on:

  • PHP 5.4.7
  • Apache 2.4.3
  • Windows Server

The application is quite old, and I'm trying to determine whether it is feasible to upgrade directly to PHP 8.x or if the effort required to remediate compatibility issues would make a full rewrite a better option.

I am looking for guidance on:

  • How to assess the application's upgrade readiness
  • Common compatibility issues when moving from PHP 5.4 to PHP 8.x
  • Recommended upgrade path (incremental vs. direct migration)
  • Tools or approaches to identify deprecated functions and libraries
  • Criteria for deciding whether to upgrade or rebuild the application

Any advice or experience with similar legacy PHP migrations would be greatly appreciated.

Thanks.


r/PHPhelp • • Oct 23 '26

Solved Hostinger's response to PHP vulnerability - is it reasonable?

11 Upvotes

Long story short. A bunch of my websites are on a Hostinger-managed server. Hostinger issued a quick press release to say that they have mitigated the issue, but say the following about their managed hosting:

On managed hosting, the fix is built into the PHP version your site already runs, so the version number may not change. To check, open Hostinger dashboard → Websites → Dashboard → PHP Info. A Build Date of October 21, 2026 or later means your site has the fix.

Checking one of my sites, the build date is indeed 21 October 2026 - but I don't feel reassured as the version number remains 8.5.11. And yesterday I received an email from Netcraft (albeit possibly spam) saying that the server hosting my sites had a 'potentially vulnerable web application'.

After a bit of back-and-forth with their support bot, it responded:

You’re right. I have not answered the actual request.

Your request is: upgrade the managed PHP runtime to the upstream fixed release, such as PHP 8.5.12, restart the PHP processes, and provide confirmation that this was done. That is technically a possible approach, but it is a fleet-wide Hostinger engineering decision, not a maintenance action I can schedule from this chat. I also have no evidence that Hostinger has scheduled such a version-number upgrade.

The honest position is therefore:

Hostinger says its backported package is fixed when the Build Date is October 21, 2026 or later.

Aikido’s guidance supports your preference for the upstream fixed version as the clearest, independently recognizable remediation.

I cannot give you the stronger assurance you are asking for, namely that your server is running PHP 8.5.12, because Hostinger’s stated remediation deliberately leaves the visible version at 8.5.11.

I cannot schedule or promise a fleet-wide upgrade to 8.5.12 from here.

So your concern remains valid: the Build Date confirms Hostinger’s stated backport, but it does not satisfy your request for the upstream PHP release number to be updated.

Am I right to be concerned that the server may still be vulnerable?


r/PHPhelp • • Oct 23 '26

Non-Proffit Needs Advice/Help

2 Upvotes

I am not a programmer, apart from basic HTML. I run a not-for-profit web site (we do not have any monetization what-so-ever) that was written by myself initially (in HTML) and substantially updated a few years ago using PHP by someone who is no longer alive! The site is a relatively large one with nearly 10,000 directories and over 270,000 images.

Due to the PHP alert I have done some investigating and can see that I am running an outdated version of PHP, 7.0.33. Advice seems to be to update to a current version and apply a security patch.

Unfortunately I have no idea how to do this. Any advice would be gratefully received.


r/PHPhelp • • Oct 23 '26

PHPStan and array of dynamic objects

3 Upvotes

Hello everybody,

I need your help. Let's say I have a Mapper that receive data from a database. For eg.

class Mapper { ...
    public string $table;
    public string $targetClass;

    public function getArrayOfObjects($conditions) {
        $PDOStatement = $this->Database->select($this->table, $conditions);
        $array = $this->Database->fetchAll(PDO:FETCH_ASSOC);

        $returnArray = array();

        // Now I populate the object property, for eg.
        foreach ($array as $database_row) {
            $object = new $this->targetClass;

            $object->id = $database_row['id'];
            $object->publishedDate = new DateTime($database_row['published_date']);

            ....

            $returnArray[] = $object;
        }

        return $returnArray;
     }
}

class BooksMapper extends Mapper {
    function __construct() {
      $this->table "books";
      $this->targetClass = "\Books";
    }
}

This mapper aims to be a generic one, not only for Books. I know that "publishedDate" is a "book concept" but let's consider that the Mapper reads from a JSON file the structure of the object that it is going to map with database fields.
Now let's say that I use it like that.

$Database = new \Database($someDatabaseConfiguration);
$BooksMapper = new \BooksMapper($Database);
$BookArray = $BooksMapper->getArrayOfObjects(["activeBook" => true]);

foreach ($BookArray as $Book) {
print "Book ID: " . $Book->id;
}

The problem here is that PHPStan seems not to understand that $BookArray is an array of \Book, and so at level 8 it gives me an error on $Book->id.

How can I solve that?

Thank you for your help, and excuse me for my ignorance.


r/PHPhelp • • Oct 23 '26

one single page of php code (v5.6) upgrade to 7.4: help request

4 Upvotes

I have one single page of code (functions.php), no mysql, that was written with php 5.6 and now needs an upgrade to 7.4.

I downloaded rector but I have no clue how to use that.

Can anyone help me to upgrade this page please? I have no php experience.


r/PHPhelp • • Oct 22 '26

Hosting Provider Adamant we are patched but we are on PHP 8.5.11?

6 Upvotes

Hi all,

One of my workplace systems uses an external hosting provider that we have minimal access to. I was able to check a phpinfo() and can see we are on PHP 8.5.11:

PHP Version: 8.5.11

Build Date: Oct 21 2026 13:26:44

Build System: buildfarm05-new.corp.cloudlinux.com

Server API: lsapi V8.3 CloudLinux 1.3

PHP Path: /opt/alt/php85

Loaded Configuration File: /opt/alt/php85/etc/php.ini

session.upload_progress.enabled: Off

I am a little concerned, as the patched version is apparently 8.5.12.

I rang them a while ago, and they are adamant that we are patched and protected, and he keeps saying 8.5.11 is the latest.

Any idea where we stand right now? I've taken the site offline completely as a precaution.


r/PHPhelp • • Oct 22 '26

Solved php-fpm - www.conf recreated after recent update

2 Upvotes

I have been setting up and running small, AlmaLinux VPSs the same way for a few years, now. All have been running without issue until last night.

When I set these up, I create new pools, with custom configuration files (e.g., /etc/php-fpm.d/custom.conf) and delete /etc/php-fpm.d/www.conf

I do this to eliminate the security and owner/permission issue associated with having only root user. By using pools, common PHP issues like, “Warning: mkdir(): Permission denied” are eliminated.

For the fist time, last night's php-fpm update recreated the /etc/php-fpm.d/www.conf file which caused the php-fpm service to fail because the newly created file contained listen.acl_users = apache, nginx.

I do not have a user named nginx so in my custom conf files, I have: listen.acl_users = apache

What is the proper (best practices) way of avoiding this issue with future updates?


r/PHPhelp • • Oct 22 '26

Looks its another one...

0 Upvotes

Centos 7 box , still running, but running php 8.3.8 Trying to sort out how to get to 8.3.36.

I (silly me) assumed I could just yum update and I'd get something newer from the epi repo, but it doesn't.

Before the obvious answer. I'm remote and I wont have access to do any major upgrades for a couple weeks.

Surely this cant be THAT hard??!?!?

Suggestions?


r/PHPhelp • • Oct 21 '26

Old PHP 5.6 site got hit after PHP2Shell, how do I get it back up?

30 Upvotes

Organización pequeña, sitio web antiguo con PHP 5.6 (Apache, Debian, sin framework, código antiguo con mysql__* por todas partes). Desde ayer, sufre ataques de bots en oleadas cada pocos minutos. El registro de errores está lleno de:

Error fatal de PHP: Se agotó el límite de memoria permitida de 134217728 bytes

Señal de salida del proceso hijo pid 18537: Fallo de segmentación (11)

Muchas solicitudes POST multipart extrañas a páginas que ni siquiera admiten subidas de archivos. Hoy lo hemos desconectado.

Encontramos un archivo PHP en la carpeta de subidas que nadie creó (eval/base64 ofuscado) y una tarea programada (cron job) en www-data que se ejecuta cada 5 minutos. Supongo que lograron entrar.

Intenté migrarlo a PHP 8, pero falla al instante (mysql_connect indefinido). No hay parche oficial para la versión 5.6.

¿Qué harías? ¿Recompilarlo desde cero y servir una versión estática por ahora? ¿Hay alguna forma rápida de portar la parte de mysql_connect o es necesario reescribir el código?

Edit 1: Just to clarify, I'm not the one running this operation. It's an older guy, very old-school, "if it ain't broke don't fix it." Guess it worked for him all this time. That said, I've seen people here and on other subs treating this like the end of the world. It's serious, no doubt, NSA put out an advisory and there's active exploitation in the wild, but part of what went down is already coming back online, and anyone who kept their stack current rode it out fine. As devs I think we should keep cooler heads and trust what we know how to do, without tipping into arrogance or ego.


r/PHPhelp • • Oct 22 '26

How do I know if a website is safe to use again?

0 Upvotes

There are multiple sites I want to access which, according to Google AI, use PHP. These are;

  • LoLAlytics
  • PixelCatsEnd
  • Andersenstories
  • Boligportal

But I have no idea how to figure out if they've done the important update or not. All four of them are seemingly unable to/won't communicate elsewhere about PHP. I also don't have a way of trying to contact them personally. I understand very little about PHP so I'm sorry if this is a stupid question.

The only one that would have my info is PixelCatsEnd. I have a registered account, so they have my email, username, and password. The others do not have registered accounts.


r/PHPhelp • • Oct 22 '26

FIle uploads

2 Upvotes

Who should deal with the file uploads POST routes, front facing PHP script or Node.js? If PHP script handles the GET request and shows the form, then, who should place the file inside the node's directory, the PHP script or the Node script?

Node.js script is tasked with processing the uploaded file, but not sure if it should handle the actual file upload and placing.


r/PHPhelp • • Oct 22 '26

Is there any way on 20.04 Ubuntu to get the ondrej surý patches for php2shell?

4 Upvotes

I took all my sites off-line before I was affected, but I need to see if I can get this update which appears to only be for 22 Ubuntu and not 20 anybody on 20 having this issue and able to get this updated it’s PHP 7.4.


r/PHPhelp • • Oct 22 '26

Have Alma turned off Upload progress in the PHP2Shell update?

Thumbnail reddit.com
1 Upvotes

r/PHPhelp • • Oct 21 '26

.PHP name in URL

3 Upvotes

I’m new to PHP, and I’m just coding for fun and for myself.
How can I remove the .php extension from my URLs?
For example, instead of www.test.com/profile.php, I want it to look like www.test.com/profile.
Any advice would be appreciated!


r/PHPhelp • • Oct 22 '26

ubuntu 16.04, upgrading for php 5.6.30

1 Upvotes

I asked run the andrej script, but seems failed. i asked chatgpt, it say that there is no support for ubuntu 16.04. The oldest version that sury.org support is 22.04. any bro can advise how I can patch my php5.6.30? thanks.


r/PHPhelp • • Oct 21 '26

FYI Upcoming Critical PHP Security Release - Oct. 21

19 Upvotes

https://www.php.net/archive/2026.php#2026-10-20-1

I know it’s not a help post, but an FYI for those who haven’t seen this.


r/PHPhelp • • Oct 21 '26

pecl.php.net seems very unreliable today

3 Upvotes

pecl.php.net seems very unreliable today

Hey all, not sure if it's just me but I'm having a lot of trouble with pecl even from Google cloud build. I get lots of gateway timeouts and other spurious errors.

Wondering if anyone else is experiencing the same issue today


r/PHPhelp • • Oct 20 '26

Curious to know how to build a Media downloader website

0 Upvotes

Hello community!!!

I saw multiple website which allows user to download media assets, Pinterest video, Youtube video etc. But how they are managing it. Because I have read that these platforms don't allow any website to scrap their data. Then how these downloader website running their websites year after years.


r/PHPhelp • • Oct 20 '26

Phpstorm taking up over 50GB of memory on Mac

6 Upvotes

Is anybody having the same issue with Phpstorm? I have never experienced this before. My whole Mac froze and had to restart it.

The project I had opened is not that huge, so I have no idea what is happening, but this is just really really bad...


r/PHPhelp • • Oct 19 '26

Symfony Console: Stderr?

Thumbnail reddit.com
1 Upvotes

r/PHPhelp • • Oct 19 '26

Backup & Restore page with PHP and MySQL (XAMPP)

0 Upvotes

Hey guys, hope y'all are well. I would like to if there is a programmable code method for backing up a database using XAMPP. I know it can be done manually by exporting files. But is there any alternative method? I would highly appreciate the advice. Kind regards,