0

I got error in my laravel project 413 (Payload too large) on ajax post.

Now I edited the post_max_size & upload_max_filesize on php.ini file in my /etc/php/7.1/cli/php.ini.

Now I want to restart apache server since I updated the php.ini file.

I have done this

/etc/init.d/apache2 restart

And still got the error.

Is there something missing? Hope anyone can help me. Thanks

Jin
  • 3
  • I think you need different php.ini file, see https://askubuntu.com/questions/356968/find-the-correct-php-ini-file – pLumo Mar 06 '20 at 08:32

4 Answers4

1

You can restart server by following command

sudo systemctl restart apache2

Hope this will work for you

0

as stated in the comment, thats true. You have to modify correct ini at correct path. You have just changed only the cli configuration (PHP called from bash or so (cli)).

So the path should be: /etc/php/7.1/apache2/php.ini.

But it depend on Your distro .. etc

jobrik
  • 106
0

If you use php-fpm you will need to restart this service too. Try

systemctl restart php7.<X>-fpm.service

where X is the version number of your php

s1mmel
  • 2,024
0

Press ctrl+Alt+t then run this command

sudo service apache2 restart