php.ini used by the server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pitu
    Junior Member
    • Apr 2004
    • 24

    #1

    php.ini used by the server

    Hello,

    I was wondering if it is possible to get a copy of the "default" php.ini file used on the server

    I just wish to change only certain things in that php.ini file without modifying the other settings. [to be used in my directories]

    Example:
    Adding a php.ini with just one line as:
    include_path = ".:/home/some_path"
    will effectively work for the path, but will also change other settings...

    So I think it is best to add the full php.ini file at every time there are some minor changes.

    Did someone have this problem...

    thank you for any suggestions
  • Jonathan
    Senior Member
    • Mar 2004
    • 1229

    #2
    Originally posted by pitu
    Hello,

    I was wondering if it is possible to get a copy of the "default" php.ini file used on the server

    I just wish to change only certain things in that php.ini file without modifying the other settings. [to be used in my directories]

    Example:
    Adding a php.ini with just one line as:
    include_path = ".:/home/some_path"
    will effectively work for the path, but will also change other settings...

    So I think it is best to add the full php.ini file at every time there are some minor changes.

    Did someone have this problem...

    thank you for any suggestions
    I don't think you can use the php.ini thats on the server;
    I do believe some things like include path can be done in your own php.ini
    but I am unsure how this works, since I have not tried myself.
    "How can someone be so distracted yet so focused?"
    - C

    Comment

    • Frank Hagan
      Senior Member
      • Mar 2004
      • 724

      #3
      I think he wants to know whats IN the php.ini on the server so he can issue commands in his individual folders that do not conflict with what the server has.

      Maybe a trouble ticket is the way to go on this one, letting support know what server you are on, in case they are not entirely identical.

      Comment

      • -Oz-
        Senior Member
        • Mar 2004
        • 545

        #4
        i was told a bit ago i could not get a php.ini due to the security issues it could cause.
        Dan Blomberg

        Comment

        • pitu
          Junior Member
          • Apr 2004
          • 24

          #5
          As Frank Hagan said I just want to know what is in the original .ini file so that I could alter only things I need (and understand its consequences) and leave the rest that i dont need nor understand intact... for use in my individual folders.

          We can all see our phpinfo files and I've seen links to the phpinfo file from this forum so I dont really understand the security issue involved...

          Comment

          • AndrewT
            Administrator
            • Mar 2004
            • 3655

            #6
            We will not provide you with the entire file nor should you even use it. You just need to put the settings that you need changed into the php.ini. You can view what they are currently set to from phpinfo().

            Comment

            • pitu
              Junior Member
              • Apr 2004
              • 24

              #7
              I will not insist on demanding the ini file. I'll manage.

              But people should know that changing only some settings int the .ini can affect others as well.

              Proof
              the regular phpinfo file ishere

              than a php.ini file has been added in another dir with only one line like this:
              include_path = ".:/home/some_path"
              This is altering the include_path but also the register_globals setting (from On to Off).

              The other phpinfo file is here

              So just changing the include_path in the .ini file changed the register_globals setting also.

              It may be a particular case or a bug, but I prefer to add a complete .ini file than to examine at each time what else might have changed in the settings.

              Comment

              • alex
                Junior Member
                • Dec 2004
                • 2

                #8
                Originally posted by pitu
                I will not insist on demanding the ini file. I'll manage.

                But people should know that changing only some settings int the .ini can affect others as well.

                Proof
                the regular phpinfo file ishere

                than a php.ini file has been added in another dir with only one line like this:
                include_path = ".:/home/some_path"
                This is altering the include_path but also the register_globals setting (from On to Off).

                The other phpinfo file is here

                So just changing the include_path in the .ini file changed the register_globals setting also.

                It may be a particular case or a bug, but I prefer to add a complete .ini file than to examine at each time what else might have changed in the settings.
                Why after upload my php.ini - Zend Optimizer is off?

                Comment

                • Byon
                  Junior Member
                  • Mar 2004
                  • 18

                  #9
                  I ran into this problem as well. I wanted to bump the max upload file size to something greater than 2MB, but when I created a local php.ini file with that entry raised to 5MB, other PHP items behaved differently. I figured the best solution would be to ask for a copy of the system php.ini and then add my change to that, but I guess I shouldn't bother, now.

                  If anyone creates a local php.ini that seems to match most of the settings in PHPInfo, please post it here, if Andrew will allow it.

                  Comment

                  • hobbes
                    Junior Member
                    • Jul 2004
                    • 2

                    #10
                    I need this file as well; I just installed Gallery 2.0 and when I bump up the upload limit to 5MB using the setting in php.ini, I can no longer upload ANY files at all (presumably because another setting has been changed due to my new php.ini file.)

                    Anyone have any tips? Thanks!

                    Comment

                    • Digishack
                      Junior Member
                      • Nov 2005
                      • 2

                      #11
                      Originally posted by hobbes
                      I need this file as well; I just installed Gallery 2.0 and when I bump up the upload limit to 5MB using the setting in php.ini, I can no longer upload ANY files at all (presumably because another setting has been changed due to my new php.ini file.)

                      Anyone have any tips? Thanks!
                      Hi,

                      I also need to increase the upload limit in Gallery (version 1.4.4). If anyone knows what to add to php.ini, can you please help me. Also what directory would I place the php.ini file in?

                      Thanks in advance

                      Comment

                      • dficken
                        Junior Member
                        • Apr 2004
                        • 9

                        #12
                        For what it's worth...
                        I ran into the same file upload cap problem.
                        I created a text file with these 2 entries in it (and nothing else)...

                        post_max_size = 10M
                        upload_max_filesize = 10M


                        Then saved it as php.ini and put it in the same directory as my php script (that i was using to do file uploads with).

                        This solved my problem.
                        Regards,
                        Dale.

                        Comment

                        • Byon
                          Junior Member
                          • Mar 2004
                          • 18

                          #13
                          Found my mistake

                          Originally posted by Byon
                          I ran into this problem as well. I wanted to bump the max upload file size to something greater than 2MB, but when I created a local php.ini file with that entry raised to 5MB, other PHP items behaved differently. I figured the best solution would be to ask for a copy of the system php.ini and then add my change to that, but I guess I shouldn't bother, now.

                          If anyone creates a local php.ini that seems to match most of the settings in PHPInfo, please post it here, if Andrew will allow it.
                          Just to follow up...

                          I discovered my mistake. Turns out that when you declare a new php.ini, one of the settings that gets changed is register_globals goes from on to off. This was breaking my code. I found this by comparing a phpinfo(); dump with an without an empty php.ini. There were other settings changed too.

                          And, I now know about the dangers of using register_globals. I'll work to remove my dependency on it in the future.

                          Byon

                          Comment

                          • moishe
                            Junior Member
                            • Jan 2006
                            • 7

                            #14
                            I'm using php sessions ($_SESSION etc) and when I put a php.ini file in a directory where my code is stored, the sessions no longer work. It appears that the session no longer stores the values I set when i have a custom ini file.

                            The only thing I used the file ini file for was increasing the max upload size.

                            Any ideas?

                            Comment

                            • Buddha
                              Senior Member
                              • Mar 2004
                              • 825

                              #15
                              If you haven't changed anything then by default sessions are stored in /tmp. /tmp is purged on a regular basis by the server - wiping out your sessions. You need to setup your own folder for storing sessions using your php.ini file. Lookup session.save_path.
                              "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

                              Comment

                              Working...