Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4

    need help installing apache , php , mysql properly ...


    hello i am new to coding ..

    i was hoping to install apache ,php and mysql together in the hopes of testing some scripts ..

    i followed lots of tutorials all dealing with different versions of the apache ,php and mysql ...

    in the end the installation ends up in some error ...

    this was the last one i followed ..but it gave me errors too ...

    How install Apache 2.4 PHP 5.6 and MySQL 5.6.26 on Windows 10 - Life of a Geek Admin

    please help ? which versions are stable to install and how do i do it ??
    Last edited by digimon; January 10th, 2016 at 12:55 PM.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,464
    Rep Power
    70
    Which errors do you speak of?

    When I install, I most always just download the latest version. Most all is a simple copy/paste.

    Can you define to us where you extracted your files, what files you altered, and how?
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    It's difficult to help you troubleshoot the install without any info on what errors you received.

    The instructions you linked to are a little out of date on the versions to install. Are those the exact versions you tried to install?

    Since you haven't provided enough info on what you did and the errors you received, I can't say if you're very close or not. I would suggest starting with a clean slate by uninstalling everything and stat over and install the latest/newest version of each starting with apache.
    Apache VC14 binaries and modules download

    The first step is to install the C++ Redistributable Visual Studio 2015 Update 1 : vc_redist_x64/86.exe.

    Then download and extract the apache httpd-2.4.18-win64-VC14.zip file. Follow the install instructions in the ReadMe.txt file.

    At this point apache should be running and can be tested. Once that has been accomplished, we can move on the next step which is installing php v7.0 not 5.6.
  6. #4
  7. No Profile Picture
    Super Moderator
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,464
    Rep Power
    70
    FishMonger mentioned your first steps well. Once those are successful, and you are ready to move on to installing PHP, do you know how you plan on running such? CGI, FastCGI, or an Apache Module.

    I personally prefer to avoid installation packages, because with them, you have no clue what just happened. You place 1 click and the installer does it all, so you then know nothing of your server. The only installer I do slide in is the MySQL installer. Nothing else. (Just my personal reference.) I then know where everything is and how it is set up and running.
    Last edited by Triple_Nothing; January 12th, 2016 at 07:39 AM.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4
    ok .. thanks for the replies ..

    first of all i am running on windows 7 , 64 bit operating system ...

    installed vc_redist_x64.exe.

    i downloaded the latest version of apache from

    Apache VC14 binaries and modules download

    httpd-2.4.18-win64-VC14.zip

    unzipped and saved to

    c:\Apache24

    then i downloaded the latest version of PHP ...

    PHP 7.0 (7.0.2)

    VC14 x64 Thread Safe (2016-Jan-06 23:30:09)


    unzipped and saved to

    c:\php

    now i have two folders in my c:\ drive

    c:\Apache24
    c:\php


    next step i thought i would follow is this one ...

    Edit Apache’s config file, c:\Apache24\conf\httpd.conf and add the following lines to the bottom of the file.

    LoadModule php5_module "c:/php/php5apache2_4.dll"
    AddHandler application/x-httpd-php .php
    # configure the path to php.ini
    PHPIniDir "C:/php"
    since its php 7 , i am not sure what to save there ....

    ok i tried to start apache from command line ...

    but its showing me this ...



    i clicked the apachemonitor.exe ...

    and apache is working now ...
    Last edited by digimon; January 11th, 2016 at 02:32 AM.
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    Adelaide - Australia
    Posts
    167
    Rep Power
    10
    I just use XAMPP on a Windows 7/64 bit pc - wouldn't that be a lot easier than installing 'raw' Apache etc?
  12. #7
  13. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4
    i have never tried XAMPP before .. but i have been trying to make this apache , php , mysql combination work for some time ... i have tried atleast 15 times to make it work ...

    but most of the time cant get the localhost/phpinfo.php to work ....

    anyway i like this combination a bit better compared to XAMPP or WAMP ...
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4
    i tried to follow this tutorial too ..

    https://danielarancibia.wordpress.co...nt-on-windows/


    AddHandler application/x-httpd-php .php
    AddType application/x-httpd-php .html .html
    LoadModule php7_module “c:/php7/php7apache2_4.dll”
    PHPIniDir “c:/php7”
    and changed the files according to my folder names ...

    c:\Apache24
    c:\php


    AddHandler application/x-httpd-php .php
    AddType application/x-httpd-php .html .html
    LoadModule php7_module “c:/php/php7apache2_4.dll”
    PHPIniDir “c:/php”
    still

    localhost/phpinfo.php

    not working ...
    Last edited by digimon; January 12th, 2016 at 05:37 AM.
  16. #9
  17. No Profile Picture
    Super Moderator
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,464
    Rep Power
    70
    Since you say Apache works, I assume you mean that an HTML page will successfully load, not just that the Apache server will start. When attempting to load a PHP page, what error do you get, or what happens?

    Here is what my configs would look like w/ your directories, other than the fact this is running PHP as FastCGI, which you are not. I only included this if the Apache module wasn't exactly your final decision, and you happened to be considering the options. If not, disregard this example.
    <IfModule fcgid_module>
    # Where is your php.ini file?
    FcgidInitialEnv PHPRC "C:/php"
    FcgidMaxRequestLen 2147483648
    AddHandler fcgid-script .php
    FcgidWrapper "C:/php/php-cgi.exe" .php

    FcgidIOTimeout 1200
    FcgidConnectTimeout 1200
    FcgidBusyScanInterval 1200
    FcgidBusyTimeout 1200
    FcgidErrorScanInterval 1200
    FcgidIdleScanInterval 1200
    FcgidIdleTimeout 1200

    FcgidProcessLifeTime 3600
    FcgidZombieScanInterval 1200
    </IfModule>
    <Directory "C:/php">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>
    Last edited by Triple_Nothing; January 12th, 2016 at 08:15 AM.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  18. #10
  19. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4
    ok let me do this once more from scratch again ...

    httpd-2.4.18-win64-VC14
    php-7.0.2-Win32-VC14-x64

    these are the versions of apache and php i am using right now ...

    extracted the files to ...

    c:\Apache24
    c:\php

    now to make apache work

    go to

    c:\Apache24\bin

    ApacheMonitor.exe

    ... "it works" ...

    as for running apache and php together ...

    i dont know what exactly my options are ...

    the only thing i know how to make these two work together is to load php as a module ... in

    C:\Apache24\conf\httpd.conf

    somewhere in that file i have to add these lines to make apache and php work together


    LoadModule php5_module "c:/php/php5apache2_4.dll"
    AddHandler application/x-httpd-php .php
    # configure the path to php.ini
    PHPIniDir "C:/php
    AddHandler application/x-httpd-php .php
    AddType application/x-httpd-php .html .html
    LoadModule php7_module “c:/php/php7apache2_4.dll”
    PHPIniDir “c:/php”
    then you also have to rename the file C:\php\php.ini-development to C:\php\php.ini

    now for testing if the php installation has gone right ...

    Create the following text file C:\Apache24\htdocs\phpinfo.php

    <?php
    phpinfo();
    ?>
    when i open
    ... i am supposed to get some information about php listed in that page ...

    but i get a blank page ...


    i think i am also supposed to set the enviornment variables to c:\Apache24; c:\Apache24\bin

    PATH ENVIRONMENT (System Properties | Advanced | Environment Variables | System variables | Path).

    to make it work together ...


    but the problem is after all these , i still get a blank page when i go to ...


    what are my other options ... ??

    if none of these works , i might have to start sticking to WAMP ...
    Last edited by digimon; January 12th, 2016 at 11:41 AM.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    It looks like you're intermixing config lines for both php 5 and php 7, which may be the cause of the problem.

    Lets start by removing all of the php related lines you added to httpd.conf.

    You only need to add 3 lines.
    Put this one at the end of the list of the other LoadModule lines.
    Code:
    LoadModule php7_module "c:/php/php7apache2_4.dll"
    This one could go directly under the LoadModule statement (seperated by at least 1 blank line).
    Code:
    PHPIniDir "C:/php"
    Scroll down to where you find several other AddHandler statements and add this one just below them (about line 425).
    Code:
    AddHandler application/x-httpd-php .php
    Save the file.

    Now, copy php.ini-production to php.ini and make the changes recommended here.

    Stop and restart the apache service. At that point the following phpinfo.php script should work correctly.
    PHP Code:
    <?php
      phpinfo
    ();
    ?>
    These are the exact steps I took this morning. The difference in my case is that I'm on Win7 32 bit and used the 32bit binaries instead of the 64bit ones.

    If it still doesn't work for you, then please post your complete config files (httpd.conf and php.ini).

    Once we get this part working, we can move on to the mysql install, if needed.

    Comments on this post

    • digimon agrees
  22. #12
  23. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4
    amazing , it worked ...

    this has to be the 20th time i was trying to make this work ...

    thanks a lot FishMonger ...
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    Glad to hear it's now working.

    Do you still need help with the mysql install?

    Comments on this post

    • digimon agrees
  26. #14
  27. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    109
    Rep Power
    4
    yes i need a little bit more help with mysql installation ...

    i installed mysql and got a mysql console ...



    i downloaded this file ...


    mysql-installer-community-5.6.28.0

    but i could not install it to any custom directory ... there was no option for it ...

    how do i install it the proper way ... ?

    and if i install mysql in its default directories , would all these three work together properly ??
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Apr 2009
    Posts
    2,232
    Rep Power
    1296
    Install mysql in its default location and it will work correctly with your php scripts.

    It can be installed in a custom directory, but that can lead to problems.
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo