PHP/Apache Configuration

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce A. Julseth

    #1

    PHP/Apache Configuration

    Okay. I'm still can't get Apache to restart after changing the httpd config
    file. I've upgraded my installation to 5.2. Apache 2.2.3 runs fine without
    any PHP additions.
    1) I added my PHP directory, C:/PHP5, to my PATH
    2) I copied php.ini-recommended to my C:/windows directory and renamed
    it php.ini
    3) I made the following changes to PHP.ini
    doc_root = "c:/inetpub/wwwroot"
    extension_dir = "c:/php5/ext"
    4) I made the following changes to Httpd.conf
    After the last entry in the LoadModule section:

    LoadModule php5_module "c:/php5/php5apache.dll"
    AddModule mod_php5.c

    If I comment out the above two statemens, Apache will start.

    In the <IfModule mime_moduleSect ion, I added

    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php.exe"

    And that's it.

    When I restart Apache, I get an error dialog with the message:

    The requested operation has failed.

    What have I missed or done wrong?

    Thanks for the help...

    Bruce


  • Jerry Stuckle

    #2
    Re: PHP/Apache Configuration

    Bruce A. Julseth wrote:
    Okay. I'm still can't get Apache to restart after changing the httpd config
    file. I've upgraded my installation to 5.2. Apache 2.2.3 runs fine without
    any PHP additions.
    1) I added my PHP directory, C:/PHP5, to my PATH
    2) I copied php.ini-recommended to my C:/windows directory and renamed
    it php.ini
    3) I made the following changes to PHP.ini
    doc_root = "c:/inetpub/wwwroot"
    extension_dir = "c:/php5/ext"
    4) I made the following changes to Httpd.conf
    After the last entry in the LoadModule section:
    >
    LoadModule php5_module "c:/php5/php5apache.dll"
    AddModule mod_php5.c
    >
    If I comment out the above two statemens, Apache will start.
    >
    In the <IfModule mime_moduleSect ion, I added
    >
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php.exe"
    >
    And that's it.
    >
    When I restart Apache, I get an error dialog with the message:
    >
    The requested operation has failed.
    >
    What have I missed or done wrong?
    >
    Thanks for the help...
    >
    Bruce
    >
    >
    Asked in the wrong group? Try alt.apache.conf iguration.

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

    Comment

    • Carl Pearson

      #3
      Re: PHP/Apache Configuration

      LoadFile "/path/to/php5ts.dll"


      Bruce A. Julseth wrote:
      Okay. I'm still can't get Apache to restart after changing the httpd config
      file. I've upgraded my installation to 5.2. Apache 2.2.3 runs fine without
      any PHP additions.
      1) I added my PHP directory, C:/PHP5, to my PATH
      2) I copied php.ini-recommended to my C:/windows directory and renamed
      it php.ini
      3) I made the following changes to PHP.ini
      doc_root = "c:/inetpub/wwwroot"
      extension_dir = "c:/php5/ext"
      4) I made the following changes to Httpd.conf
      After the last entry in the LoadModule section:
      >
      LoadModule php5_module "c:/php5/php5apache.dll"
      AddModule mod_php5.c
      >
      If I comment out the above two statemens, Apache will start.
      >
      In the <IfModule mime_moduleSect ion, I added
      >
      AddType application/x-httpd-php .php
      Action application/x-httpd-php "/php/php.exe"
      >
      And that's it.
      >
      When I restart Apache, I get an error dialog with the message:
      >
      The requested operation has failed.
      >
      What have I missed or done wrong?
      >
      Thanks for the help...
      >
      Bruce
      >
      >

      Comment

      • Bruce A. Julseth

        #4
        Re: PHP/Apache Configuration

        "Carl Pearson" <jman_spam_trap _.org@gmail.com wrote in message
        news:45a507e8$0 $8941$4c368faf@ roadrunner.com. ..
        LoadFile "/path/to/php5ts.dll"
        >
        >
        Bruce A. Julseth wrote:
        >Okay. I'm still can't get Apache to restart after changing the httpd
        >config file. I've upgraded my installation to 5.2. Apache 2.2.3 runs
        >fine without any PHP additions.
        >1) I added my PHP directory, C:/PHP5, to my PATH
        >2) I copied php.ini-recommended to my C:/windows directory and renamed
        >it php.ini
        >3) I made the following changes to PHP.ini
        > doc_root = "c:/inetpub/wwwroot"
        > extension_dir = "c:/php5/ext"
        >4) I made the following changes to Httpd.conf
        > After the last entry in the LoadModule section:
        >>
        > LoadModule php5_module "c:/php5/php5apache.dll"
        > AddModule mod_php5.c
        >>
        >If I comment out the above two statemens, Apache will start.
        >>
        > In the <IfModule mime_moduleSect ion, I added
        >>
        > AddType application/x-httpd-php .php
        > Action application/x-httpd-php "/php/php.exe"
        >>
        >And that's it.
        >>
        >When I restart Apache, I get an error dialog with the message:
        >>
        > The requested operation has failed.
        >>
        >What have I missed or done wrong?
        >>
        >Thanks for the help...
        >>
        >Bruce
        >>
        I tried LoadFile "C:/php5/php5ts.dll"

        in both php.ini and httpd.conf.

        I still get the failure message of "The requested operation has failed."

        Where does it belong? Any other thoughts?

        Bruce


        Comment

        • denis

          #5
          Re: PHP/Apache Configuration

          As far as I know the module php5apache.dll is for Apache 1.3, for Apache 2.0
          you use php5apache2.dll and for Apache 2.2 it's (I believe)
          php5apache2_2.d ll.

          Try altering the LoadModule statement to refer to php5apache2_2.d ll and see
          if it works.

          After that also try removing the AddModule line.

          Denis Gerina

          "Bruce A. Julseth" <bruceaj_nospam _@bellsouth.net wrote in message
          news:eo38he$nha $1@aioe.org...
          "Carl Pearson" <jman_spam_trap _.org@gmail.com wrote in message
          news:45a507e8$0 $8941$4c368faf@ roadrunner.com. ..
          >LoadFile "/path/to/php5ts.dll"
          >>
          >>
          >Bruce A. Julseth wrote:
          >>Okay. I'm still can't get Apache to restart after changing the httpd
          >>config file. I've upgraded my installation to 5.2. Apache 2.2.3 runs
          >>fine without any PHP additions.
          >>1) I added my PHP directory, C:/PHP5, to my PATH
          >>2) I copied php.ini-recommended to my C:/windows directory and renamed
          >>it php.ini
          >>3) I made the following changes to PHP.ini
          >> doc_root = "c:/inetpub/wwwroot"
          >> extension_dir = "c:/php5/ext"
          >>4) I made the following changes to Httpd.conf
          >> After the last entry in the LoadModule section:
          >>>
          >> LoadModule php5_module "c:/php5/php5apache.dll"
          >> AddModule mod_php5.c
          >>>
          >>If I comment out the above two statemens, Apache will start.
          >>>
          >> In the <IfModule mime_moduleSect ion, I added
          >>>
          >> AddType application/x-httpd-php .php
          >> Action application/x-httpd-php "/php/php.exe"
          >>>
          >>And that's it.
          >>>
          >>When I restart Apache, I get an error dialog with the message:
          >>>
          >> The requested operation has failed.
          >>>
          >>What have I missed or done wrong?
          >>>
          >>Thanks for the help...
          >>>
          >>Bruce
          >>>
          >
          I tried LoadFile "C:/php5/php5ts.dll"
          >
          in both php.ini and httpd.conf.
          >
          I still get the failure message of "The requested operation has failed."
          >
          Where does it belong? Any other thoughts?
          >
          Bruce
          >

          Comment

          • denis

            #6
            Re: PHP/Apache Configuration

            Another thing

            Action application/x-httpd-php "/php/php.exe"

            also remove the above line. There's no need to configure PHP as CGI (the
            line above) if you're already loading it as a module.


            Denis Gerina

            "Bruce A. Julseth" <bruceaj_nospam _@bellsouth.net wrote in message
            news:eo38he$nha $1@aioe.org...
            "Carl Pearson" <jman_spam_trap _.org@gmail.com wrote in message
            news:45a507e8$0 $8941$4c368faf@ roadrunner.com. ..
            >LoadFile "/path/to/php5ts.dll"
            >>
            >>
            >Bruce A. Julseth wrote:
            >>Okay. I'm still can't get Apache to restart after changing the httpd
            >>config file. I've upgraded my installation to 5.2. Apache 2.2.3 runs
            >>fine without any PHP additions.
            >>1) I added my PHP directory, C:/PHP5, to my PATH
            >>2) I copied php.ini-recommended to my C:/windows directory and renamed
            >>it php.ini
            >>3) I made the following changes to PHP.ini
            >> doc_root = "c:/inetpub/wwwroot"
            >> extension_dir = "c:/php5/ext"
            >>4) I made the following changes to Httpd.conf
            >> After the last entry in the LoadModule section:
            >>>
            >> LoadModule php5_module "c:/php5/php5apache.dll"
            >> AddModule mod_php5.c
            >>>
            >>If I comment out the above two statemens, Apache will start.
            >>>
            >> In the <IfModule mime_moduleSect ion, I added
            >>>
            >> AddType application/x-httpd-php .php
            >> Action application/x-httpd-php "/php/php.exe"
            >>>
            >>And that's it.
            >>>
            >>When I restart Apache, I get an error dialog with the message:
            >>>
            >> The requested operation has failed.
            >>>
            >>What have I missed or done wrong?
            >>>
            >>Thanks for the help...
            >>>
            >>Bruce
            >>>
            >
            I tried LoadFile "C:/php5/php5ts.dll"
            >
            in both php.ini and httpd.conf.
            >
            I still get the failure message of "The requested operation has failed."
            >
            Where does it belong? Any other thoughts?
            >
            Bruce
            >

            Comment

            • Bruce A. Julseth

              #7
              Re: PHP/Apache Configuration


              "denis" <denis@cced.baw rote in message news:45a55048$1 @news.bihnet.ba ...
              Another thing
              >
              Action application/x-httpd-php "/php/php.exe"
              >
              also remove the above line. There's no need to configure PHP as CGI (the
              line above) if you're already loading it as a module.
              >
              >
              Denis Gerina
              >
              "Bruce A. Julseth" <bruceaj_nospam _@bellsouth.net wrote in message
              news:eo38he$nha $1@aioe.org...
              >"Carl Pearson" <jman_spam_trap _.org@gmail.com wrote in message
              >news:45a507e8$ 0$8941$4c368faf @roadrunner.com ...
              >>LoadFile "/path/to/php5ts.dll"
              >>>
              >>>
              >>Bruce A. Julseth wrote:
              >>>Okay. I'm still can't get Apache to restart after changing the httpd
              >>>config file. I've upgraded my installation to 5.2. Apache 2.2.3 runs
              >>>fine without any PHP additions.
              >>>1) I added my PHP directory, C:/PHP5, to my PATH
              >>>2) I copied php.ini-recommended to my C:/windows directory and renamed
              >>>it php.ini
              >>>3) I made the following changes to PHP.ini
              >>> doc_root = "c:/inetpub/wwwroot"
              >>> extension_dir = "c:/php5/ext"
              >>>4) I made the following changes to Httpd.conf
              >>> After the last entry in the LoadModule section:
              >>>>
              >>> LoadModule php5_module "c:/php5/php5apache.dll"
              >>> AddModule mod_php5.c
              >>>>
              >>>If I comment out the above two statemens, Apache will start.
              >>>>
              >>> In the <IfModule mime_moduleSect ion, I added
              >>>>
              >>> AddType application/x-httpd-php .php
              >>> Action application/x-httpd-php "/php/php.exe"
              >>>>
              >>>And that's it.
              >>>>
              >>>When I restart Apache, I get an error dialog with the message:
              >>>>
              >>> The requested operation has failed.
              >>>>
              >>>What have I missed or done wrong?
              >>>>
              >>>Thanks for the help...
              >>>>
              >>>Bruce
              >>>>
              >>
              >I tried LoadFile "C:/php5/php5ts.dll"
              >>
              >in both php.ini and httpd.conf.
              >>
              >I still get the failure message of "The requested operation has failed."
              >>
              >Where does it belong? Any other thoughts?
              >>
              >Bruce
              >>
              >
              >
              Thank you...

              LoadModule php5_module c:/PHP5/php5apache2_2.d ll

              Worked..

              Bruce


              Comment

              Working...