Can anyone tell me why php scripts are not parsed ???

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

    #1

    Can anyone tell me why php scripts are not parsed ???

    Can anyone tell me why .php scripts are not parsed?

    PHP5 Apache 2 on windows

    php.ini
    short_open_tag = Off
    #For PHP 5:
    # Add to the end of the LoadModule section
    LoadModule php5_module "C:/PHP/php5apache2.dll "
    AddType application/x-httpd-php .php

    Thanks a million for your time

  • mbyrd1332@gmail.com

    #2
    Re: Can anyone tell me why php scripts are not parsed ???

    can't think of anything but to make sure you're editing the httpd.conf
    and not httpd.default.c onf

    Comment

    • Massa Batheli

      #3
      Re: Can anyone tell me why php scripts are not parsed ???

      Sorry got another thread going, having responded for which I am
      grateful you deserve an answer.The proper file is checked httpd.conf
      not the default

      Thanks
      Massa Bathe

      Comment

      • Norman Peelman

        #4
        Re: Can anyone tell me why php scripts are not parsed ???

        "Massa Batheli" <mngong@yahoo.c om> wrote in message
        news:1144241794 .046612.227520@ z34g2000cwc.goo glegroups.com.. .[color=blue]
        > Sorry got another thread going, having responded for which I am
        > grateful you deserve an answer.The proper file is checked httpd.conf
        > not the default
        >
        > Thanks
        > Massa Bathe
        >[/color]

        AddType application/x-httpd-php .php

        This may seem like a stupid question but how are you calling your web page.
        As the setting above dictates, only pages ending in .php will be parsed.
        Add .htm .html as well.

        AddType application/x-httpd-php .php .htm .html

        Norm


        Comment

        • David

          #5
          Re: Can anyone tell me why php scripts are not parsed ???

          Norman Peelman wrote:[color=blue]
          > "Massa Batheli" <mngong@yahoo.c om> wrote in message
          > news:1144241794 .046612.227520@ z34g2000cwc.goo glegroups.com.. .[color=green]
          >> Sorry got another thread going, having responded for which I am
          >> grateful you deserve an answer.The proper file is checked httpd.conf
          >> not the default
          >>
          >> Thanks
          >> Massa Bathe
          >>[/color]
          >
          > AddType application/x-httpd-php .php
          >
          > This may seem like a stupid question but how are you calling your web page.
          > As the setting above dictates, only pages ending in .php will be parsed.
          > Add .htm .html as well.
          >
          > AddType application/x-httpd-php .php .htm .html
          >[/color]
          Adding the above "AddType" line is not really a very smart idea. I
          causes Apache to parse every file named .htm, .html
          This will put a much bigger load on the server parsing each and every
          file (.htm .html) that have no PHP within them. The results will be seen
          by the end user as slow serving webpages. Is that what one really
          wants?. Don't be laze, do it the right way.

          Comment

          • Norman Peelman

            #6
            Re: Can anyone tell me why php scripts are not parsed ???

            "David" <youcantoo@find moore.net> wrote in message
            news:G7ydnZTPM9 VFIqvZRVn-hg@centurytel.n et...[color=blue]
            > Norman Peelman wrote:[color=green]
            > > "Massa Batheli" <mngong@yahoo.c om> wrote in message
            > > news:1144241794 .046612.227520@ z34g2000cwc.goo glegroups.com.. .[color=darkred]
            > >> Sorry got another thread going, having responded for which I am
            > >> grateful you deserve an answer.The proper file is checked httpd.conf
            > >> not the default
            > >>
            > >> Thanks
            > >> Massa Bathe
            > >>[/color]
            > >
            > > AddType application/x-httpd-php .php
            > >
            > > This may seem like a stupid question but how are you calling your web[/color][/color]
            page.[color=blue][color=green]
            > > As the setting above dictates, only pages ending in .php will be parsed.
            > > Add .htm .html as well.
            > >
            > > AddType application/x-httpd-php .php .htm .html
            > >[/color]
            > Adding the above "AddType" line is not really a very smart idea. I
            > causes Apache to parse every file named .htm, .html
            > This will put a much bigger load on the server parsing each and every
            > file (.htm .html) that have no PHP within them. The results will be seen
            > by the end user as slow serving webpages. Is that what one really
            > wants?. Don't be laze, do it the right way.[/color]

            I knew someone would catch that... I just shot that off before rushing off
            to work. Really what one should do is decide upon an extension for static
            pages and omit that from the list, so that:

            AddType application/x-httpd-php .php .htm

            would allow .html pages to NOT be parsed through PHP. And as a side note,
            any extension will work.

            Norm
            --
            FREE Avatar hosting at www.easyavatar.com


            Comment

            Working...