I have attached a zip file containing my php.ini file, my .php file and the error message that I receive back when attempting to send the form on a MAIL POST basis.

I was originally using Apache but have got rid of that and taken out the old php.ini file. I am now using WAMP and PHP Designer 2007.

If anyone could offer me some advice on this one it would be great.

I have checked and my SMTP is working all ok so there is no reason why when sending the form the email shouldnt come through.

This is very confusing me.

    You're using your ISP's mail server, and they appear to have SMTP authentication enabled.

    PHP's internal mail() function can't handle SMTP authentication, so you might try finding a class (e.g. PHPMailer) that can do authentication, give it your e-mail login credentials, and try sending mail that way.

    EDIT: Oops, didn't see the error message. So php isn't reading your php.ini file, obviously. Where is this php.ini file located, and where does PHP think the file is (hint: phpinfo())?

    EDIT2: Note that the problem I mentioned above will still prevent you from sending mail using PHP's mail() function, but we should still resolve your .ini issue first.

      I have placed the php.ini file within C:\Windows directory.

      Is this correct or should it be within the System or System32 directory.

      Before switching to using WAMP everything was working all ok

        I just leave it in the same directory as I installed PHP in, so for me it's C:\php\php.ini . What you need to do is open up the Apache httpd.conf file and add "PHPIniDir c:\php\" (or whatever the correct directory is for you) and restart your webserver.

        I don't recall offhand, but the PHPIniDir directive might only be available since Apache 2. I'm also assuming you're running PHP as an ISAPI .dll module versus the CGI binary method.

          Thanks for the response.

          I will check this when I get home this evening and see if it resolves the problem.

            Still not working.

            Have attached my httpd.conf file...have tried to find where you mention to add in the extra line of code but cannot find it.

            Maybe its already in there.

            Also I have taken out the php.ini from the Windows folder and just updated the one within WAMP

              Doesn't matter where exactly you add it... I usually do it right underneath the "LoadModule" directive that loads the PHP .dll filter.

                ok so if I add just below the Load Modules the following line...

                "PHPiniDir C:\wamp\www"

                Is that the correct format or does it need to be added as an actual Load Module.

                  I would use forward slashes in case there's some weird escaping going on there. Here's what my httpd.conf file has:

                  PHPIniDir "C:/php"

                  So, if php.ini is in the "www" folder, then yes, that's right.

                    Thanks for your help, all resolved now by acciding in the PHPIniDir "C:/wamp/www

                      Write a Reply...