Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: php.ini changes not taking effect

  1. #1

    Default php.ini changes not taking effect

    I'm trying to change one or two of the php settings

    I've set the directives in /etc/php5/apache2/php.ini and restarted apache but they're not taking effect

    Example

    From php.ini:

    short_open_tag = On


    From phpinfo:

    short_open_tag Off Off


    I even set the same values in /etc/php5/cli/ini.php

    For some reason the changes to php.ini aren't being recognised, could the values it's actually picking up be stored somewhere else?

    Or is it more likely that apache just isn't 'finding' php.ini?

  2. #2
    Join Date
    Mar 2008
    Location
    Vsters, Sweden ex. Highbury London UK
    Posts
    1,245

    Default Re: php.ini changes not taking effect

    Are you doing this with root permissions?
    Core 2 Duo 3.16GHz, 8GB DDR2, 3.5TB, GeForce 9600 GT, Amilo LCD 26", OS 11.1 x86_64, KDE4.2.4 (2)
    My wine tips & tricks

  3. #3

    Default Re: php.ini changes not taking effect

    Yes m8

    It wouldn't be allowing me to make changes to php.ini and save them if I wasn't

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: php.ini changes not taking effect

    Works fine here, I changed mine, viewed phpinfo, then changed back and viewed phpinfo. Everything as expected. Make sure you aren't getting a cached page from the web browser, that you really have restarted the apache server, that you are not using some non-SUSE php5 module, and that you are looking at the right webserver.

  5. #5

    Default Re: php.ini changes not taking effect

    Even when I viewed it from a browser on a completely different machine it doesn't show the changes

    I've completely rebooted the machine let alone restarted apache

    It's a fairly fresh suse 11 install and I've only ever installed apache/php/mysql into it through Yast

    It's definitely the right server

    I did see something about environment variables during a google, but I'm not sure which ones I should have for changes to php.ini to work, or how to view and change them

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: php.ini changes not taking effect

    Other things to check:

    Check that you haven't got multiple definitions for short_open_tag in php.ini or any of the included ini files in /etc/php5/conf.d. Presumably the last setting wins.

    Also check that you haven't overridden the setting in an Apache config file or .htaccess file using php_flag directives. See here: Custom PHP.ini tips and tricks

  7. #7

    Default Re: php.ini changes not taking effect

    Thanks ken

    I have to go out so I'll check on those later

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: php.ini changes not taking effect

    And of course make sure you have spelled the option correctly, maybe you missed a _. It may be stupid, but such things happen. I have done things like transposed digits in IP numbers and spent minutes wondering what the problem was.

  9. #9

    Default Re: php.ini changes not taking effect

    Checked all of that m8, and as far as I can tell it's none of those

    Does it maybe rely on something being installed that perhaps I don't have?
    Last edited by Ecky; 28-Sep-2008 at 16:23. Reason: typo

  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: php.ini changes not taking effect

    Nothing special required. This is an interesting case. I'm curious what it turns out to be.

Page 1 of 3 123 LastLast

Posting Permissions

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