PHP mailfunction error.




Session “default” started at 2013-04-20T12:31:45+0000

#1 ERROR: Error: mail() [<a href=’function.mail’>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in ‘C:\wamp\www\public\projects\library\swift\lib\classes\Swift\Transport\SimpleMailInvoker.php’ on line 50 (error code: 2)
Time since start: 1.4565789699554 seconds

Session “default” started at 2013-04-20T12:37:42+0000

#1 ERROR: Error: fsockopen() [<a href=’function.fsockopen’>function.fsockopen</a>]: unable to connect to ssl:// (Unable to find the socket transport &quot;ssl&quot; – did you forget to enable it when you configured PHP?) in ‘C:\wamp\www\public\projects\library\PEAR\Net\Socket.php’ on line 136 (error code: 2)
Time since start: 0.4566478729248 seconds



1.enable extension=php_openssl.dll in php.ini

2.Check if include path pointed  to correct PEAR  directory

3. find out which php.ini is using by webserver by creating a test file with content  <?php phpinfo(); ?>

4.  open  the correct php.ini found in step 3 e and search for

; Windows: “\path1;\path2”
include_path = “.;c:\PEAR”

if it is linux you may need to change back-slash to forward-slash(/).

Failed to initialize storage module- PHP error -IIS

PHP Error  :

Fatal error: session_start() [function.session-start]: Failed to initialize storage module: files (path: )


Uncomment   session.save_path =    line  and define the tmp folder for example “C:\tmp” , so  the line looks like

session.save_path =  “C:\tmp”

Also make sure that tmp directory is writable by IIS user