**New site, first uploads, I tried to upload a file of 2.44 MB, and got a size error - To big.
So I went into Apache2 (Windows) setup directory and changed the file upload size llmit:
thank you, I think I has already checked on all of these things.
I have to first now figure out a different error (I changed files_dir and it broke everything!).
I did a re-install to avoid previous configuratoi errors.
So now again have the file-size limit.
I did the typical change in the php file: /etc/php/8.3/apache2/php.ini
to set: upload_max_filesize=8M (was 2M),
but on larger uploads I still get the larger than 2M limit.
do I need to restart the PHP web-server?
And some other threads on this say one “may” need to change apache parameters, where and how?
One thread says he had to change the “Global Global PHP configuration” and setting the limitations there has resolved it. I’m not sure what this is.
This is more of an Apache/PHP question than an OJS question; OJS just needs the Apache and PHP upload limits to be set appropriately. You might find better resources on e.g. StackOverflow. But typically yes, you will have to restart your Apache service when its configuration changes, and likewise if PHP is running as a service.
I installed per the online instructions, and they gave the PHP web server as the default, so I think it is being used, not Apache.
As you note it is a often encountered issue, and there are many queries, and it would seem like it would be useful to have some simple good resolution included with the OJS installation notes or procedures.
The StackOverflow post yo reference is also good, but note that it includes several different possible solutions, no single one that matches a standard install.
It is also somewhat dated, as the use of .htaccess files is no longer recommended for Apache.
And several “solutions” users have posted in the PKP forums, are vague or uninformative on the actual details. (“I changed the global PHP parameters…”) And they don’t agree on what is needed, nor what is a solution.
I did change the php.ini file size limits as often noted and restarted Apache, but that did not fix it. Presumably because it is using the PHP server as in the setup notes, Apache is not involved.
I will investigate further.
Unfortunately we can’t give more specific instructions, as the details will depend on your server. Typically the most specific place to get information is your ISP’s knowledge base if they have one, as only they will know their own server configuration. For example, for a2hosting clients, there’s this knowledge base article. If you are running your own server, you’ll have to get to know its particular setup.
Regards,
Alec Smecher
Public Knowledge Project Team
Thank you. the referenced article just repeats the standard “update php.ini limits” advice. Most all php & Apache installations are the same, so I think that a basic setup would suffice for most all new installs.
I do appreciate that you give software support(!), and am just suggesting that counting the number of queries and range of various suggestions for remedy, this might be something to include in FAQs.
Thanks again.
PS: I did change the php.ini file size limit, and restarted the hp server (php -S myserver.org:8000), but it did not fix the upload size limit.
As above, since I followed the installation instructions that use the PHP server, I don’t think Apache is involved - yes?!
This will give you direct access to information about your PHP configuration. Check the upload_max_filesize and post_max_size values there to ensure that they match your expectations.
Regards,
Alec Smecher
Public Knowledge Project Team
OK, I got it - changing the php.ini files and all the others as above, then kill and restart the “php -S …” server, it picks up the changes.
I did not try to find which of the changes was the critical one, but together it worked.
I think a main diversion is that because this runs from a PHP server, apache configurations and restarts are not relevant.