SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Apache Configuration

    Help!
    I have gone over and over tryingto find the error Apache gives when I try to run it after I installed PHP. The error says "Cannot load C:/Program Files/Apache Software Foundation/Apache2.2/C/PHP/php5apache2_2_17.dll into server: The specified module could not be found.
    I have put in php5apache2_2.dll and put it with this last error. No matter what I put in it is wrong. I am just learning and I think this may be way over my head. Will anyone help me? My php is php5.2.17-Win32 VC6x86
    Thanks
    Cindy

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2009
    Location
    Maidenhead, UK
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you trying to set up Apache + PHP on a local Windows machine?

    I would recommend grabbing WAMP server.

    One easy package to install and you get Apache + PHP + MySQL all working together nicely. The extra bonus is that WAMP server lets you easily swap versions of PHP - very handy when you need to test something on a very specific version.....
    -------------------------------------------------------
    UK postcode->address lookup : www.CraftyClicks.co.uk
    a piece of my brain : adam.stylo.name (at your own risk)
    -------------------------------------------------------

  3. #3
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I am wondering if someone could help me in configuring Apache to work with PHP. I am using the book "Build Your Own Database Driven Website Using PHP & MYSQL".
    I've decided to go for the manual install option and I need to access the file "httpd.conf" in notepad to make a few changes plus add the following code at the end of the file before restarting Apache:

    LoadModule php5_module "C:/PHP/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    PHPIniDir "C:/PHP".

    I receive an error message stating that the requested operation has failed when I restart Apache. I've realised that this is because the highlighted file does not exist in my PHP directory. I download my PHP files from http://windows.php.net/download/ as specified in the book (current version 5.4.3).

    Could anybody please help me out with as of why the file doesn't exist or perhaps a different file should be linked to instead?

    Cheers
    Carl

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Carl,

    I began with an early version of Kevin Yank's book and thought the directions (for Windows) were a bit out of order. I created a checklist and, with that, installation went fine. Upon updating to Win7, though, problems arose because the default directories in the install process went to Program Files, a directory protected by Windows. You can beat that problem by using another directory (I use another drive partition for all my web work) for both Apache and PHP - just know what directories you use and specify them in the code above. It's okay to install MySQL 5 into Program Files as it operates as a service.

    From here, I'd recommend UNinstalling Apache so you can actually work with the httpd.conf (and httpd-vhosts.conf) files without it being a total PITA! Yes, you'll still need to edit the C:\Windows\System32\drivers\etc\hosts file AS THE ADMINISTRATOR if you want to create a virtual host on your test server (highly advised!) but that's only a minor inconvenience.

    When installing Apache, be sure that IIS and Skype are not using port 80 (STOP their services and reset their properties to NOT start when Windows loads) and identify your server as localhost at 127.0.0.1. After that, PHP can easily modify the httpd.conf to "register it" and you'll be set.

    BTW, you may also want to change the default location of your localhost's websites as I found it inconvenient to use the htdocs folder for a large number of websites which I setup as VirtualHosts.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  5. #5
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DK,

    How do i go about creating a partition of my drive? Although I do have a 1TB hard drive which I have plenty of space to make use off.
    When you say that PHP can modify the httpd.conf file, would this save me having to go into the .dll file myself.

    It is possibly a Win 7 issue as I have previously installed a virtual server but I cant remember if i was on XP at the time.

    Thanks
    Carl

  6. #6
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Here is the real easy way -- uninstall Apache, get yourself the Web Platform Installer, setup IIS and PHP5 under the platforms section and you'll be good to go. No need to learn how to hand plumb apache on windows in 2012.

  7. #7
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Hi Carltild,

    You can Dynamically resize your ITB drive partition that will leave you with unallocated space. You then format this to NTFS using Windows 7 built-in 'Administrative Tools' and pick a meaningful drive label

    Here is a YouTube video that walks you through the process https://www.youtube.com/watch?v=utUvkgKAtKU
    Quote Originally Posted by Carltild View Post
    DK,

    How do i go about creating a partition of my drive? Although I do have a 1TB hard drive which I have plenty of space to make use off.
    When you say that PHP can modify the httpd.conf file, would this save me having to go into the .dll file myself.

    It is possibly a Win 7 issue as I have previously installed a virtual server but I cant remember if i was on XP at the time.

    Thanks
    Carl
    ictus==""

  8. #8
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Carl,

    As much as I respect wwb_99, I'm fully aware that his avatar used to be MS with a big dollar sign and the words MS Shill. Wyatt is extremely knowledgeable about WinDoze systems but I wouldn't use anything M$ on a production (and, therefore, test either) server.

    Much as SS said, open WinDoze Explorer, right click on My Computer and select Manage (as administrator). Then click the Manage Drives. From there, you can resize, rename, etc to your heart's content. HOWEVER, I've just been through my second bout with WinDoze about moving the OS to a SSD and it's a PITA so, if you have problems, the AOMEI Partition Assistant Pro does an excellent job - much like the old PowerQuest Partition Magic which was bought then killed by Symantec ;(

    Personally, I created a W: drive, named it "Web", and have my Apache and PHP sitting on it along with all my virtual host directories. Of course, you'll still need to edit the hosts file (C:\Windows\System32\drivers\etc\hosts - extensionless file) as Administrator but that's all the PITA you have to deal with Win7 about.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  9. #9
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the kind words. If you don't trust windows why are you running it at all?

    You also might want to encourage this guy to backup before he does potentially destructive operations to his hard drive. Re-partitions are not guaranteed to be successful even in 2012.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •