Support » Localhost Installs » “Save” on php.ini file doesn’t stick

  • Can someone please address this question for me?

    I have a WAMP 4.9.7 local install.
    I opened the php.ini file in the apache2.4.33/bin folder and changed the max_upload_filesize setting so I could upload files that exceed the 2M default.

    Every time I do this, save the file, and reload WAMP, that setting I saved reverts back to the default. The other php.ini files in the wamp/php folder don’t do this.

    One odd thing, here: When I look at the php.ini file in question in the editor, it reads as php.ini; however, when I look at the file listing in file manager, it shows the file as a “.symlink” type.

    Any help is appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Load the phpinfo() page from the WAMP panel, and find the “Loaded Configuration File” row (it’s near the top). That’s the file you should be editing.

    Yep.
    That’s the one.
    Done this many times over the years.
    Always worked.
    Don’t get it.
    This is simple, chimpanzee stuff:

    Open the php.ini file,
    change upload_max_filesize to 20M,
    change post_max_size to 25M,
    memory_limit is already set to 128M,
    save the file.
    From there, everything I do fails.

    Attempt song file upload through audio widget.
    Warning:
    “American BluesTrack01Various.mp3 exceeds the maximum upload size for this site.”
    Song is 6.72M. WordPress says max upload size is 2M.

    Log out of WP,
    Log back in,
    Attempt upload: Same message. WordPress says max upload size is 2M.

    Close WAMP,
    Reload WAMP,
    Attempt upload: Same message. WordPress says max upload size is 2M.

    Here’s the kicker:
    Reopen php.ini,
    The settings I changed are back to the default:
    upload_max_filesize is 2M,
    post_max_size is 8M.
    Does this every time.

    As I mentioned in the original post: Somehow, after I change and save the php.ini file, it always reverts back to the defaults when I exit and reload WAMP.

    I’ve never seen this. Why does the php.ini file revert to defaults?

    Thanks for your insights.

    If PHP is being loaded as an Apache module (mod_php), it’s possible that PHP is being reset by something in your Apache configuration. Check httpd.conf and your .htaccess files to verify this isn’t happening.

    Are you restarting Apache/PHP after making the changes?

    Hey, Dion:
    Thanks again for taking a look at this.

    I checked httpd.conf and didn’t see anything that looked obvious. Alas, I’m not much up to speed on what I’d be lookin’ for, but I know enough to dig.

    I searched the httpd.conf file for “php” and “mod_php” and didn’t find anything that looked obvious. Same thing in the .htaccess files.

    Am I restarting “Apache/PHP” after making changes?
    Well, I don’t know. I don’t know how to do that by itself. However, whenever I Exit WAMP and restart it, I always wait for the little WAMP icon thingy in the taskbar to go from Red to Orange to Green, then I click on it to open the WAMP panel and select “Start All Services.”

    Does that start “Apache/PHP”?

    This has got me. It’s almost got to be a setting somewhere; however, when I set up this site, I just installed WAMP like I always have and done nothing to it except open the php.ini and change these values, like I always have. Strange.

    I’m gonna reload all the core WAMP files and see if that does any good.

    I appreciate any help anyone has to offer, here.

    You might want to ask for help on the WAMPserver forum:

    http://forum.wampserver.com/list.php?2

    Thanks, Dion.
    I’ll do that.

    PROBLEM SOLVED.
    Thanks again, Dion, for pointing me to the WAMP forum. That should have been the first place I looked.

    DUH!

    To solve the problem:
    Start WAMP server.
    Wait for the WAMP icon in the taskbar to turn green.
    Left click on the icon.
    Select PHP, php settings, upload_max_filesize,
    Then change it.
    This changes the setting in php.ini.

    Lots of other stuff you can change here as well.
    In all the time I’ve worked with WAMP, I never knew how to do this.
    No longer any need to edit the php.ini file manually.
    How ’bout that?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.