php.ini changes but not effective in ubuntu

前端 未结 7 1123
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 02:31

I want change the limit of php upload file\'s size
And this is some information of my phpinfo.

Configuration File (php.ini) Path   /etc/php5/apache2         


        
相关标签:
7条回答
  • 2020-11-30 02:41

    I too had the same problem but then found that root permission is needed to edit php.ini file so just opened the terminal and wrote the following

    gksudo gedit /etc/php5/apache2/php.ini
    

    and it perfectly worked!!

    0 讨论(0)
  • 2020-11-30 02:43

    There is a good chance you didn't have permissions to modify the php.ini file. If you just browse to it via a normal folder window and click it Gedit (or whatever your default text editor is) won't be able to open it with write permissions.

    You should be able to get away by sudo nano /etc/php5/apache2/php.ini (then your password at the prompt) then changing the variables. Then be sure to Write Out (CTRL O) or make sure you confirm the save on exit.

    0 讨论(0)
  • 2020-11-30 02:43

    I have the same problem and this solve it I have foound php.ini inside folder /etc/php5/cli/php.ini I make changes to it

    and restart apache sudo apache2ctl restart

    I have already change /etc/php5/apache2/php.ini and restart apache by using sudo service apache2 restart but symfony doesn't see changes

    I write it , it may help anyone

    0 讨论(0)
  • 2020-11-30 02:45

    here is how i solved this issue on ubuntu after about 3 hours of debuging (PHP 7)

    steps

    1) run phpinfo() function and observe where the loaded php configuration file (php.ini) is

    2) cd into that directory and update it to the new values

    3) reboot your server

    4) it works !!

    0 讨论(0)
  • 2020-11-30 02:47

    For anyone wondering why the php.ini modification is not applied even after all directives are fine and restarting the apache on ubuntu, try restarting apache with sudo

    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-11-30 02:54

    I have solved my question.
    there is a syntax error in php.ini in line 109,so the next all syntax not excute

    0 讨论(0)
提交回复
热议问题