Results 1 to 5 of 5

Thread: Not finding PHP.ini file

  1. #1
    Join Date
    Jul 2019
    Beans
    1

    Not finding PHP.ini file

    I want to increase upload size in WordPress. I have done everything and now I am finding the php.ini file but it's not there what should I do? Create a new one because if I am having issues in searching and If I create a new file then the previous one I think will be overwrite. I have gone through a tutorial to <URL snipped> increase upload size in WordPress and there I have seen that selecting Show hidden files will enabled the php.ini file but still I am not finding the file. Any help please? I want to updated the code in PHP.ini file.

    upload_max_filesize = 20M
    post_max_size = 25M
    memory_limit = 30M
    Last edited by coffeecat; 3 Weeks Ago at 09:57 PM. Reason: removed link

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,223
    Distro
    Kubuntu 19.04 Disco Dingo

    Re: Not finding PHP.ini file

    Ubuntu creates two different versions of php.ini, one tied to Apache, and one for the command-line php program. Installing PHP on my 19.04 system created
    Code:
    /etc/php/7.2/apache2/php.ini
    /etc/php/7.2/cli/php.ini
    On older versions of Ubuntu "7.2" would be replaced with whatever PHP version you're running. These files are owned by the root user, so you will need to use sudo to edit them, e.g, "sudo nano /etc/php/7.2/apache2/php.ini".

    For WordPress, you obviously need to modify the version in the apache2 directory.

    The handy utility "locate" is your friend and installed by default. Typing "locate php.ini" will show you the locations of all files or directories with "php.ini" in their full paths.

    Code:
    $ locate php.ini
    /etc/php/7.2/apache2/php.ini
    /etc/php/7.2/cli/php.ini
    /usr/lib/php/7.2/php.ini-development
    /usr/lib/php/7.2/php.ini-production
    /usr/lib/php/7.2/php.ini-production.cli
    However the database for locate is only updated once each day. Files created since the last update will be missed. You can force an update with the command "sudo updatedb" before running locate to find more recent files.
    Last edited by SeijiSensei; 4 Weeks Ago at 02:06 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Not finding PHP.ini file

    The Tutorials section is for posting tutorials, not for requesting help.

    You don't specify your operating system, or release, but making the assumption that you are using Wordpress on an Ubuntu server: thread moved to Server Platforms.

    If you provide details of the system you are using, forum members will be in a better position to help.
    Ubuntu 16.04 Desktop Guide - Ubuntu 18.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,223
    Distro
    Kubuntu 19.04 Disco Dingo

    Re: Not finding PHP.ini file

    Hello, Amanda???

    None of us is paid to provide help here, and it is rude to ask a question and not reply to any suggestions you receive.

    Did you read my "signature" at the bottom of my post? Here it is again:
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Not finding PHP.ini file

    @SeijiSensei, agreed.

    In case this is blog spam, I have now removed the link from the OP. It's certainly a drive-by and I will be surprised if the OP comes back again.

    I suggest all forum members desist from responding unless and until the OP posts again.
    Ubuntu 16.04 Desktop Guide - Ubuntu 18.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •