Setting PHP Memory Limits

#1
Hi everyone,

This particular issue seems intent on causing me premature hair loss. At the moment, I've got a WordPress site being served up by OpenLiteSpeed 7.7 on Ubuntu 20.04 Server. The Media Uploader within WordPress reports that the maximum file size is 8MB. For most things, this will be fine - it will though cause an issue down the line with a podcast I plan in recording and releasing for the site, where the MP3 files are likely to be larger than 8MB.

When I create a file that generats output from PHPInfo, it tells me that the Loaded Configuration File is
/usr/local/lsws/lsphp73/etc/php/7.3/litespeed/php.ini.

I've made the following changes to this file:

upload_max_filesize = 128M
post_max_size = 128M

However, when I do this WordPress still reports the max filesize as 8MB, with PHPInfo reporting the post_max_size as 8M and the upload_max_filesize as 64M.

I have made the same additions to the .htaccess file in the directory that serves the website, however I have had similar results - nothing changes.

In each case where I've made changes, I have restarted the web server with the command 'sudo service lsws restart'.

I'm sure I'm missing something very trivial in the frustration of trying to get this issue sorted. But it just does seem to elude me. Any suggestions as to what this might be would be appreciated.
 
#4
OK what I'm noticing now is that upload_max_filesize = 128M now reflects the 128MB upload size but post_max_size is still limited to 8. So it's picking up one of the two.....

Edit: Finally nailed it. It seems that PHP gets a bit funky when you have the post_max_size directive included twice :) At least that one's on me....
 
Top