Changes to php.ini not being read through

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jack Lindamood

    Changes to php.ini not being read through

    PHP 5.1, Windows Server 2003, IIS 6, isapi

    I changed a line in the php.ini file to
    extension_dir = "c:\php\ext "
    but when I load my phpinfo page it shows
    extension_dir C:\php5

    It's like my change didn't take effect.

    I restarted the world wide web publishing service, but still the same
    thing. What do I do to make the change take effect? I cannot simply
    reboot the server. It is remote and hangs on restart, so I have to do
    this without a reboot.

    Thanks,

    Jack
  • Sean

    #2
    Re: Changes to php.ini not being read through

    Do a search on the machine for php.ini, there might be more than one
    ..ini file if you had php installed before.

    There might be an ini file in the windows system dir and c:\php.

    Comment

    • Jack Lindamood

      #3
      Re: Changes to php.ini not being read through

      Sean wrote:[color=blue]
      > Do a search on the machine for php.ini, there might be more than one
      > .ini file if you had php installed before.
      >
      > There might be an ini file in the windows system dir and c:\php.
      >[/color]


      Nope. It's the only one on my machine. I was able to change the error
      level with no problem a while back, but can't seem to get this to stick.

      Comment

      • Sean

        #4
        Re: Changes to php.ini not being read through

        Since php is not a service it should really be reading in the .ini file
        each time it is called.

        I would check the phpinfo file just to make sure that the location of
        the ini file that is printed out there is the same one as the one I am
        editing. (Called Configuration File Path).

        If it is then I would changed the location of the php.ini file. If it
        was in the folder c:\php then move it to the windows system dir and see
        if that makes a difference or visa versa.

        If the php.ini file has been edited heavily then download a new one and
        see if that makes a difference. Just get it from the zip archive from
        the latest release.

        Hope that helps.

        Comment

        • Jack Lindamood

          #5
          Re: Changes to php.ini not being read through

          I moved php.ini to c:\windows and I called phpinfo:
          Configuration File (php.ini) Path C:\WINDOWS
          I goto C:\windows and move it back to c:\php. Reload phpinfo:
          Configuration File (php.ini) Path C:\WINDOWS
          Both clear my browser cache and try it with a different browser:
          Configuration File (php.ini) Path C:\WINDOWS
          I goto c:\windows:
          php.ini is not there anymore
          Do an F3 search:
          php.ini is only in c:\php
          My extension directory line from phpinfo:
          extension_dir C:\php5
          My extension directory line from php.ini:
          extension_dir = "c:\php\ext "
          I do a search inside the file php.ini for the string "php5":
          Cannot find "php5"

          I don't believe I've done heavy editing to this file at all. Just
          changed the error reporting level. Shouldn't php complain if the file
          is corrupt? How could it be finding a phantom php file?

          Thanks for the help,

          Jack


          Sean wrote:[color=blue]
          > Since php is not a service it should really be reading in the .ini file
          > each time it is called.
          >
          > I would check the phpinfo file just to make sure that the location of
          > the ini file that is printed out there is the same one as the one I am
          > editing. (Called Configuration File Path).
          >
          > If it is then I would changed the location of the php.ini file. If it
          > was in the folder c:\php then move it to the windows system dir and see
          > if that makes a difference or visa versa.
          >
          > If the php.ini file has been edited heavily then download a new one and
          > see if that makes a difference. Just get it from the zip archive from
          > the latest release.
          >
          > Hope that helps.
          >[/color]

          Comment

          • Jerry Stuckle

            #6
            Re: Changes to php.ini not being read through

            Jack Lindamood wrote:[color=blue]
            > I moved php.ini to c:\windows and I called phpinfo:
            > Configuration File (php.ini) Path C:\WINDOWS
            > I goto C:\windows and move it back to c:\php. Reload phpinfo:
            > Configuration File (php.ini) Path C:\WINDOWS
            > Both clear my browser cache and try it with a different browser:
            > Configuration File (php.ini) Path C:\WINDOWS
            > I goto c:\windows:
            > php.ini is not there anymore
            > Do an F3 search:
            > php.ini is only in c:\php
            > My extension directory line from phpinfo:
            > extension_dir C:\php5
            > My extension directory line from php.ini:
            > extension_dir = "c:\php\ext "
            > I do a search inside the file php.ini for the string "php5":
            > Cannot find "php5"
            >
            > I don't believe I've done heavy editing to this file at all. Just
            > changed the error reporting level. Shouldn't php complain if the file
            > is corrupt? How could it be finding a phantom php file?
            >
            > Thanks for the help,
            >
            > Jack
            >
            >
            > Sean wrote:
            >[color=green]
            >> Since php is not a service it should really be reading in the .ini file
            >> each time it is called.
            >>
            >> I would check the phpinfo file just to make sure that the location of
            >> the ini file that is printed out there is the same one as the one I am
            >> editing. (Called Configuration File Path).
            >>
            >> If it is then I would changed the location of the php.ini file. If it
            >> was in the folder c:\php then move it to the windows system dir and see
            >> if that makes a difference or visa versa.
            >>
            >> If the php.ini file has been edited heavily then download a new one and
            >> see if that makes a difference. Just get it from the zip archive from
            >> the latest release.
            >>
            >> Hope that helps.
            >>[/color][/color]

            Did you restart your web server?

            And please don't top post.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • Jack Lindamood

              #7
              Re: Changes to php.ini not being read through


              Jerry Stuckle wrote:[color=blue]
              > Jack Lindamood wrote:
              >[color=green]
              >> I moved php.ini to c:\windows and I called phpinfo:
              >> Configuration File (php.ini) Path C:\WINDOWS
              >> I goto C:\windows and move it back to c:\php. Reload phpinfo:
              >> Configuration File (php.ini) Path C:\WINDOWS
              >> Both clear my browser cache and try it with a different browser:
              >> Configuration File (php.ini) Path C:\WINDOWS
              >> I goto c:\windows:
              >> php.ini is not there anymore
              >> Do an F3 search:
              >> php.ini is only in c:\php
              >> My extension directory line from phpinfo:
              >> extension_dir C:\php5
              >> My extension directory line from php.ini:
              >> extension_dir = "c:\php\ext "
              >> I do a search inside the file php.ini for the string "php5":
              >> Cannot find "php5"
              >>
              >> I don't believe I've done heavy editing to this file at all. Just
              >> changed the error reporting level. Shouldn't php complain if the file
              >> is corrupt? How could it be finding a phantom php file?
              >>
              >> Thanks for the help,
              >>
              >> Jack
              >>
              >>
              >> Sean wrote:
              >>[color=darkred]
              >>> Since php is not a service it should really be reading in the .ini file
              >>> each time it is called.
              >>>
              >>> I would check the phpinfo file just to make sure that the location of
              >>> the ini file that is printed out there is the same one as the one I am
              >>> editing. (Called Configuration File Path).
              >>>
              >>> If it is then I would changed the location of the php.ini file. If it
              >>> was in the folder c:\php then move it to the windows system dir and see
              >>> if that makes a difference or visa versa.
              >>>
              >>> If the php.ini file has been edited heavily then download a new one and
              >>> see if that makes a difference. Just get it from the zip archive from
              >>> the latest release.
              >>>
              >>> Hope that helps.
              >>>[/color][/color]
              >
              > Did you restart your web server?
              >
              > And please don't top post.
              >[/color]

              I can't reboot the server, but I did restart the World Wide Web
              Publishing Service. Is that the correct way to restart the server? The
              last post seemed to indicate the php.ini file was reprocessed each time
              php is called. Is that correct?

              Comment

              • Jack Lindamood

                #8
                Re: Changes to php.ini not being read through

                Jack Lindamood wrote:[color=blue]
                >
                > Jerry Stuckle wrote:
                >[color=green]
                >> Jack Lindamood wrote:
                >>[color=darkred]
                >>> I moved php.ini to c:\windows and I called phpinfo:
                >>> Configuration File (php.ini) Path C:\WINDOWS
                >>> I goto C:\windows and move it back to c:\php. Reload phpinfo:
                >>> Configuration File (php.ini) Path C:\WINDOWS
                >>> Both clear my browser cache and try it with a different browser:
                >>> Configuration File (php.ini) Path C:\WINDOWS
                >>> I goto c:\windows:
                >>> php.ini is not there anymore
                >>> Do an F3 search:
                >>> php.ini is only in c:\php
                >>> My extension directory line from phpinfo:
                >>> extension_dir C:\php5
                >>> My extension directory line from php.ini:
                >>> extension_dir = "c:\php\ext "
                >>> I do a search inside the file php.ini for the string "php5":
                >>> Cannot find "php5"
                >>>
                >>> I don't believe I've done heavy editing to this file at all. Just
                >>> changed the error reporting level. Shouldn't php complain if the
                >>> file is corrupt? How could it be finding a phantom php file?
                >>>
                >>> Thanks for the help,
                >>>
                >>> Jack
                >>>
                >>>
                >>> Sean wrote:
                >>>
                >>>> Since php is not a service it should really be reading in the .ini file
                >>>> each time it is called.
                >>>>
                >>>> I would check the phpinfo file just to make sure that the location of
                >>>> the ini file that is printed out there is the same one as the one I am
                >>>> editing. (Called Configuration File Path).
                >>>>
                >>>> If it is then I would changed the location of the php.ini file. If it
                >>>> was in the folder c:\php then move it to the windows system dir and see
                >>>> if that makes a difference or visa versa.
                >>>>
                >>>> If the php.ini file has been edited heavily then download a new one and
                >>>> see if that makes a difference. Just get it from the zip archive from
                >>>> the latest release.
                >>>>
                >>>> Hope that helps.
                >>>>[/color]
                >>
                >> Did you restart your web server?
                >>
                >> And please don't top post.
                >>[/color]
                >
                > I can't reboot the server, but I did restart the World Wide Web
                > Publishing Service. Is that the correct way to restart the server? The
                > last post seemed to indicate the php.ini file was reprocessed each time
                > php is called. Is that correct?[/color]

                I seem to have solved the problem. My permissions were never set right
                for the registry key that php uses to find the PHP.ini file. I changed
                those permissions and it worked. Thanks for everyone's help.

                Jack

                Comment

                Working...