curl -XDELETE localhost:9200/*
If you are using a stored procedure then use
SET NOCOUNT ON
The problem is that the stored procedure returns a result containing the number of rows affected as the first result.
$NULL = NULL;
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try | |
{ | |
$conn = new PDO ("sqlsrv:server=(local);Database=DatabaseName", "user", "password"); | |
$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); | |
// Param | |
$idReturn = 0; // Param Out | |
$name = 'Name'; // Pram In |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ^~ /xxx { | |
alias /var/www/xxx/public; | |
try_files $uri $uri/ @xxx; | |
location ~* \.php { | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /var/www/xxx/public/index.php; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE xxxDatabase; | |
CREATE USER 'xxxUser'@'localhost' IDENTIFIED BY 'xxxPassword'; | |
GRANT ALL PRIVILEGES ON xxxDatabase.* TO 'xxxUser'@'localhost'; | |
FLUSH PRIVILEGES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteBase /laravel-site |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:laravel-worker] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php /var/www/xxx/artisan queue:work redis --timeout=0 --tries=8 | |
autostart=true | |
autorestart=true | |
numprocs=8 | |
redirect_stderr=true | |
stdout_logfile=/var/www/xxx/worker.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tar -zcvf xxx.tar.gz /var/xxx/ | |
sudo tar -xzvf xxx.tar.gz |