PIXNET Logo登入

經驗交流分享與備忘

跳到主文

感情最痛恨 劈腿. 背叛 與 欺騙

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 9月 05 週一 201618:15
  • PHP 版本切換 php 5.6 <--> php 7.0

Today I got again problem with PHP 7 running despite I have disabled php7.0 apache module: phpinfo was showing php 7 using fastCGI ...
... So if after you follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module:
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(1,876)

  • 個人分類:
▲top
  • 7月 09 週六 201601:43
  • 在 Ubuntu Linux 16.04 安裝 php 5.6 (預設是 php 7.0)


Remove all the stock php packages
List installed php packages with dpkg -l | grep php| awk '{print $2}' |tr "\n" " " then remove unneeded packages with sudo aptitude purge your_packages_here or if you want to directly remove them all use :

sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`

Add the PPA
sudo add-apt-repository ppa:ondrej/php

Install your PHP Version
sudo apt-get update
sudo apt-get install php5.6

You can install php5.6 modules too for example
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml

Verify your version
sudo php -v

(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(1,078)

  • 個人分類:PHP程式設計
▲top
  • 7月 05 週二 201618:19
  • Persistent network interface names in Ubuntu 15.10 & later

One of the changes introduced in Ubuntu Wily Werewolf is persistent stateless names. It means your network interfaces in ifconfig output will no longer follow the ethX pattern. This solves major problems with predictability of an interface name on Ubuntu if you have multiple cards. This applies to ethernet, WLAN and WWAN interfaces.
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(0)

  • 個人分類:系統安裝
▲top
  • 7月 04 週一 201616:24
  • How do I disable X at boot time so that the system boots in text mode?


Edit /etc/default/grub with your favourite editor, e.g. nano:
sudo nano /etc/default/grub

Find this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Change it to:
GRUB_CMDLINE_LINUX_DEFAULT="text"
Update GRUB:
sudo update-grub


For systems that use systemd
This is an additional step for systemd releases, e.g. Ubuntu 15.04, the steps above for grub are still necessary.
You need to tell systemd to not load the graphical login manager:
sudo systemctl enable multi-user.target --force
sudo systemctl set-default multi-user.target

You will still be able to use X by typing startx after you logged in.
Original url http://askubuntu.com/questions/16371/how-do-i-disable-x-at-boot-time-so-that-the-system-boots-in-text-mode
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(23)

  • 個人分類:系統應用
▲top
  • 6月 06 週一 201617:50
  • [轉貼] Tcpdump: How to to capture only ICMP (ping) echo requests

List interfaces that tcpdump can listen on
tcpdump -D
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(5,533)

  • 個人分類:
▲top
  • 5月 06 週五 201611:58
  • [轉貼] 快速分析 Apache 的 access log,抓出前十大網站流量兇手

說到 Log 分析大家都會先想到用 AWStats 來分析,沒錯這絕對是一個最好的解決方式,但如果你只是要簡單的分析一些資訊,就可以利用一些簡單的 shell 組合來撈出你要的資料
這篇主要是針對 Apache 的 access log 來進行分析,並提供以下範例給大家參考
取得前十名 access 最多的 IP 位址
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(352)

  • 個人分類:
▲top
  • 3月 23 週三 201617:46
  • PHP Laravel 5 controller example


namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Input;
use Validator;
class ImageController extends Controller {
/**
* Store an image.
*
* @return simple JSON response message
*/
public function store(Request $r)
{
$image = Input::file('file');
$validator = Validator::make([$image], ['image' => 'required']);
if ($validator->fails()) {
return $this->errors(['message' => 'Not an image.', 'code' => 400]);
}
$destinationPath = storage_path() . '/uploads';
if(!$image->move($destinationPath, $image->getClientOriginalName())) {
return $this->errors(['message' => 'Error saving the file.', 'code' => 400]);
}
return response()->json(['success' => true], 200);
}
}
取自 https://github.com/danialfarid/ng-file-upload/wiki/PHP-Laravel-5-controller-example
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(0)

  • 個人分類:
▲top
  • 3月 22 週二 201623:22
  • 解決 laravel HTML class not found 問題

在安裝 PHP Laravel  framework (5.1版) 後,建立一個 Laravel Project
並且使用 {!! HTML flag 引入 CSS, JavaScript , 但卻顯示 HTML Class not found 的問題.
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(418)

  • 個人分類:
▲top
  • 3月 16 週三 201618:51
  • Linux 網路設定管理工具 Network Manager, 指令名稱 nmcli

Linux 底下很方便使用的網路設定管理工具 Network Manager, 具備圖形化的操作介面.
沒有圖形化介面的使用者, 可以使用 nmcli 來設定你的網路連線 .
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(1,211)

  • 個人分類:
▲top
  • 3月 16 週三 201618:46
  • [轉貼] 用xl2tpd建立L2TP协议的VPN连接

在Linux中用xl2tpd建立L2TP协议的VPN连接需要两个配置文件,一个是给xl2tpd的配置文件,一个是给pppd的配置文件(xl2tpd会调用pppd)。
    为说明方便,我们假设我们要建立的VPN连接的名字为testvpn,连到的l2tp服务器地址为xxx.xxx.xxx.xxx,用户名为someone,密码为passwordstring。那么该xl2tpd的配置文件应该如下所示:
(繼續閱讀...)
文章標籤

本熊 發表在 痞客邦 留言(0) 人氣(796)

  • 個人分類:Linux相關應用
▲top
«1234...54»

參觀人氣

  • 本日人氣:
  • 累積人氣:

文章分類

toggle 作業系統相關 (9)
  • FreeBSD (8)
  • IPv6 Logo (2)
  • Visual C# (1)
  • Visual C# (1)
  • Mac使用心得 (5)
  • Synology NAS應用 (0)
  • 系統應用 (49)
  • 防毒防駭 (5)
  • 系統安裝 (30)
toggle 投資理財 (2)
  • 科技產業 (8)
  • 投資學習 (9)
toggle 網頁設計相關 (6)
  • Flex程式設計 (5)
  • MySQL資料庫 (13)
  • ASP.NET程式設計 (1)
  • CSS樣式表應用 (5)
  • Flex (1)
  • PHP程式設計 (51)
  • Perl 程式設計 (1)
  • Windows系統應用 (2)
  • 好書推件 (1)
  • Android程式設計 (10)
  • C程式設計 (2)
  • Linux相關應用 (18)
  • Java程式設計 (6)
  • JAVAt程式設計-GWT (7)
  • Eucalyptus XEN (2)
  • 喻道故事 (1)
  • 下載資源 (2)
  • 終生學習 (7)
  • Goolge 新玩意 (1)
  • 英文學習心得 (3)
  • 工商服務 (12)
  • 勵志成長 (18)
  • 新聞時事 (17)
  • 讀者服務 (3)
  • JavaScript (22)
  • 省錢大作戰 (15)
  • 搶錢大作戰 (2)
  • 趣味分享 (50)
  • 感情生活 (15)
  • 用DSLR寫日記 (20)
  • 程式設計 (7)
  • 職場人生 (16)
  • 健康生活 (63)
  • 未分類文章 (1)