Archive for the ‘xampp’ Category

Perform a simple load test of a script

Wednesday, May 1st, 2013

Install xampp

command line: C:\xampp\apache\bin>ab.exe -n 20 -c 5 “URL”

 

Sending mail xampp gmail

Thursday, January 1st, 2009

source/reference:

http://expertester.wordpress.com/2010/07/07/how-to-send-email-from-xampp-php/

If you’re developing on your local xampp environment, eventually you will need your apps to actually send mail:

Change the following lines in your php.ini
(usually here C:\xampp\php\php.ini, but possibly also php5.ini, and/or C:\xampp\apache\bin\php.ini):

SMTP = smtp.gmail.com
smtp_port = 587
sendmail_from = [your_gmail_username]@gmail.com]
sendmail_path = “:\”C:\xampp\sendmail\sendmail.exe\” -t”

Change your sendmail.ini to read as follows (again, usually C:\xampp\sendmail\sendmail.ini):

account Gmail
tls on
tls_certcheck off
host smtp.gmail.com
from [your_gmail_username]@gmail.com]
auth on
user [your_gmail_username]@gmail.com]
password [your_gmail_username]@gmail.com
port 587
account default : Gmail

Simple example test script to see that it worked:

<?php
$from_name = “yourName”;
$from_email = “whichEver@gmail.com”;
$headers = “From: $from_name <$from_email>”;
$body = “Hi, \nThis is a test mail from $from_name <$from_email>.”;
$subject = “Mail from my development environment”;
$to = “yourUserNameHere@gmail.com”;

if (mail($to, $subject, $body, $headers)) {
echo “success!”;
} else {
echo “fail…”;
}
?>