PHP5 and APACHE2 work but not best

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

    PHP5 and APACHE2 work but not best

    Hi at all

    I installed locally the server APACHE 2 and PHP 5
    I configured PHP as CGI with the folloring code into the apache
    configuration file

    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php-cgi.exe"

    I choice to configure as CGI becasuse the following code not work

    LoadModule php5_module "c:/php/php5apache2.dll "
    AddType application/x-httpd-php .php

    PHPIniDir "C:/WINDOWS"

    Configuring PHP as CGI at home locally it work but not so better like on
    line and it do rot return me many variables value of my script.

    phpinfo() return:
    PHP Version 5.1.2



    System Windows 9x PC 4.10
    Build Date Jan 11 2006 16:35:21
    Configure Command cscript /nologo configure.js "--enable-snapshot-build"
    "--with-gd=shared"
    Server API CGI/FastCGI
    Virtual Directory Support enabled
    Configuration File (php.ini) Path C:\WINDOWS\PHP. ini
    PHP API 20041225
    PHP Extension 20050922
    Zend Extension 220051025
    Debug Build no
    Thread Safety enabled
    Zend Memory Manager enabled
    IPv6 Support enabled
    Registered PHP Streams php, file, http, ftp, compress.zlib
    Registered Stream Socket Transports tcp, udp
    Registered Stream Filters convert.iconv.* , string.rot13, string.toupper,
    string.tolower, string.strip_ta gs, convert.*, zlib.*


    Please what can I do to work best?

    Regards

    Steel



  • JDS

    #2
    Re: PHP5 and APACHE2 work but not best

    On Fri, 30 Jun 2006 15:37:04 +0000, Steel wrote:
    [color=blue]
    > Please what can I do to work best?[/color]

    Huh?
    --
    JDS

    Comment

    • JDS

      #3
      Re: PHP5 and APACHE2 work but not best

      On Fri, 30 Jun 2006 11:42:26 -0400, JDS wrote:
      [color=blue]
      > Huh?[/color]

      Actually, let me clarify.

      Your English is not clear enough for me to understand what you are asking.
      You speak Italian? I don't, but I bet there is someone here that does.
      Post your question in Italian (or whatever your native language).

      --
      JDS

      Comment

      • David Haynes

        #4
        Re: PHP5 and APACHE2 work but not best

        Steel wrote:[color=blue]
        > Hi at all
        >
        > I installed locally the server APACHE 2 and PHP 5
        > I configured PHP as CGI with the folloring code into the apache
        > configuration file
        >
        > ScriptAlias /php/ "c:/php/"
        > AddType application/x-httpd-php .php
        > Action application/x-httpd-php "/php/php-cgi.exe"
        >
        > I choice to configure as CGI becasuse the following code not work
        >
        > LoadModule php5_module "c:/php/php5apache2.dll "
        > AddType application/x-httpd-php .php
        >
        > PHPIniDir "C:/WINDOWS"
        >
        > Configuring PHP as CGI at home locally it work but not so better like on
        > line and it do rot return me many variables value of my script.
        >
        > phpinfo() return:
        > PHP Version 5.1.2
        >
        >
        >
        > System Windows 9x PC 4.10
        > Build Date Jan 11 2006 16:35:21
        > Configure Command cscript /nologo configure.js "--enable-snapshot-build"
        > "--with-gd=shared"
        > Server API CGI/FastCGI
        > Virtual Directory Support enabled
        > Configuration File (php.ini) Path C:\WINDOWS\PHP. ini
        > PHP API 20041225
        > PHP Extension 20050922
        > Zend Extension 220051025
        > Debug Build no
        > Thread Safety enabled
        > Zend Memory Manager enabled
        > IPv6 Support enabled
        > Registered PHP Streams php, file, http, ftp, compress.zlib
        > Registered Stream Socket Transports tcp, udp
        > Registered Stream Filters convert.iconv.* , string.rot13, string.toupper,
        > string.tolower, string.strip_ta gs, convert.*, zlib.*
        >
        >
        > Please what can I do to work best?
        >
        > Regards
        >
        > Steel
        >
        >
        >[/color]

        A couple of things...
        1. Running PHP as a CGI will be slower than running it as a native
        Apache module. This is probably where you are getting the poor
        response from.
        2. You say
        LoadModule php5_module "c:/php/php5apache2.dll "
        AddType application/x-httpd-php .php
        PHPIniDir "C:/WINDOWS"
        does not work for you. I *think* it is because your php.ini file is in
        c:/php not c:/WINDOWS.
        3. Please try again with the LoadModule option and post a copy of
        the output of phpinfo() - It will help us get it all working for you.

        -david-

        Comment

        • Steel

          #5
          Re: PHP5 and APACHE2 work but not best


          "David Haynes"

          KINDLY wrote:
          [color=blue]
          > A couple of things...
          > 1. Running PHP as a CGI will be slower than running it as a native
          > Apache module. This is probably where you are getting the poor
          > response from.
          > 2. You say
          > LoadModule php5_module "c:/php/php5apache2.dll "
          > AddType application/x-httpd-php .php
          > PHPIniDir "C:/WINDOWS"
          > does not work for you. I *think* it is because your php.ini file is in
          > c:/php not c:/WINDOWS.
          > 3. Please try again with the LoadModule option and post a copy of
          > the output of phpinfo() - It will help us get it all working for you.
          >
          > -david-
          >[/color]

          I tryed again to add

          LoadModule php5_module "c:/php/php5apache2.dll "
          AddType application/x-httpd-php .php
          PHPIniDir "C:/WINDOWS/"
          #I am sure that PHP.ini is into the windows direcory

          but Apache not accept these lines and when I try to start APACHE it open
          obly a moment the MS-dos windows console and do not run.

          I tryed line per line and I noted that APACHE accept only the second line

          AddType application/x-httpd-php .php

          It close immediately the windows if I add the first
          LoadModule php5_module "c:/php/php5apache2.dll "
          ant 3th line
          PHPIniDir "C:/WINDOWS/"

          Therefore I have not a copy of the PHPINFO() output because nothing work


          Regards

          Steel


          Comment

          • David Haynes

            #6
            Re: PHP5 and APACHE2 work but not best

            Steel wrote:[color=blue]
            > "David Haynes"
            >
            > KINDLY wrote:
            >[color=green]
            >> A couple of things...
            >> 1. Running PHP as a CGI will be slower than running it as a native
            >> Apache module. This is probably where you are getting the poor
            >> response from.
            >> 2. You say
            >> LoadModule php5_module "c:/php/php5apache2.dll "
            >> AddType application/x-httpd-php .php
            >> PHPIniDir "C:/WINDOWS"
            >> does not work for you. I *think* it is because your php.ini file is in
            >> c:/php not c:/WINDOWS.
            >> 3. Please try again with the LoadModule option and post a copy of
            >> the output of phpinfo() - It will help us get it all working for you.
            >>
            >> -david-
            >>[/color]
            >
            > I tryed again to add
            >
            > LoadModule php5_module "c:/php/php5apache2.dll "
            > AddType application/x-httpd-php .php
            > PHPIniDir "C:/WINDOWS/"
            > #I am sure that PHP.ini is into the windows direcory
            >
            > but Apache not accept these lines and when I try to start APACHE it open
            > obly a moment the MS-dos windows console and do not run.
            >
            > I tryed line per line and I noted that APACHE accept only the second line
            >
            > AddType application/x-httpd-php .php
            >
            > It close immediately the windows if I add the first
            > LoadModule php5_module "c:/php/php5apache2.dll "
            > ant 3th line
            > PHPIniDir "C:/WINDOWS/"
            >
            > Therefore I have not a copy of the PHPINFO() output because nothing work
            >
            >
            > Regards
            >
            > Steel
            >
            >[/color]
            Which version of php and apache are you using?

            -david-

            Comment

            • Jerry Stuckle

              #7
              Re: PHP5 and APACHE2 work but not best

              Steel wrote:[color=blue]
              > "David Haynes"
              >
              > KINDLY wrote:
              >
              >[color=green]
              >>A couple of things...
              >>1. Running PHP as a CGI will be slower than running it as a native
              >>Apache module. This is probably where you are getting the poor
              >>response from.
              >>2. You say
              >>LoadModule php5_module "c:/php/php5apache2.dll "
              >>AddType application/x-httpd-php .php
              >>PHPIniDir "C:/WINDOWS"
              >>does not work for you. I *think* it is because your php.ini file is in
              >>c:/php not c:/WINDOWS.
              >>3. Please try again with the LoadModule option and post a copy of
              >>the output of phpinfo() - It will help us get it all working for you.
              >>
              >>-david-
              >>[/color]
              >
              >
              > I tryed again to add
              >
              > LoadModule php5_module "c:/php/php5apache2.dll "
              > AddType application/x-httpd-php .php
              > PHPIniDir "C:/WINDOWS/"
              > #I am sure that PHP.ini is into the windows direcory
              >
              > but Apache not accept these lines and when I try to start APACHE it open
              > obly a moment the MS-dos windows console and do not run.
              >
              > I tryed line per line and I noted that APACHE accept only the second line
              >
              > AddType application/x-httpd-php .php
              >
              > It close immediately the windows if I add the first
              > LoadModule php5_module "c:/php/php5apache2.dll "
              > ant 3th line
              > PHPIniDir "C:/WINDOWS/"
              >
              > Therefore I have not a copy of the PHPINFO() output because nothing work
              >
              >
              > Regards
              >
              > Steel
              >
              >[/color]

              What happens if you open a MS-DOS prompt, CD to the Apache binary directory and type

              httpd -f (path to your httpd.conf file)

              You should get some error messages as to why Apache won't run.


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

              Comment

              • David Haynes

                #8
                Re: PHP5 and APACHE2 work but not best

                Jerry Stuckle wrote:[color=blue]
                > What happens if you open a MS-DOS prompt, CD to the Apache binary
                > directory and type
                >
                > httpd -f (path to your httpd.conf file)
                >
                > You should get some error messages as to why Apache won't run.[/color]

                Jerry:
                I'm thinking either:
                a) php is not installed in c: (low probability), or
                b) he is using php 5.1.2 with Apache 5.2. The php5apache2.dll that
                comes with the standard bundle is not compiled for Apache 5.2 (AFAIK).

                -david-

                Comment

                • Jerry Stuckle

                  #9
                  Re: PHP5 and APACHE2 work but not best

                  David Haynes wrote:[color=blue]
                  > Jerry Stuckle wrote:
                  >[color=green]
                  >> What happens if you open a MS-DOS prompt, CD to the Apache binary
                  >> directory and type
                  >>
                  >> httpd -f (path to your httpd.conf file)
                  >>
                  >> You should get some error messages as to why Apache won't run.[/color]
                  >
                  >
                  > Jerry:
                  > I'm thinking either:
                  > a) php is not installed in c: (low probability), or
                  > b) he is using php 5.1.2 with Apache 5.2. The php5apache2.dll that
                  > comes with the standard bundle is not compiled for Apache 5.2 (AFAIK).
                  >
                  > -david-
                  >[/color]

                  Either one could be. Starting from the command line should show some errors,
                  which will make things easier to diagnose.


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

                  Comment

                  • Jim Carlock

                    #10
                    Re: PHP5 and APACHE2 work but not best

                    Steel posted:[color=blue]
                    > ScriptAlias /php/ "c:/php/"
                    > AddType application/x-httpd-php .php
                    > Action application/x-httpd-php "/php/php-cgi.exe"
                    >
                    > I choice to configure as CGI becasuse the following code not
                    > work
                    >
                    > LoadModule php5_module "c:/php/php5apache2.dll "
                    > AddType application/x-httpd-php .php
                    >
                    > PHPIniDir "C:/WINDOWS"[/color]

                    Does the httpd.conf require a mod_php5.c file. I have a the
                    following in my httpd.conf.

                    # Add the mod_php4.c
                    AddModule mod_php4.c

                    Hope this helps.

                    --
                    Jim Carlock
                    Post replies to the group.


                    Comment

                    • Steel

                      #11
                      Re: PHP5 and APACHE2 work but not best


                      "JDS"
                      wrote

                      You speak Italian?[color=blue]
                      >[/color]
                      JDS[color=blue]
                      >[/color]

                      Italian?

                      Italians are stupids peoples!!!

                      Think that in this momrent in whole Italian beachs there are the most
                      beautifull girls of Europe and Italian boys (the stupids) are on the beach
                      to try to translate the sighs of girls produced by languide caresses maked
                      by the stupids italian boys to the girls instead of to be here to translate
                      my post.


                      Comment

                      • Steel

                        #12
                        Re: PHP5 and APACHE2 work but not best


                        "Jim Carlock" <anonymous@127. 0.0.1> ha scritto nel messaggio
                        news:6Ylpg.2604 5$LT2.12775@tor nado.tampabay.r r.com...[color=blue]
                        > Steel posted:[color=green]
                        > > ScriptAlias /php/ "c:/php/"
                        > > AddType application/x-httpd-php .php
                        > > Action application/x-httpd-php "/php/php-cgi.exe"
                        > >
                        > > I choice to configure as CGI becasuse the following code not
                        > > work
                        > >
                        > > LoadModule php5_module "c:/php/php5apache2.dll "
                        > > AddType application/x-httpd-php .php
                        > >
                        > > PHPIniDir "C:/WINDOWS"[/color]
                        >
                        > Does the httpd.conf require a mod_php5.c file. I have a the
                        > following in my httpd.conf.
                        >
                        > # Add the mod_php4.c
                        > AddModule mod_php4.c
                        >
                        > Hope this helps.
                        >
                        > --
                        > Jim Carlock
                        > Post replies to the group.
                        >
                        >[/color]

                        No!
                        I am sorry but it continue to not work

                        It run only as cgi and not best

                        Steel


                        Comment

                        • Jerry Stuckle

                          #13
                          Re: PHP5 and APACHE2 work but not best

                          Steel wrote:[color=blue]
                          > "Jim Carlock" <anonymous@127. 0.0.1> ha scritto nel messaggio
                          > news:6Ylpg.2604 5$LT2.12775@tor nado.tampabay.r r.com...
                          >[color=green]
                          >>Steel posted:
                          >>[color=darkred]
                          >>>ScriptAlia s /php/ "c:/php/"
                          >>>AddType application/x-httpd-php .php
                          >>>Action application/x-httpd-php "/php/php-cgi.exe"
                          >>>
                          >>>I choice to configure as CGI becasuse the following code not
                          >>>work
                          >>>
                          >>>LoadModule php5_module "c:/php/php5apache2.dll "
                          >>>AddType application/x-httpd-php .php
                          >>>
                          >>>PHPIniDir "C:/WINDOWS"[/color]
                          >>
                          >>Does the httpd.conf require a mod_php5.c file. I have a the
                          >>following in my httpd.conf.
                          >>
                          >># Add the mod_php4.c
                          >>AddModule mod_php4.c
                          >>
                          >>Hope this helps.
                          >>
                          >>--
                          >>Jim Carlock
                          >>Post replies to the group.
                          >>
                          >>[/color]
                          >
                          >
                          > No!
                          > I am sorry but it continue to not work
                          >
                          > It run only as cgi and not best
                          >
                          > Steel
                          >
                          >[/color]

                          You don't give us enough information to go on to help you solve your problem!
                          What happens if you start Apache from a command line prompt like I indicated before?


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

                          Comment

                          • Steel

                            #14
                            Re: PHP5 and APACHE2 work but not best


                            "Jerry Stuckle"
                            [color=blue]
                            > You don't give us enough information to go on to help you solve your[/color]
                            problem![color=blue]
                            > What happens if you start Apache from a command line prompt like I[/color]
                            indicated before?[color=blue]
                            >[/color]
                            I'll try the next week

                            Thank you at all

                            Steel


                            Comment

                            • ImOk

                              #15
                              Re: PHP5 and APACHE2 work but not best

                              This has worked for me under Windows XP. My PHP5 and PHP.INI file is
                              installed in C:\PHP5

                              LoadModule php5_module c:\PHP5\php5apa che2.dll
                              AddType application/x-httpd-php .php
                              PHPIniDir "c:\PHP5"

                              Also, make sure you take into account case sensitivity. I believe
                              Apache is sensitive to these things especially in the Alias section

                              AliasMatch /[aA][sS][tT][yY][xX]($|/.*) "C:/PHP5Apps/Astyx$1"

                              <Directory "C:/PHP5Apps/Astyx">
                              Options Indexes MultiViews
                              AllowOverride None
                              Order allow,deny
                              Allow from all
                              </Directory>


                              Steel wrote:[color=blue]
                              > "Jerry Stuckle"
                              >[color=green]
                              > > You don't give us enough information to go on to help you solve your[/color]
                              > problem![color=green]
                              > > What happens if you start Apache from a command line prompt like I[/color]
                              > indicated before?[color=green]
                              > >[/color]
                              > I'll try the next week
                              >
                              > Thank you at all
                              >
                              > Steel[/color]

                              Comment

                              Working...