Apache 2.0, php 5 and mysql + win xp

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • genenamg@yahoo.com

    Apache 2.0, php 5 and mysql + win xp

    Hi,

    I am trying to run and configure Apache 2.0, php 5 and mysql on win xp
    professional - this is the first time I have tried to install and
    configure all three. I am having difficulty trying to configure them
    on my computer. Can somebody help me - this is what I have done so
    far.

    Installed Apache 2.0, it worked perfectly ( I checked with my browser -
    http://localhost) till the point where I started to point where I
    wanted to store my html files. I have named the folder html_files and
    have changed the DocumentRoot "C:/html_files" and <Directory
    "C:/html_files/htdocs"> on the configuration file. And now it does not
    work (http://localhost does not work). I get an error message saying
    "You don't have permission to access / on the server". What am I doing
    wrong?

    Also I have installed and configured php 5, renamed Rename
    e:\php\php.ini-dist it to php.ini and enterd the following on the
    apache configuration file

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

    Obviously it does not work because apache is not working? Can somebody
    help me? And how do I install and configure mysql?

    Thanks,
    Gene

  • André, PE1PQX

    #2
    Re: Apache 2.0, php 5 and mysql + win xp

    > Hi,[color=blue]
    >
    > I am trying to run and configure Apache 2.0, php 5 and mysql on win xp
    > professional - this is the first time I have tried to install and
    > configure all three. I am having difficulty trying to configure them
    > on my computer. Can somebody help me - this is what I have done so
    > far.
    >
    > Installed Apache 2.0, it worked perfectly ( I checked with my browser -
    > http://localhost) till the point where I started to point where I
    > wanted to store my html files. I have named the folder html_files and
    > have changed the DocumentRoot "C:/html_files" and <Directory
    > "C:/html_files/htdocs"> on the configuration file. And now it does not
    > work (http://localhost does not work). I get an error message saying
    > "You don't have permission to access / on the server". What am I doing
    > wrong?
    >
    > Also I have installed and configured php 5, renamed Rename
    > e:\php\php.ini-dist it to php.ini and enterd the following on the
    > apache configuration file
    >
    > LoadModule php5_module "c:/php/php5apache2.dll "
    > AddType application/x-httpd-php .php
    > PHPIniDir "c:/php"
    >
    > Obviously it does not work because apache is not working? Can somebody
    > help me? And how do I install and configure mysql?
    >
    > Thanks,
    > Gene[/color]

    Hi Gene,

    There are also complete webserver packages, check
    http://www.wampserver.com/en/index.php or http://www.devside.net

    Good luck!

    André

    --
    73' André, PE1PQX
    Mijn site: http://pe1pqx.dyndns.org


    Comment

    • Robert Ionescu

      #3
      Re: Apache 2.0, php 5 and mysql + win xp

      genenamg@yahoo. com wrote:[color=blue]
      > I have named the folder html_files and
      > have changed the DocumentRoot "C:/html_files" and <Directory
      > "C:/html_files/htdocs">[/color]

      If you set your DocumentRoot to C:/html_files but the directory section
      for the htdocs folder (which permits access via "allow from all") to a
      sub directory, this won't work of course.

      So either use
      DocumentRoot "C:/html_files/htdocs" or change the directory section to
      what you have set the DocumentRoot:

      <Directory "C:/html_files">
      [color=blue]
      > Also I have installed and configured php 5, renamed Rename
      > e:\php\php.ini-dist it to php.ini[/color]

      Why e:\? Is this just a typo?
      [color=blue]
      > LoadModule php5_module "c:/php/php5apache2.dll "
      > AddType application/x-httpd-php .php
      > PHPIniDir "c:/php"[/color]

      That looks correct. Did you check the windows event logging for any
      error messages? If you find there an error message like "Cannot load
      module...", may be some DLLs are missing. You can use a tool called
      FileMon [1] which can show you the dll files apache is looking for.

      [1] http://www.sysinternals.com/ntw2k/source/filemon.shtml

      --
      Robert

      Comment

      • Darkdanian

        #4
        Re: Apache 2.0, php 5 and mysql + win xp

        genenamg@yahoo. com wrote:
        Hi,
        >
        I am trying to run and configure Apache 2.0, php 5 and mysql on win xp
        professional - this is the first time I have tried to install and
        configure all three. I am having difficulty trying to configure them
        on my computer. Can somebody help me - this is what I have done so
        far.
        >
        Installed Apache 2.0, it worked perfectly ( I checked with my browser -
        http://localhost) till the point where I started to point where I
        wanted to store my html files. I have named the folder html_files and
        have changed the DocumentRoot "C:/html_files" and <Directory
        "C:/html_files/htdocs"on the configuration file. And now it does not
        work (http://localhost does not work). I get an error message saying
        "You don't have permission to access / on the server". What am I doing
        wrong?
        >
        Also I have installed and configured php 5, renamed Rename
        e:\php\php.ini-dist it to php.ini and enterd the following on the
        apache configuration file
        >
        LoadModule php5_module "c:/php/php5apache2.dll "
        AddType application/x-httpd-php .php
        PHPIniDir "c:/php"
        >
        Obviously it does not work because apache is not working? Can somebody
        help me? And how do I install and configure mysql?
        >
        Thanks,
        Gene
        >
        from:


        One of the biggest topics here at Apache Lounge is running PHP on
        Apache. It is a topic that is constant and for some reason often
        confused. Confused namely by varying ways to accomplish the same thing.
        The following has been tested numerous times, and seems (at least so
        far) to be easy to follow.Mr. Green

        ExclamationIF YOU INSTALLED APACHE USING A MSI FILE THENExclamation
        (otherwise skip down to CONTINUE section):
        I have not tested Apache Software Foundation (ASF) MSI installation
        applications lately, but the last time I tested the MSI FAILED to remove
        to some things that can cause problems later on during the Un-Install
        process. BEFORE you UN-INSTALL the MSI file, open a command prompt and
        navigate to the BIN folder of Apache. Now, uninstall the service:

        httpd -k uninstall

        Now that the service is removed, uninstall Apache and then ALL PHP
        entries (files [php5ts.dll and others depending on what each person has
        done in the past] that you copied from where ever to where ever -
        usually into the Windows\System3 2 folder).

        ArrowCONTINUE:
        Install the Microsoft VC++ Redistributable . The reason for this is
        because it is NOT included in the latest versions of Windows; and
        Steffen's builds are compiled using Microsoft Visual C++ 2005. The
        Redistributable can be downloaded at the link below:

        http://www.microsoft.c om/downloads/details.aspx?fa milyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&di splaylang=en

        Download httpd-2.2.2-win32-x86-ssl.zip from
        http://www.apacheloung e.com/download/

        Unzip this ZIP file in a new folder called something like C:\Apache2.
        Then, read the file named Read Me First !!.txt. It will tell you how to
        setup the service for Apache. If you want or need ApacheMonitor you can
        create shortcuts however you like. Before installing ANYTHING else,
        ensure Apache will start. After you validate that Apache starts, stop it
        before proceding.

        If you are still with me, now download PHP 5.x from PHP.net you want
        this file: php-5.x.xx-Win32.zip (where x relates to the latest stable
        version number)

        Extract the contents of this file and move the contents to where you
        intend to use PHP such as C:\PHP5.

        NEXT, overwrite the php5apache2.dll with Steffen's version - READ the
        'ReadMe' file for possible changes:

        php5apache2.dll-php5.1.x.zip from http://www.apacheloung e.com/download/


        Navigate to the PHP folder and edit the php.ini-recommended. FIND the
        extension_dir directive and change so that it properly locates the EXT
        folder:

        extension_dir = "C:\php5\ex t"

        Save the file as php.ini.

        Add the folder that you put the PHP files into in the PATH ENVIRONMENT
        (System Properties | Advanced | Environment Variables | System variables
        | Path).

        Example:
        Variable name: Path
        Variable value: C:\php5;%System Root%\system32; .....

        DO NOT WORRY with coping files over to the Windows folders, the reason
        for this to begin with is because Windows folder is already in the Path.
        Since you have added the PHP folder to the Path you do not need to copy
        or move files to the Windows folder. This will make upgrading PHP
        simpler as well and allows you to keep PHP all together. To upgrade PHP
        in the future, all you need to do is delete the contents of the PHP
        folder, and then extract the contents of the new version into the PHP
        folder.

        Finally, this should be the last step, edit the Apache CONF file with:

        LoadModule php5_module "c:/php5/php5apache2.dll "
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php .php-source .phps
        # configure the path to php.ini
        PHPIniDir "c:/php5"

        This is how I put together WAMP, and I do it often (web application tester).

        I hoped this helped.

        Comment

        Working...