Live Blog

Openlitespeed, GridPane and PHP Dropping the M in memory_limit

Content Error or Suggest an Edit

Notice a grammatical error or technical inaccuracy? Let us know; we will give you credit!

Introduction

This is a super strange situation where a GridPane user had migrated sites to/from an Openlitespeed server and the the PHP configuration was not properly copied over and dropped the M on the memory_limit setting with PHP.

What happens to PHP when you drop the M in memory_limit

So what happens when you set PHP’s memory_limit to 256 instead of 256M? It doesn’t actually run out of memory, it just errors out. Here is an example error that occurred.

2025-02-06 10:36:47.961864 [NOTICE] [399111] [127.0.0.1:58468-3>127.0.0.2#domain.com:lsapi] [STDERR] PHP Fatal error:  Failed opening required '/var/www/domain.com/htdocs/index.php' (include_path='.:') in Unknown on line 0

This was a super strange error message, it made no sense, the client had a wild guess and checked the memory settings and noticed that memory_limit was set to 256 and not 256M which was the result of migrating sites from a server sync.

I wanted to post this, incase someone found this error and was pulling their hair out.

0 Shares: