cjbillings9742 — 2011-03-28T03:26:57-04:00 — #1
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
styloa — 2011-03-28T06:07:40-04:00 — #2
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.....
carltild — 2012-06-10T16:50:26-04:00 — #3
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
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?
dklynn — 2012-06-10T18:31:19-04:00 — #4
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.
carltild — 2012-06-11T10:28:17-04:00 — #5
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.
wwb_99 — 2012-06-11T16:25:22-04:00 — #6
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.
serverstorm — 2012-06-13T11:23:28-04:00 — #7
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
dklynn — 2012-06-14T05:01:36-04:00 — #8
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.
wwb_99 — 2012-06-16T10:21:54-04:00 — #9
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.