Any Php5 help for a newb

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

    Any Php5 help for a newb

    I'm trying to get MySQL, Apache, and Php5 to play nice together in Windows
    but having problems.
    I don't want to install those automatic 'all-in-one' packages because I want
    to know how to do it myself. I think I installed Apache correctly because
    when I type http://localhost in my browser I see my directory, but echo
    phpinfo() gets me a blank page. Can someone please point me to a resource
    that explains how to get php5 working?

    I put the doc root path in my php.ini to point to C:\Program Files\Apache
    Group\Apache2\h tdocs and no go..
    Also, am I suppose to put my public_html folder inside of htdocs in tact, or
    do I empty the contents of my public_html into htdocs?
    Thanks


  • Sundial Services

    #2
    Re: Any Php5 help for a newb

    mack wrote:[color=blue]
    > I'm trying to get MySQL, Apache, and Php5 to play nice together in Windows
    > but having problems.
    > I don't want to install those automatic 'all-in-one' packages because I
    > want to know how to do it myself. I think I installed Apache correctly
    > because when I type http://localhost in my browser I see my directory, but
    > echo phpinfo() gets me a blank page. Can someone please point me to a
    > resource that explains how to get php5 working?
    > I put the doc root path in my php.ini to point to C:\Program Files\Apache
    > Group\Apache2\h tdocs and no go..
    > Also, am I suppose to put my public_html folder inside of htdocs in tact,
    > or do I empty the contents of my public_html into htdocs?
    > Thanks[/color]

    First of all, and I mean this very politely and not snidely at all, read the
    Apache documentation. It is very good. Get a good conceptual
    understanding of what is _supposed_ to be happening. Then you can look to
    see if it did.

    Look at the logs to make sure that Apache is recognizing the ".php"
    extension and that it did, in fact, execute the script and did not produce
    an error-message, which might only appear in the log.

    Comment

    • Warren Oates

      #3
      Re: Any Php5 help for a newb

      In article <7HGod.5782$hJ6 .5203@trndny01> , "mack" <time@.com> wrote:

      :I put the doc root path in my php.ini to point to C:\Program Files\Apache
      :Group\Apache2\ htdocs and no go..
      :Also, am I suppose to put my public_html folder inside of htdocs in tact, or
      :do I empty the contents of my public_html into htdocs?
      :Thanks

      Another poster has said it: you really have to read the documentation.
      There are a couple-three things you have to add to httpd.conf to get php
      working, and it's a good idea to add your php directory to your path.

      There's a run-through here:


      The binary install of Apache2 (at least the Windows one I used) doesn't
      include the idea of public_html (although, you can set that up if you
      want, but in general you'll be the only user on your system); you should
      put your php_info() script straight into htdocs. Make a file for it,
      call it test.php and just put

      <?php
      php_info();
      ?>

      into it. Then navigate there with your browser. You should use a
      straight text-editor, not Word, especially when you start editing the
      config files. I think Notepad is straight ascii. Emacs is available ...
      --
      Looks like more of Texas to me.
      .... Arizona, where the nights are warm and the roads are straight.

      Comment

      • Tony Clarke

        #4
        Re: Any Php5 help for a newb

        I have installed PHP 5 on XP several times and each time the only way I
        could get it to work properly was by installing it in CGI mode. It tells you
        how to do this is the PHP documentation.

        "mack" <time@.com> wrote in message news:7HGod.5782 $hJ6.5203@trndn y01...[color=blue]
        > I'm trying to get MySQL, Apache, and Php5 to play nice together in Windows
        > but having problems.
        > I don't want to install those automatic 'all-in-one' packages because I[/color]
        want[color=blue]
        > to know how to do it myself. I think I installed Apache correctly because
        > when I type http://localhost in my browser I see my directory, but echo
        > phpinfo() gets me a blank page. Can someone please point me to a resource
        > that explains how to get php5 working?
        >
        > I put the doc root path in my php.ini to point to C:\Program Files\Apache
        > Group\Apache2\h tdocs and no go..
        > Also, am I suppose to put my public_html folder inside of htdocs in tact,[/color]
        or[color=blue]
        > do I empty the contents of my public_html into htdocs?
        > Thanks
        >
        >[/color]


        Comment

        Working...