This article really demystifies how php sessions should and should not be used. Especially if you are using a lot of AJAX within a page and they all use session, being efficient with closing sessions immediately after you’re done is a must.
Another hair pulling session that all ended well.
Make a secure call to a server using a httprequest and get the httpresponse for further processing.
Android http request and response:
HttpClient client = new DefaultHttpClient(); HttpGet req = new HttpGet("https://www.example.com"); HttpResponse res = client.execute(req);
javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
The issue is that cert from GoDaddy was installed but not installed completely. An Intermediate cert is required for the server/domain in order to have a fully installed cert.
We just moved a service that was running on the Microsoft stack (Windows Server 2008, .NET, MSSql Server, IIS) to an open source stack (Ubuntu Server, php, Codeigniter framework, apache2, postgres).
We now run the service on a cloud server with dual cpu and 256MB ram (Yes, that’s megabytes).
The old server ran on dual core with 2GB of ram.
Three places need to change to do this.
sudo a2enmod rewrite
Add AllowOverride All to virtual host file
Add RewriteEngine On to .htaccess
If you are getting error messages when starting apache2 like
“Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName”
“[warn] _default_ VirtualHost overlap on port 80, the first has precedence”
you need to make sure a couple of lines are in your /etc/apache2/httpd.confÂ file.
This is where to get the fastcgi dll.
Sample Apache virtual host configuration
Options Indexes FollowSymLinks
Allow from all
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AddHandler fastcgi-script .fcgi
CustomLog “logs/testapp.dev-access.log” common
Just encountered a problem that was painful to deal with while configuring SSL on apache for linux.Â The httpd.conf had a tag,
$ service httpd -D SSL -k start
Also, I found that restart does not always take new changes to my conf files.
$ service httpd -D SSL -k restart
Instead, use the stop then the start command to be sure.
$service httpd -D SSL -k stop
$service httpd -D SSL -k start
That was a source of much pain while working on this particular server.