PHP webdeveloper and frontend developer



Problems with MAMP’s MySQL server on Mac OS X Mountain Lion

Category : Apache, Mac and Apple stuff · (4) Comments · by Oct 29th, 2012

Lately I been having a lot of trouble with my MAMP mysql and I think it has something to do with Mac OS X Mountain Lion. Sometimes when I try to start MAMP, my apache server get launched but my mysql server doesn’t. What I do is terminate the mysql process before I startup MAMP and than it works. Execute…

Simple script to check wether my website or webserver is down

Category : Apache · No Comments · by Sep 13th, 2012

I wrote a small script so my monitoring software can check wether something changes on this page. You could add an email function to the script, that alerts you when something goes down. If this page outputs something other than this, the monitoring software will alert me: domain-reachable database-online page-online If everything is down on the server it will output…

How to set an environment variable in Apache that is passed to CGI scripts

Category : Apache · No Comments · by Apr 3rd, 2012

Apache has some default set environmental variables that you can use, but when these don’t suffice we can set our own environment variables within our virtual host configuration. Some default environmental variables that you can use are: SERVER_PORT, SERVER_PROTOCOL, SERVER_ADMIN, DOCUMENT_ROOT, HTTP_ACCEPT and so on. Now, let’s set our own variable within our virtual host configuration:

 

Ipad detection with PHP and htaccess

Category : PHP, Apache · No Comments · by Aug 19th, 2010

This wil return a 1 value if it’s an iPad:

 You also set a redirect with htaccess:

 

Removing the index.php from your codeigniter URL

Category : PHP, Apache · No Comments · by Jul 1st, 2010
Removing the index.php from your codeigniter URL

When you create a standard new codeigniter application, there’s always a index.php in your url. It’s kind of ugly in your url so I prefer to remove this. To remove this you need to do a couple of things: change the $config[‘index_page’] to $config[‘index_page’]=”“ instead of $config[‘index_page’]=“index.php” This will only work is mod_rewrite is enabled on your webserver! Next create a .htaccess file in…

Add www to your domain or remove the www from your domain

Category : Apache · No Comments · by May 26th, 2009
Add www to your domain or remove the www from your domain

Add www in front of your domain This is important not only for aesthetic reasons, but for SEO (Search Engine Optimization). Forcing www before your domain or removing it prevents search engines from ending up with duplicate results and different page ranks per page. Some websites don‘t even return a page when you leave out the www. This depends on how your webserver…

Difference between hashing and encryption

Category : PHP, Apache · No Comments · by Feb 18th, 2009

Nowadays no one is trustworthy anymore on the internet. You wouldn‘t want all your private data to be made public when you buy something online now, would you. This calls for security measures. That‘s where encryption and hashing come into play. Both hashing and encryption use an algorithm to transform insecure plaintext information into a secure enciphered format. Both methods…


s