Setting Apache to load PHP modula not working?

Help needed with making Apache run php

have been following the instruction from the book Build your own database driven web site . Also from this sites web pages :

http://www.youtube.com/watch?v=7QLyBNWSe8E

have install the correct Php 5.4 Thread safe windows binaries and the Apache •Win32 Binary without crypto (no mod_ssl) (MSI Installer)

PHP was install to root c:\ and apache also installed to root

Apache runs turns green and I get the welcome screen. when I edit the config file to load the handler for Apache to load the php module ,Apache doesn’t run and gives the error … The requested operation has failed!.

Syntax error at line XXX in httpdd.conf:

cant load module into server    c:/php/php5apache2_2.dll


# PHP5 module
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

I no for certain that the root address is right
thanks for help

Technology changes pretty fast, so it’s entirely possibly that those books and videos no longer have the correct steps. You may have to always read the product’s installation notes to make sure you’re getting the right instructions.

First possible issue you might run into is incompatible PHP/Apache builds. In particular, on the Windows download page for PHP, the message along the left side talks about which builds of Apache you’ll have to use and why other builds may be incompatible.

Next possible issue is that the PHP download comes with several dll files to accommodate different versions of Apache. If you’re working with a fresh Apache install, then you probably have the latest 2.4 version, which means you’ll have to reference php5apache2_4.dll instead of php5apache2_2.dll.

Ah thanks for the reply have changed file to 2_4 still not loading… will have a good read of your first answer to see if I have right build
Thanks jeff

Hello Jeff
Have now got apache 2.0.64 and php 5.2.17 to work together. The probem was fixed by downloading the php ZIP file and not the installer version.

I now want my local machine to email me back from my contact forms.

So has I edit the php.ini file
From this

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

To this :

[mail function]
SMTP = mail.yahoo.com
smtp_port = 25
sendmail_from = andy_tvw@yahoo.co.uk

It doesn’t sent the email to my yahoo

have changed port to 465 and 995
have changed smtp: to pop.mail.yahoo.co.uk

[mail function]
; For Win32 only.
SMTP = smtp.mail.yahoo.co.uk
smtp_port = 465

Cant get any combination to work
can you help
thanks andy

Hey Andy,

You can use a program called Fake Sendmail which emulates the linux program which usually sends email on behalf of PHP. There is a tutorial here: http://www.jacmoe.dk/how-to-send-test-emails-using-php-mail-from-your-local-wamp-installation - it’s dead simple to set up. Ignore the references to WAMP in tutorial, and just change the paths to reflect the directory where you put Fake Sendmail.

Thanks fretburner will give that a go…

Going back to the question do u think I have the right format for writing the mail function in the php.ini file

In my own local php.ini, all those lines are actually commented out… the only one I’ve got in there is that one from the tutorial I linked to:
sendmail_path = "d:\\wamp\\bin\\sendmail\\sendmail.exe -t"
and that’s all that is necessary to get it working - the smtp config goes in sendmail.ini