Getting started - not quite working

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

    Getting started - not quite working

    OK I've got Apache up and running also PHP and edited the httpd.conf and
    php.ini as recommended(by ricocheting.com ).
    Problem is as soon as I have a single or double quote,all PHP after that
    just gets dumped to the browser even though I do of course close the quote.
    Anyone have any idea why?
    Thanks,Si.


  • Carl Pearson

    #2
    Re: Getting started - not quite working

    Si.W wrote:
    OK I've got Apache up and running also PHP and edited the httpd.conf and
    php.ini as recommended(by ricocheting.com ).
    Problem is as soon as I have a single or double quote,all PHP after that
    just gets dumped to the browser even though I do of course close the quote.
    Anyone have any idea why?
    Thanks,Si.
    >
    >
    Make a file than only has
    <?php phpinfo(); ?>


    If that works, dig into the manual and start learning syntax. Also, try
    downloading some scripts to view working code.

    Comment

    • Michael Austin

      #3
      Re: Getting started - not quite working

      Si.W wrote:
      OK I've got Apache up and running also PHP and edited the httpd.conf and
      php.ini as recommended(by ricocheting.com ).
      Problem is as soon as I have a single or double quote,all PHP after that
      just gets dumped to the browser even though I do of course close the quote.
      Anyone have any idea why?
      Thanks,Si.
      >
      >
      can you give us at least a "Hello World" example of the problem?

      create a file with just:

      <?php echo "Hello World<br>"; echo 'Hello World<br>'; ?>

      what is the result?

      If you view the source, you should get:

      Hello World<br>Hello World<br>


      --
      Michael Austin
      Database Consultant
      Domain Registration and Linux/Windows Web Hosting Reseller

      Comment

      • Si.W

        #4
        Re: Getting started - not quite working


        "Michael Austin" <maustin@firstd basource.comwro te in message
        news:CVCqh.1311 $O02.671@newssv r11.news.prodig y.net...
        Si.W wrote:
        >
        >OK I've got Apache up and running also PHP and edited the httpd.conf and
        >php.ini as recommended(by ricocheting.com ).
        >Problem is as soon as I have a single or double quote,all PHP after that
        >just gets dumped to the browser even though I do of course close the
        >quote.
        >Anyone have any idea why?
        >Thanks,Si.
        >
        can you give us at least a "Hello World" example of the problem?
        >
        create a file with just:
        >
        <?php echo "Hello World<br>"; echo 'Hello World<br>'; ?>
        >
        what is the result?
        >
        If you view the source, you should get:
        >
        Hello World<br>Hello World<br>
        >
        >
        --
        Michael Austin
        Database Consultant
        Domain Registration and Linux/Windows Web Hosting Reseller
        http://www.spacelots.com
        Thanks Boss,
        Appreciate the 1st comment that I should go through the docs,but y'know
        it's a bit dispiriting.Tri ed the Hello World which showed that my first idea
        was wrong as the browser output was:
        "; echo 'Hello World
        '; ? .
        Something's gone wrong,but I ain't sure what.Reinstalle d once so I'll
        have to see what's what but any advice appreciated.
        Si.


        Comment

        • Si.W

          #5
          Re: Getting started - not quite working

          "Si.W" <swswsw@ntlworl d.comwrote in message
          news:DtRqh.8387 8$493.16927@new sfe4-gui.ntli.net...
          >
          "Michael Austin" <maustin@firstd basource.comwro te in message
          news:CVCqh.1311 $O02.671@newssv r11.news.prodig y.net...
          >Si.W wrote:
          >>
          >>OK I've got Apache up and running also PHP and edited the httpd.conf and
          >>php.ini as recommended(by ricocheting.com ).
          >>Problem is as soon as I have a single or double quote,all PHP after that
          >>just gets dumped to the browser even though I do of course close the
          >>quote.
          >>Anyone have any idea why?
          >>Thanks,Si.
          >>
          >can you give us at least a "Hello World" example of the problem?
          >>
          >create a file with just:
          >>
          ><?php echo "Hello World<br>"; echo 'Hello World<br>'; ?>
          >>
          >what is the result?
          >>
          >If you view the source, you should get:
          >>
          >Hello World<br>Hello World<br>
          >>
          >>
          >--
          >Michael Austin
          >Database Consultant
          >Domain Registration and Linux/Windows Web Hosting Reseller
          >http://www.spacelots.com
          >
          Thanks Boss,
          Appreciate the 1st comment that I should go through the docs,but y'know
          it's a bit dispiriting.Tri ed the Hello World which showed that my first
          idea was wrong as the browser output was:
          "; echo 'Hello World
          '; ? .
          Something's gone wrong,but I ain't sure what.Reinstalle d once so I'll
          have to see what's what but any advice appreciated.
          Si.
          >
          OK seems to be a server config problem as I can see the php when I view
          source.
          Should be fun,my setup lines up with what the PHP docs tell me,so I'll have
          to start looking at the Apache docs .. joy!
          Thanks for help,Si.


          Comment

          • Michael Austin

            #6
            Re: Getting started - not quite working

            Si.W wrote:
            "Si.W" <swswsw@ntlworl d.comwrote in message
            news:DtRqh.8387 8$493.16927@new sfe4-gui.ntli.net...
            >
            >>"Michael Austin" <maustin@firstd basource.comwro te in message
            >>news:CVCqh.13 11$O02.671@news svr11.news.prod igy.net...
            >>
            >>>Si.W wrote:
            >>>
            >>>
            >>>>OK I've got Apache up and running also PHP and edited the httpd.conf and
            >>>>php.ini as recommended(by ricocheting.com ).
            >>>>Problem is as soon as I have a single or double quote,all PHP after that
            >>>>just gets dumped to the browser even though I do of course close the
            >>>>quote.
            >>>>Anyone have any idea why?
            >>>>Thanks,Si .
            >>>
            >>>can you give us at least a "Hello World" example of the problem?
            >>>
            >>>create a file with just:
            >>>
            >>><?php echo "Hello World<br>"; echo 'Hello World<br>'; ?>
            >>>
            >>>what is the result?
            >>>
            >>>If you view the source, you should get:
            >>>
            >>>Hello World<br>Hello World<br>
            >>>
            >>>
            >>>--
            >>>Michael Austin
            >>>Database Consultant
            >>>Domain Registration and Linux/Windows Web Hosting Reseller
            >>>http://www.spacelots.com
            >>
            >>Thanks Boss,
            > Appreciate the 1st comment that I should go through the docs,but y'know
            >>it's a bit dispiriting.Tri ed the Hello World which showed that my first
            >>idea was wrong as the browser output was:
            >>"; echo 'Hello World
            >>'; ? .
            > Something's gone wrong,but I ain't sure what.Reinstalle d once so I'll
            >>have to see what's what but any advice appreciated.
            >>Si.
            >>
            >
            OK seems to be a server config problem as I can see the php when I view
            source.
            Should be fun,my setup lines up with what the PHP docs tell me,so I'll have
            to start looking at the Apache docs .. joy!
            Thanks for help,Si.
            >
            >
            you should be loading mod_php.conf in your httpd.conf and in your mod_php.conf
            you should have:

            AddType application/x-httpd-php .php .phtml .html .htm
            AddType application/x-httpd-php-source .phps ##this is optional


            --
            Michael Austin
            Database Consultant
            Domain Registration and Linux/Windows Web Hosting Reseller

            Comment

            • Michael Austin

              #7
              Re: Getting started - not quite working

              Si.W wrote:
              "Si.W" <swswsw@ntlworl d.comwrote in message
              news:DtRqh.8387 8$493.16927@new sfe4-gui.ntli.net...
              >
              >>"Michael Austin" <maustin@firstd basource.comwro te in message
              >>news:CVCqh.13 11$O02.671@news svr11.news.prod igy.net...
              >>
              >>>Si.W wrote:
              >>>
              >>>
              >>>>OK I've got Apache up and running also PHP and edited the httpd.conf and
              >>>>php.ini as recommended(by ricocheting.com ).
              >>>>Problem is as soon as I have a single or double quote,all PHP after that
              >>>>just gets dumped to the browser even though I do of course close the
              >>>>quote.
              >>>>Anyone have any idea why?
              >>>>Thanks,Si .
              >>>
              >>>can you give us at least a "Hello World" example of the problem?
              >>>
              >>>create a file with just:
              >>>
              >>><?php echo "Hello World<br>"; echo 'Hello World<br>'; ?>
              >>>
              >>>what is the result?
              >>>
              >>>If you view the source, you should get:
              >>>
              >>>Hello World<br>Hello World<br>
              >>>
              >>>
              >>>--
              >>>Michael Austin
              >>>Database Consultant
              >>>Domain Registration and Linux/Windows Web Hosting Reseller
              >>>http://www.spacelots.com
              >>
              >>Thanks Boss,
              > Appreciate the 1st comment that I should go through the docs,but y'know
              >>it's a bit dispiriting.Tri ed the Hello World which showed that my first
              >>idea was wrong as the browser output was:
              >>"; echo 'Hello World
              >>'; ? .
              > Something's gone wrong,but I ain't sure what.Reinstalle d once so I'll
              >>have to see what's what but any advice appreciated.
              >>Si.
              >>
              >
              OK seems to be a server config problem as I can see the php when I view
              source.
              Should be fun,my setup lines up with what the PHP docs tell me,so I'll have
              to start looking at the Apache docs .. joy!
              Thanks for help,Si.
              >
              >
              if you are using Apache, your httpd should have the following line:

              Include /apache$root/conf/mod_php.conf

              in your mod_php.conf file there should be:

              AddType application/x-httpd-php .php .phtml .html .htm ##(htm* is optional)
              AddType application/x-httpd-php-source .phps ##optional


              --
              Michael Austin
              Database Consultant
              Domain Registration and Linux/Windows Web Hosting Reseller

              Comment

              • Si.W

                #8
                Re: Getting started - not quite working

                "Michael Austin" <maustin@firstd basource.comwro te in message
                news:xJSqh.2690 6$QU1.23812@new ssvr22.news.pro digy.net...
                Si.W wrote:
                >
                >"Si.W" <swswsw@ntlworl d.comwrote in message
                >news:DtRqh.838 78$493.16927@ne wsfe4-gui.ntli.net...
                >>
                >>>"Michael Austin" <maustin@firstd basource.comwro te in message
                >>>news:CVCqh.1 311$O02.671@new ssvr11.news.pro digy.net...
                >>>
                >>>>Si.W wrote:
                >>>>
                >>>>
                >>>>>OK I've got Apache up and running also PHP and edited the httpd.conf
                >>>>>and php.ini as recommended(by ricocheting.com ).
                >>>>>Problem is as soon as I have a single or double quote,all PHP after
                >>>>>that just gets dumped to the browser even though I do of course close
                >>>>>the quote.
                >>>>>Anyone have any idea why?
                >>>>>Thanks,S i.
                >>>>
                >>>>can you give us at least a "Hello World" example of the problem?
                >>>>
                >>>>create a file with just:
                >>>>
                >>>><?php echo "Hello World<br>"; echo 'Hello World<br>'; ?>
                >>>>
                >>>>what is the result?
                >>>>
                >>>>If you view the source, you should get:
                >>>>
                >>>>Hello World<br>Hello World<br>
                >>>>
                >>>>
                >>>>--
                >>>>Michael Austin
                >>>>Database Consultant
                >>>>Domain Registration and Linux/Windows Web Hosting Reseller
                >>>>http://www.spacelots.com
                >>>
                >>>Thanks Boss,
                >> Appreciate the 1st comment that I should go through the docs,but
                >>y'know it's a bit dispiriting.Tri ed the Hello World which showed that my
                >>first idea was wrong as the browser output was:
                >>>"; echo 'Hello World
                >>>'; ? .
                >> Something's gone wrong,but I ain't sure what.Reinstalle d once so I'll
                >>have to see what's what but any advice appreciated.
                >>>Si.
                >>>
                >>
                >OK seems to be a server config problem as I can see the php when I view
                >source.
                >Should be fun,my setup lines up with what the PHP docs tell me,so I'll
                >have to start looking at the Apache docs .. joy!
                >Thanks for help,Si.
                >
                if you are using Apache, your httpd should have the following line:
                >
                Include /apache$root/conf/mod_php.conf
                >
                in your mod_php.conf file there should be:
                >
                AddType application/x-httpd-php .php .phtml .html .htm ##(htm* is
                optional)
                AddType application/x-httpd-php-source .phps ##optional
                >
                >
                --
                Michael Austin
                Database Consultant
                Domain Registration and Linux/Windows Web Hosting Reseller
                http://www.spacelots.com
                I'll have a look tomorrow,thanks for the pointers,will hopefully help.
                Si.


                Comment

                Working...