Even if I change the /etc/php/8.2/apache2/php.ini

Even if I change the /etc/php/8.2/apache2/php.ini

Doulos Xavier發表於
Number of replies: 13

Even if I change the 'upload_max_filesize' in  /etc/php/8.2/apache2/php.ini the upload file size is not changing. Any idea what could me wrong

評比平均分數: -
In reply to Doulos Xavier

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
(In Moodle) Site admin > Server > PHP Info

Near the top is the list of .ini files that were loaded. Is the one you changed included?

If so, on the same page, find upload_max_filezsize. What does it say (both columns)?
In reply to Doulos Xavier

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Emma Richardson發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片
Did you restart apache after the change? You also need to change post_max_size btw
In reply to Doulos Xavier

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Ken Task發表於
Particularly helpful Moodlers的相片

Some questions those responding here need to ask of the OP ...

Criteria for the OP's 'migration' (see other thread by OP on migration):
1. Same FQDN.  
2. Almost 0 down time.   
3. No loss of data.   

Note: the 'consultant' involved has said that a site migration is 'too risky'.

Your current servers have 4.1's of moodle.   Those versions cannot run under php 8.2.   So this must be about a new server.   Can't have 2 stand alone servers on the internet by the same FQDN ... so criteria 1 hasn't been met.

Questions ... for thought/planning ...
What have you done on new server to prep for taking on course backups?
The server from which this backup came, did it use an authentication other than manual for the course you are attempting to restore?   How about other 3rd party plugins?   Same theme?

The file you are trying to upload, is it an .mbz file - course backup from current server?
How large is the .mbz file?
How many courses will you have to restore? ... negates criteria 2 above.

If you do get this course backup restored, if the users in the course have been informed of a new location and login, will they find something missing?  Restore of a course with all user data up to date is only as good as how long it took to restore the course .... and if you didn't shut off access to this course on current server and users did anything in the current location of the course, that activity will not be in the course that you restored.  Thus criteria 3 (no loss of data) is questionable.

All in all, none of the criteria will be met - 100% - ... so will teachers/participants/your boss be 'happy'?

My first and last '2 cents' in this thread!

'SoS', Ken

In reply to Ken Task

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
In reply to Howard Miller

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Ken Task發表於
Particularly helpful Moodlers的相片

Ok, I lied ... one more response ... @Howard ... yeah, that's the one.

The path and file /etc/php/8.2/apache2/php.ini is an indication OP's server has a Plesk/cPanel interface into the config of PHP per domain.   Normally, at the top of the config file there is a warning about manually editing - which should be heeded.

On such VPS systems, /var/www/ (the typical home directory for apache) isn't accessible via the GUI ... only via command line.   Instead, the user account is made part of sudo groups and the document roots are in /home/[userlogin]/public_html or public.

As evidenced by OP's other posting and the obsecured group name and comment about 'slightly different structure'.

For such systems, there might be a /home/[userlogin]/public/domainname directory.   In OP's case there will probably be multiple domainname directories.

On old system ... there were 3 instances of moodle by different FQDN's.

Am gathering that OP is attempting what the 'other consultant' advised ... make course backups from the 4.1 systems and restore them to newly installed moodle instances on new server - which is a valid route, if one doesn't have thousands of courses.

Of course, if that becomes the standard proceedure for this OP, in a few years time, the version of moodle installed will become obsolete and OP will take the same approach ... which means another server - more hassle, etc.   Oh, well!

'SoS', Ken

In reply to Ken Task

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Doulos Xavier發表於
This is unrelated to any of the forum post. This a new test instance I created on my local computer using VMWare Workstation
In reply to Doulos Xavier

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Thom Rawson發表於
Moodle HQ的相片 Particularly helpful Moodlers的相片
If you are using PHP with FastCGI (php8.2-fpm) instead of the Apache2 mod, then the php.ini file will be found in /etc/php/8.2/fpm directory... it is confusing to have multiple php.ini files.

Also, important to restart php8.2-fpm (or apache2) depending on where you changed it (as Emma suggested).
評比平均分數:Useful (2)
In reply to Thom Rawson

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Doulos Xavier發表於
Just to let you know the Moodle version is Moodle 4.4.7 (Build: 20250317)
 
image.png

Loaded Configuration File '/etc/php/8.2/apache2/php.ini'
 
In the php.ini file, the 'upload_max_filesize = 400M'
 
I changed here as well  '/etc/php/8.2/fpm'
 
I restarted Aapache but still this is showing 
 
image%20%281%29.png
 
評比平均分數:Useful (1)
In reply to Doulos Xavier

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
Have you checked 'upload_max_size' and 'post_max_size' in Site admin > Server > PHP Info? In each case BOTH columns need to say 400M
In reply to Howard Miller

Re: Even if I change the /etc/php/8.2/apache2/php.ini

Doulos Xavier發表於
Nothing worked for me. Did some ChatGPT query, it gave me this, and these steps worked. 

sudo nano /etc/php/8.2/apache2/conf.d/99-custom-settings.ini

Added the following lines:
upload_max_filesize = 1000M
post_max_size = 1000M

sudo systemctl restart apache2

Created a info.php in sudo nano /var/www/html/info.php now if go to http://192.168.18.151/info.php is showing
upload_max_filesize 1000M
 
Now the 'Maximum uploaded file size' is showing 1000MB
 
image.png