Skip to content

Instantly share code, notes, and snippets.

View alherd-by's full-sized avatar

Pavel Patapau alherd-by

View GitHub Profile
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
@alherd-by
alherd-by / Dockerfile
Last active August 29, 2015 14:06 — forked from jbroadway/Dockerfile
FROM ubuntu:14.04.1
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:nginx/stable
RUN apt-get update
RUN apt-get install -y wget git nano postfix nginx
RUN apt-get install -y php5-cli php5-common php5-mysql php5-sqlite php5-curl php5-fpm php5-json php5-gd php5-mcrypt php5-intl php5-imap php5-tidy php5-mysqlnd php5-dev
RUN wget -O /etc/nginx/sites-available/default https://gist.github.com/jbroadway/6369183/raw/682a1ed8078cc39f59c3624f460b128addff95db/nginx-default
<?php
$id = $this->in['id'];
if ($id == $this->uid || $this->permissions['profile.get_users'] == 3)
{
$path = $this->core->path_project . "/images/avatars";
$this->sql->query_var("SELECT * FROM `users` WHERE id=:id", array(':id' => $id));
$data = $this->sql->fetch();
if ($data['vkontakte'] != '')
{
$vk_id = $data['vkontakte'];