• Hi I am getting fatal errors on my dashboard and my host has advised to do the following:

    “Please create php.ini file and then put memory_limit = whatever memory you want to set. Once it’s done upload it to the directory where you are running that php script.”

    I don’t know how or what to do with this. I am not sure how to create the php.ini file (what code to add to it) or where I should place this folder once i am done..

    Can anyone help me out?
    Pleeeaaasssseee?

Viewing 6 replies - 1 through 6 (of 6 total)
  • PHP.ini is the php configuration settings file and where on your server it is stored is determined by the way your hosting has the server configured.

    Before you start making changes to your php.ini file try this plugin created by the core WordPress developers for that specific issue: https://www.ads-software.com/extend/plugins/memory-bump/

    I saw your other post and realized you already tried the memory bump plugin. On to Step 6:

    PHP.ini is the php configuration settings file. I uploaded a php.ini file to the pastbin you can use but please acknowledge my warning.

    The memory limit is on line 232 and is set at 64MB. This should be enough but it can be raised or lowered if needed.

    To determine the proper settings create a file with this code in it:

    <?php
    
     phpinfo()
    
    ?>

    Save this file as info.php and upload to your public_html directory and go to a web browser and go to https://yoursite.whatever/info.php

    Here is a sample of what this will look like when you run it: https://luckyco.com.tw/sample/phpinfo.php

    You need to get the include path, extension directory, and sendmail path from your files output and make the changes to the php.ini file I provided.

    <rant class="shity-hosting-providers">
    Please note that your hosting provider is taking advantage of you and giving you HORRIBLE customer support and any host worth a crap would do this for you in a heartbeat.  Especially if it is just to raise the allowed memory.
    </rant>

    ****WARNING***
    Without knowing the specifics of your hosts server configuration this might cause some server errors. Line 411 through 435 must be confirmed with your host or via a phpinfo() or it will not work!!

    Here is the file: https://wordpress.pastebin.com/D4xB3iJY

    Upload the php.ini to the root WordPress directory

    Please confirm with your host the directory paths needed in the file and make the changes.

    Thread Starter chrisebbeck

    (@chrisebbeck)

    Wow!
    Thanks for all the info. I test this out.

    Thanks heaps.

    Thread Starter chrisebbeck

    (@chrisebbeck)

    Ok I fixed this and it was very simple.

    I tried all of the following and none worked:
    1. If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 32M try 64M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

    2. If you don’t have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 64M

    3. Try adding this line to your wp-config.php file:
    Increasing memory allocated to PHP
    define(‘WP_MEMORY_LIMIT’, ’64M’);

    4. Talk to your host.

    I have no access to my php.ini file. So I created my own php.ini file with the following in it and added to my wp-admin folder.

    <? phpinfo(); ?>
    memory_limit = 128M

    and it is all fixed!
    So simple, I have been trying to work this out all week.

    Chris,
    I am glad you got it fixed and I learned something new. I always thought you had to use the whole php.ini config file and did not know you could use one that only changed one directive. Good job and thanks for following up so others can learn from it as well. It would be helpful to others if you added the above information to the codex.

    @chrisebbeck your a freeking lifesaver, Been looking searching assscrtching for weeks now. Just create php.ini and paste in the code and it works,

    now hope my server doesn’t sue me for it.

    Thanks Again!!!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP.ini file’ is closed to new replies.