Results 1 to 4 of 4
  1. #1
    04blatca is offline Freshman
    Join Date
    Jul 2010
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default [Tutorial] Installing Apache,PHP and cURL on windows server.

    FOR MORE TUTORIALS VISIT: http://www.mywebforums.net


    IMPORTANT: Take backups of all the files you edit during this tutorial, follow the steps in this tutorial at your own risk!

    This tutorial will go through the steps you can take to install apache2, php5 and cURL on a windows server.

    During this tutorial I will be using Windows Server 2003, however this tutorial should be about the same for other windows operating systems.

    Step 1: Download the lastest version of Apache2 for windows from the official site and install it.

    Download the binary version of Apache2 from here:
    Code:
    http://httpd.apache.org/download.cgi#apache22
    Once downloaded, run the program to extract the files to the correct places on the server. Use all the default setup settings...

    Step 2: Download, install and configure PHP to use cURL

    Download the latest version of PHP from here (In the Windows Binaries Section):
    Download the Zip file, not the binary installer.
    Code:
    http://php.net/downloads.php
    Extract the zip file to an easy to remember place, I would recommend C:\PHP

    Open the directory that you extracted PHP into and R
    rename ‘php.ini-recommended’ to ‘php.ini’.
    Open php.ini in a text editor.

    Find the text:
    Code:
    extension_dir = "./"
    and change it to the location that you installed php to as well as \ext
    Code:
    extension_dir = "C:\PHP\ext"
    This tells php where its extensions are located.

    Then, you need to find the list of enabled and disabled extensions in php.ini. Find the text "Dynamic Extensions" and you will find the list of extensions.

    If an extension has a semi-colon in front of it, the extension is disabled.

    To enable cURL in PHP remove the semicolon from:
    Code:
    ;extension=php_curl.dll
    So it looks like:
    Code:
    extension=php_curl.dll
    PHP is now configured to use cURL.

    Step 3: Configure apache to use PHP.

    Browse to where you installed Apache2 and browse to the conf folder:
    Code:
    C:\Program Files\Apache Software Foundation\Apache2.2\conf
    Open httpd.conf in a text editor.

    Add this to the bottom of the file:
    Code:
    LoadModule php5_module "C:/PHP/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    PHPIniDir "C:/PHP/"
    To test that PHP has been correctly installed click ‘Start > All Programs > Apache > Configuration > Test Configuration’.
    If the console windows pops up and disappears quickly, the configuration is ok.
    If there is a problem, note down the errors and post them in this thread and I'll do my best to help you.

    So Apache can start using PHP, you will need to restart it, you can do this by going to: ‘Start > All Programs > Apache > Control > Restart’.

    Done! You should now have a running apache web server with PHP and cURL working!

    Step 4: Test that it's all working.

    Create a file named phpinfo.php in the htdocs folder(The default website folder) in the apache directory and add this to it:

    Code:
    <?php
    phpinfo()
    ?>
    Then browse to
    Code:
     http://localhost/phpinfo.php
    on the server browser and you should see the php info page, where you can see that cURL is also enabled.

    If it doesn't display the php info page, double check that you did everything correctly and test again. If it still doesn't work, post in this thread and I'll do my best to help you.

    © 04blatca & haynes11 http://www.mywebforums.net

    You may not copy this tutorial without my permission.

    Please let me know by replying below if you find anything wrong with this tutorial,

    Thanks

    04blatca

    FOR MORE TUTORIALS VISIT: http://www.mywebforums.net


    Please have the courtesy to say thanks if you found this useful!

  2. #2
    haynes11 is offline Freshman
    Join Date
    Sep 2010
    Posts
    19
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    tell us if you found this useful

  3. #3
    emma1 is offline Freshman
    Join Date
    Dec 2010
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    First, extract the PHP package ( php-4.3.10-Win32.zip ). I extracted the package in the directory where Apache was installed ( C:\Program Files\Apache Group\Apache2 ). Change the new created directory name to php ( just to make it shorter ). Then copy the file php.ini-dist in PHP directory to you windows directory ( C:\Windows or C:\Winnt depends on where you installed Windows ) and rename the file to php.ini. This is the PHP configuration file and we'll take a look what's in it later on.
    Next, move the php4ts.dll file from the newly created php directory into the sapi subdirectory. Quoting from php installation file you can also place php4ts.dll in other places such as :

    • In the directory where apache.exe is start from ( C:\Program Files\Apache Group\Apache2 \bin)
    • In your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and %SYSTEMROOT% directory.
      Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
    • In your whole %PATH%

    Side Note : Thanks to Shannon Tang for pointing this out

  4. #4
    somkant is offline Senior
    Join Date
    Aug 2011
    Posts
    671
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Feedback Score
    0

Similar Threads

  1. Enable Url Rewriting on Apache Server 2.x
    By manik in forum Apache Server
    Replies: 10
    Last Post: 09-26-2011, 07:42 AM
  2. Error during installing windows XP.
    By hitech in forum Computer and Tech
    Replies: 6
    Last Post: 03-02-2011, 04:12 AM
  3. Replies: 0
    Last Post: 09-07-2010, 08:52 AM
  4. cheap windows dedicated server with smarter mail and free Windows 2003/2008 server OS.
    By hostrightnow in forum Marketplace - Buy, Sell & Trade
    Replies: 0
    Last Post: 06-15-2010, 04:17 AM
  5. URL rewriting..apache server..
    By seoladder in forum PHP
    Replies: 2
    Last Post: 05-15-2010, 12:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Partners: BOSTON WEB DEVELOPER, LLC   |   WEBCOSMO CLASSIFIEDS