PHP Logo

Setting Up A Linux And Apache Server For Deployer

17th May 2018 - 8 minutes read time

Deployer is an amazing tool that is used to deploy websites (hence the name). I have looked at other tools, but because Deployer is built and run using PHP, using it to deploy PHP sites makes sense. It also means that I don't have to figure out complex XML documents or learn Ruby just to understand what the deployment is doing.

I have been using Deployer for a little while now to deploy my own site but I have been using the root user to accoumplish the deployments to get around any permissions issues. When I sat down with the developers at work we looked into how to setup the server so that deployments could be run without giving the tool unfettered access to the server. To this end we set out a plan to create a 'deployer' user on our servers that would be the user Deployer uses to deploy sites.

Collecting Information

Read the full article

PHP Logo

Get The IP Address Of A Visitor Through PHP

12th November 2008 - 2 minutes read time

I have talked previously about getting an IP address of a visitor with PHP. The failing in using the value of $_SERVER["REMOTE_ADDR"] is that if the visitor is using a proxy then you will get the proxy IP address and not the visitors real IP address.

This function works by going through any variables in the $_SERVER array that might exist that would contain information to do with IP addresses. If they are all empty then the function finally looks at $_SERVER["REMOTE_ADDR"] value and returns this as a default.

Read the full article