Install Nginx, PHP, Mysql – Debian

Nginix is great web server it’s much faster then apache server, but we need to make some tasks to install and configure Nginix with PHP.

1) Install mysql server and other tools which we need

apt-get install gcc libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev openssl libxml2-dev libevent-dev mysql-client mysql-server

2) Normally debian already includes Nginix

apt-get update

apt-get install nginx

3) Now we can install PHP and extensions

apt-get update

apt-get install php5 php5-fpm php-pear php5-common php5-mcrypt php5-mysql php5-curl php5-cli php5-gd php5-dev

4) Start all services

service nginx start

service php5-fpm start

service mysql start

5) Start php,mysql,nginx at start

update-rc.d nginx default

update-rc.d mysql defaults

update-rc.d php5-fpm defaults

There was a problem creating the parked domain – Cpanel

There was a problem creating the parked domain. Show Details

Error from park wrapper: Using nameservers with the following IPs: xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

FIX :

If you have access to WHM you must make this change –

WHM > Tweak Settings > Domains > Allow Remote Domains > On

Delete Duplicate Rows In Mysql With PHP

$dupq = mysql_query("SELECT * FROM `db`");
$dups = mysql_fetch_array($dupq);
foreach($dups as $dup){
mysql_query("DELETE FROM db WHERE duplicate_COLUMN='".$dup['duplicate_column']."' AND id!='".$dup['id']."'");
}

duplicate_COLUMN – Name of column and $dup[‘column_name’] delete duplicates which include same column data.