phpunit

2016.11.04 Friday 02:18
0

    regtypetest1 regnametest1 cutomernametest1
    リンクをクリックする
    visit()で画面を表示
    click('<クリックしたい文字列>')
    seePageIs('遷移先のURL')
    <a href="/about-us">About Us</a>
    上記のHTMLがあった場合、以下のテストが使える
    public function testBasicExample()
    {
    $this->isit('/')
    ->click('About Us')
    ->seePageIs('/about-us');


    $this->visit('');
    $this->type('y', 'search_title');
    $this->press('検索');
    $this->see('yy');


    フォームの操作
    type(<入力内容>, <フォームのname>)で、指定のnameの入力フォームに指定のテキストを入力する
    select(<選択内容>, <フォームのname>)で、ラジオボタンやドロップダウンの選択
    check(<フォームのname>)で、指定のチェックボックスにチェック
    uncheck(<フォームのname>)で、指定のチェックボックスのチェックを外す
    attach(<ファイルのパス>, <フォームのname>)で、指定のファイルをアップロード対象にする
    category:php | by:ittoocomments(0)trackbacks(0) | -

    php versionup rire

    2016.10.28 Friday 07:35
    0
      Last login: Fri Oct 14 11:04:41 2016 from softbank221018186250.bbtec.net
      /home/yutenji
      [cn5 ~]$
      [cn5 ~]$
      [cn5 ~]$
      [cn5 ~]$ php -v
      PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
      Copyright (c) 1997-2010 The PHP Group
      Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


      $ rpm -qa | grep php
      php-devel-5.3.3-27.el6_5.x86_64
      php-common-5.3.3-27.el6_5.x86_64
      php-5.3.3-27.el6_5.x86_64
      php-pdo-5.3.3-27.el6_5.x86_64
      php-gd-5.3.3-27.el6_5.x86_64
      php-imap-5.3.3-27.el6_5.x86_64
      php-mbstring-5.3.3-27.el6_5.x86_64
      php-xml-5.3.3-27.el6_5.x86_64
      php-cli-5.3.3-27.el6_5.x86_64
      php-mysql-5.3.3-27.el6_5.x86_64
      php-pear-1.9.4-4.el6.noarch


      $ rpm -qa | grep php
      php-devel-5.3.3-27.el6_5.x86_64
      php-common-5.3.3-27.el6_5.x86_64
      php-5.3.3-27.el6_5.x86_64
      php-pdo-5.3.3-27.el6_5.x86_64
      php-gd-5.3.3-27.el6_5.x86_64
      php-imap-5.3.3-27.el6_5.x86_64
      php-mbstring-5.3.3-27.el6_5.x86_64
      php-xml-5.3.3-27.el6_5.x86_64
      php-cli-5.3.3-27.el6_5.x86_64
      php-mysql-5.3.3-27.el6_5.x86_64
      php-pear-1.9.4-4.el6.noarch
      $
      $
      $ yum info php
      Loaded plugins: fastestmirror, security
      Determining fastest mirrors
      * base: mirror.trouble-free.net
      * extras: bay.uchicago.edu
      * updates: centos.mirrors.wvstateu.edu
      base | 3.7 kB 00:00
      base/primary_db 72% [==========================- ] 1.9 MB/s | 2.1 MB 00:01 ETA base/primary_db | 4.7 MB 00:01
      extras | 3.4 kB 00:00
      extras/primary_db | 37 kB 00:00
      updates | 3.4 kB 00:00
      updates/primary_db | 3.1 MB 00:00
      Installed Packages
      Name : php
      Arch : x86_64
      Version : 5.3.3
      Release : 27.el6_5
      Size : 3.5 M
      Repo : installed
      From repo : updates
      Summary : PHP scripting language for creating dynamic web sites
      URL : http://www.php.net/
      License : PHP
      Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
      : easy for developers to write dynamically generated webpages. PHP also
      : offers built-in database integration for several commercial and
      : non-commercial database management systems, so writing a
      : database-enabled webpage with PHP is fairly simple. The most common
      : use of PHP coding is probably as a replacement for CGI scripts.
      :
      : The php package contains the module which adds support for the PHP
      : language to Apache HTTP Server.

      Available Packages
      Name : php
      Arch : x86_64
      Version : 5.3.3
      Release : 48.el6_8
      Size : 1.1 M
      Repo : updates
      Summary : PHP scripting language for creating dynamic web sites
      URL : http://www.php.net/
      License : PHP
      Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
      : easy for developers to write dynamically generated webpages. PHP also
      : offers built-in database integration for several commercial and
      : non-commercial database management systems, so writing a
      : database-enabled webpage with PHP is fairly simple. The most common
      : use of PHP coding is probably as a replacement for CGI scripts.
      :
      : The php package contains the module which adds support for the PHP
      : language to Apache HTTP Server.

      $
      $
      $ cat /etc/yum.repos.d
      cat: /etc/yum.repos.d: Is a directory
      $
      $ yum repolist all
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.trouble-free.net
      * extras: bay.uchicago.edu
      * updates: centos.mirrors.wvstateu.edu
      repo id repo name status
      C6.0-base CentOS-6.0 - Base disabled
      C6.0-centosplus CentOS-6.0 - CentOSPlus disabled
      C6.0-contrib CentOS-6.0 - Contrib disabled
      C6.0-extras CentOS-6.0 - Extras disabled
      C6.0-updates CentOS-6.0 - Updates disabled
      C6.1-base CentOS-6.1 - Base disabled
      C6.1-centosplus CentOS-6.1 - CentOSPlus disabled
      C6.1-contrib CentOS-6.1 - Contrib disabled
      C6.1-extras CentOS-6.1 - Extras disabled
      C6.1-updates CentOS-6.1 - Updates disabled
      C6.2-base CentOS-6.2 - Base disabled
      C6.2-centosplus CentOS-6.2 - CentOSPlus disabled
      C6.2-contrib CentOS-6.2 - Contrib disabled
      C6.2-extras CentOS-6.2 - Extras disabled
      C6.2-updates CentOS-6.2 - Updates disabled
      C6.3-base CentOS-6.3 - Base disabled
      C6.3-centosplus CentOS-6.3 - CentOSPlus disabled
      C6.3-contrib CentOS-6.3 - Contrib disabled
      C6.3-extras CentOS-6.3 - Extras disabled
      C6.3-updates CentOS-6.3 - Updates disabled
      base CentOS-6 - Base enabled: 6,696
      c6-media CentOS-6 - Media disabled
      centosplus CentOS-6 - Plus disabled
      contrib CentOS-6 - Contrib disabled
      debug CentOS-6 - Debuginfo disabled
      extras CentOS-6 - Extras enabled: 62
      updates CentOS-6 - Updates enabled: 573
      repolist: 7,331
      $
      $
      $
      $ cat /etc/redhat-release
      CentOS release 6.5 (Final)
      $ cat /etc/redhat-release
      CentOS release 6.5 (Final)
      $ rpm -qa | grep epel
      $ rpm -qa | grep remi
      $
      $
      $ cat /etc/yum.repos.d/epel.repo
      cat: /etc/yum.repos.d/epel.repo: No such file or directory
      $
      $ ls /etc/yum.repos.d/CentOS-Base.repo
      /etc/yum.repos.d/CentOS-Base.repo
      $


      $
      $ su - root
      Password:
      #
      #
      #
      # rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
      Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
      warning: /var/tmp/rpm-tmp.WBXmEm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
      Preparing... ########################################### [100%]
      1:epel-release ########################################### [100%]
      #
      #
      #
      # rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
      Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
      warning: /var/tmp/rpm-tmp.2RVWwE: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
      Preparing... ########################################### [100%]
      1:remi-release ########################################### [100%]
      #
      #
      # vi /etc/yum.repos.d/epel.repo
      #
      #
      #
      # head -10 /etc/yum.repos.d/epel.repo
      [epel]
      name=Extra Packages for Enterprise Linux 6 - $basearch
      #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
      mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
      failovermethod=priority
      enabled=0
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

      [epel-debuginfo]
      #
      # cp /etc/php.ini /home/php.ini
      #
      # php -v
      PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
      Copyright (c) 1997-2010 The PHP Group
      Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
      #


      # yum --enablerepo=epel,remi info php
      Loaded plugins: fastestmirror, security
      Determining fastest mirrors
      epel/metalink | 14 kB 00:00
      * base: mirror.us.leaseweb.net
      * epel: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi: repo1.ash.innoscale.net
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      base | 3.7 kB 00:00
      base/primary_db | 4.7 MB 00:00
      epel | 4.3 kB 00:00
      epel/primary_db | 5.9 MB 00:00
      extras | 3.4 kB 00:00
      extras/primary_db | 37 kB 00:00
      remi | 2.9 kB 00:00
      remi/primary_db | 1.6 MB 00:00
      remi-safe | 2.9 kB 00:00
      remi-safe/primary_db | 420 kB 00:00
      updates | 3.4 kB 00:00
      updates/primary_db | 3.1 MB 00:00
      Installed Packages
      Name : php
      Arch : x86_64
      Version : 5.3.3
      Release : 27.el6_5
      Size : 3.5 M
      Repo : installed
      From repo : updates
      Summary : PHP scripting language for creating dynamic web sites
      URL : http://www.php.net/
      License : PHP
      Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
      : easy for developers to write dynamically generated webpages. PHP also
      : offers built-in database integration for several commercial and
      : non-commercial database management systems, so writing a
      : database-enabled webpage with PHP is fairly simple. The most common
      : use of PHP coding is probably as a replacement for CGI scripts.
      :
      : The php package contains the module which adds support for the PHP
      : language to Apache HTTP Server.

      Available Packages
      Name : php
      Arch : x86_64
      Version : 5.4.45
      Release : 12.el6.remi
      Size : 2.8 M
      Repo : remi
      Summary : PHP scripting language for creating dynamic web sites
      URL : http://www.php.net/
      License : PHP and Zend and BSD
      Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
      : easy for developers to write dynamically generated web pages. PHP also
      : offers built-in database integration for several commercial and
      : non-commercial database management systems, so writing a
      : database-enabled webpage with PHP is fairly simple. The most common
      : use of PHP coding is probably as a replacement for CGI scripts.
      :
      : The php package contains the module (often referred to as mod_php)
      : which adds support for the PHP language to Apache HTTP Server.

      #
      #
      #
      # yum install --enablerepo=epel libwebp
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.us.leaseweb.net
      * epel: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package libwebp.x86_64 0:0.4.3-3.el6 will be installed
      --> Finished Dependency Resolution

      Dependencies Resolved

      =========================================================================================
      Package Arch Version Repository Size
      =========================================================================================
      Installing:
      libwebp x86_64 0.4.3-3.el6 epel 210 k

      Transaction Summary
      =========================================================================================
      Install 1 Package(s)

      Total download size: 210 k
      Installed size: 659 k
      Is this ok [y/N]: y
      Downloading Packages:
      libwebp-0.4.3-3.el6.x86_64.rpm | 210 kB 00:00
      warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
      Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
      Importing GPG key 0x0608B895:
      Userid : EPEL (6)
      Package: epel-release-6-8.noarch (installed)
      From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
      Is this ok [y/N]: y
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Warning: RPMDB altered outside of yum.
      Installing : libwebp-0.4.3-3.el6.x86_64 1/1
      Verifying : libwebp-0.4.3-3.el6.x86_64 1/1

      Installed:
      libwebp.x86_64 0:0.4.3-3.el6

      Complete!
      #
      #
      #
      # yum install --enablerepo=remi gd-last
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi: repo1.ash.innoscale.net
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package gd-last.x86_64 0:2.2.3-1.el6.remi will be installed
      --> Finished Dependency Resolution

      Dependencies Resolved

      =========================================================================================
      Package Arch Version Repository Size
      =========================================================================================
      Installing:
      gd-last x86_64 2.2.3-1.el6.remi remi 126 k

      Transaction Summary
      =========================================================================================
      Install 1 Package(s)

      Total download size: 126 k
      Installed size: 396 k
      Is this ok [y/N]: y
      Downloading Packages:
      gd-last-2.2.3-1.el6.remi.x86_64.rpm | 126 kB 00:00
      warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
      Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
      Importing GPG key 0x00F97F56:
      Userid : Remi Collet
      Package: remi-release-6.8-1.el6.remi.noarch (installed)
      From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
      Is this ok [y/N]: y
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Installing : gd-last-2.2.3-1.el6.remi.x86_64 1/1
      Verifying : gd-last-2.2.3-1.el6.remi.x86_64 1/1

      Installed:
      gd-last.x86_64 0:2.2.3-1.el6.remi

      Complete!
      #
      #
      #
      # yum install php php-common --enablerepo=remi,remi-php56
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi: repo1.ash.innoscale.net
      * remi-php56: repo1.ash.innoscale.net
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      remi-php56 | 2.9 kB 00:00
      remi-php56/primary_db | 213 kB 00:00
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package php.x86_64 0:5.3.3-27.el6_5 will be updated
      --> Processing Dependency: php(x86-64) = 5.3.3-27.el6_5 for package: php-devel-5.3.3-27.el6_5.x86_64
      ---> Package php.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: php-cli(x86-64) = 5.6.27-1.el6.remi for package: php-5.6.27-1.el6.remi.x86_64
      ---> Package php-common.x86_64 0:5.3.3-27.el6_5 will be updated
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-imap-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-gd-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-xml-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-mbstring-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-mysql-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-pdo-5.3.3-27.el6_5.x86_64
      ---> Package php-common.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: php-pecl-zip(x86-64) for package: php-common-5.6.27-1.el6.remi.x86_64
      --> Processing Dependency: php-pecl-jsonc(x86-64) for package: php-common-5.6.27-1.el6.remi.x86_64
      --> Running transaction check
      ---> Package php-cli.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-cli.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-devel.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-devel.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: php-pecl-jsonc-devel(x86-64) for package: php-devel-5.6.27-1.el6.remi.x86_64
      ---> Package php-gd.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-gd.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.6.27-1.el6.remi.x86_64
      ---> Package php-imap.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-imap.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-mbstring.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-mbstring.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-mysql.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-mysql.x86_64 0:5.4.45-12.el6.remi will be an update
      --> Processing Dependency: php-pdo(x86-64) = 5.4.45-12.el6.remi for package: php-mysql-5.4.45-12.el6.remi.x86_64
      --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.45-12.el6.remi.x86_64
      --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql-5.4.45-12.el6.remi.x86_64
      --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.45-12.el6.remi.x86_64
      ---> Package php-pdo.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-pdo.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-pecl-jsonc.x86_64 0:1.3.10-1.el6.remi.5.6 will be installed
      ---> Package php-pecl-zip.x86_64 0:1.13.5-1.el6.remi.5.6 will be installed
      --> Processing Dependency: libzip.so.4()(64bit) for package: php-pecl-zip-1.13.5-1.el6.remi.5.6.x86_64
      ---> Package php-xml.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-xml.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Running transaction check
      ---> Package libzip-last.x86_64 0:1.1.3-1.el6.remi will be installed
      ---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be updated
      --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
      --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
      ---> Package mysql-libs.x86_64 0:5.5.53-1.el6.remi will be an update
      ---> Package php-mysql.x86_64 0:5.4.45-12.el6.remi will be an update
      --> Processing Dependency: php-pdo(x86-64) = 5.4.45-12.el6.remi for package: php-mysql-5.4.45-12.el6.remi.x86_64
      ---> Package php-pecl-jsonc-devel.x86_64 0:1.3.10-1.el6.remi.5.6 will be installed
      ---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed
      --> Running transaction check
      ---> Package php-mysql.x86_64 0:5.4.45-12.el6.remi will be an update
      --> Processing Dependency: php-pdo(x86-64) = 5.4.45-12.el6.remi for package: php-mysql-5.4.45-12.el6.remi.x86_64
      ---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be updated
      ---> Package postfix.x86_64 2:2.6.6-6.el6_7.1 will be an update
      --> Finished Dependency Resolution
      Error: Package: php-mysql-5.4.45-12.el6.remi.x86_64 (remi)
      Requires: php-pdo(x86-64) = 5.4.45-12.el6.remi
      Removing: php-pdo-5.3.3-27.el6_5.x86_64 (@updates)
      php-pdo(x86-64) = 5.3.3-27.el6_5
      Updated By: php-pdo-5.6.27-1.el6.remi.x86_64 (remi-php56)
      php-pdo(x86-64) = 5.6.27-1.el6.remi
      Available: php-pdo-5.3.3-47.el6.x86_64 (base)
      php-pdo(x86-64) = 5.3.3-47.el6
      Available: php-pdo-5.3.3-48.el6_8.x86_64 (updates)
      php-pdo(x86-64) = 5.3.3-48.el6_8
      Available: php-pdo-5.4.45-11.el6.remi.x86_64 (remi)
      php-pdo(x86-64) = 5.4.45-11.el6.remi
      Available: php-pdo-5.4.45-12.el6.remi.x86_64 (remi)
      php-pdo(x86-64) = 5.4.45-12.el6.remi
      Available: php-pdo-5.6.26-1.el6.remi.x86_64 (remi-php56)
      php-pdo(x86-64) = 5.6.26-1.el6.remi
      You could try using --skip-broken to work around the problem
      You could try running: rpm -Va --nofiles --nodigest
      #
      #
      #
      # yum install php-mysqlnd php-mbstring php-gd php-pdo php-gd php-xml --enablerepo=remi,remi-php56
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi: repo1.ash.innoscale.net
      * remi-php56: repo1.ash.innoscale.net
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package php-gd.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-gd.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: php-common(x86-64) = 5.6.27-1.el6.remi for package: php-gd-5.6.27-1.el6.remi.x86_64
      --> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.6.27-1.el6.remi.x86_64
      ---> Package php-mbstring.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-mbstring.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-mysql.x86_64 0:5.3.3-27.el6_5 will be obsoleted
      ---> Package php-mysqlnd.x86_64 0:5.6.27-1.el6.remi will be obsoleting
      ---> Package php-pdo.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-pdo.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-xml.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-xml.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Running transaction check
      ---> Package php-common.x86_64 0:5.3.3-27.el6_5 will be updated
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-imap-5.3.3-27.el6_5.x86_64
      --> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-cli-5.3.3-27.el6_5.x86_64
      ---> Package php-common.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: php-pecl-zip(x86-64) for package: php-common-5.6.27-1.el6.remi.x86_64
      --> Processing Dependency: php-pecl-jsonc(x86-64) for package: php-common-5.6.27-1.el6.remi.x86_64
      ---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed
      --> Running transaction check
      ---> Package php.x86_64 0:5.3.3-27.el6_5 will be updated
      --> Processing Dependency: php(x86-64) = 5.3.3-27.el6_5 for package: php-devel-5.3.3-27.el6_5.x86_64
      ---> Package php.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-cli.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-cli.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-imap.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-imap.x86_64 0:5.6.27-1.el6.remi will be an update
      ---> Package php-pecl-jsonc.x86_64 0:1.3.10-1.el6.remi.5.6 will be installed
      ---> Package php-pecl-zip.x86_64 0:1.13.5-1.el6.remi.5.6 will be installed
      --> Processing Dependency: libzip.so.4()(64bit) for package: php-pecl-zip-1.13.5-1.el6.remi.5.6.x86_64
      --> Running transaction check
      ---> Package libzip-last.x86_64 0:1.1.3-1.el6.remi will be installed
      ---> Package php-devel.x86_64 0:5.3.3-27.el6_5 will be updated
      ---> Package php-devel.x86_64 0:5.6.27-1.el6.remi will be an update
      --> Processing Dependency: php-pecl-jsonc-devel(x86-64) for package: php-devel-5.6.27-1.el6.remi.x86_64
      --> Running transaction check
      ---> Package php-pecl-jsonc-devel.x86_64 0:1.3.10-1.el6.remi.5.6 will be installed
      --> Finished Dependency Resolution

      Dependencies Resolved

      =========================================================================================
      Package Arch Version Repository Size
      =========================================================================================
      Installing:
      php-mysqlnd x86_64 5.6.27-1.el6.remi remi-php56 276 k
      replacing php-mysql.x86_64 5.3.3-27.el6_5
      Updating:
      php-gd x86_64 5.6.27-1.el6.remi remi-php56 78 k
      php-mbstring x86_64 5.6.27-1.el6.remi remi-php56 968 k
      php-pdo x86_64 5.6.27-1.el6.remi remi-php56 118 k
      php-xml x86_64 5.6.27-1.el6.remi remi-php56 219 k
      Installing for dependencies:
      libzip-last x86_64 1.1.3-1.el6.remi remi 42 k
      php-pecl-jsonc x86_64 1.3.10-1.el6.remi.5.6 remi-php56 51 k
      php-pecl-jsonc-devel x86_64 1.3.10-1.el6.remi.5.6 remi-php56 31 k
      php-pecl-zip x86_64 1.13.5-1.el6.remi.5.6 remi-php56 52 k
      t1lib x86_64 5.1.2-6.el6_2.1 base 160 k
      Updating for dependencies:
      php x86_64 5.6.27-1.el6.remi remi-php56 2.7 M
      php-cli x86_64 5.6.27-1.el6.remi remi-php56 4.0 M
      php-common x86_64 5.6.27-1.el6.remi remi-php56 1.1 M
      php-devel x86_64 5.6.27-1.el6.remi remi-php56 1.2 M
      php-imap x86_64 5.6.27-1.el6.remi remi-php56 77 k

      Transaction Summary
      =========================================================================================
      Install 6 Package(s)
      Upgrade 9 Package(s)

      Total download size: 11 M
      Is this ok [y/N]: y
      Downloading Packages:
      (1/15): libzip-last-1.1.3-1.el6.remi.x86_64.rpm | 42 kB 00:00
      (2/15): php-5.6.27-1.el6.remi.x86_64.rpm | 2.7 MB 00:00
      (3/15): php-cli-5.6.27-1.el6.remi.x86_64.rpm | 4.0 MB 00:00
      (4/15): php-common-5.6.27-1.el6.remi.x86_64.rpm | 1.1 MB 00:00
      (5/15): php-devel-5.6.27-1.el6.remi.x86_64.rpm | 1.2 MB 00:00
      (6/15): php-gd-5.6.27-1.el6.remi.x86_64.rpm | 78 kB 00:00
      (7/15): php-imap-5.6.27-1.el6.remi.x86_64.rpm | 77 kB 00:00
      (8/15): php-mbstring-5.6.27-1.el6.remi.x86_64.rpm | 968 kB 00:00
      (9/15): php-mysqlnd-5.6.27-1.el6.remi.x86_64.rpm | 276 kB 00:00
      (10/15): php-pdo-5.6.27-1.el6.remi.x86_64.rpm | 118 kB 00:00
      (11/15): php-pecl-jsonc-1.3.10-1.el6.remi.5.6.x86_64.rpm | 51 kB 00:00
      (12/15): php-pecl-jsonc-devel-1.3.10-1.el6.remi.5.6.x86_64.rpm | 31 kB 00:00
      (13/15): php-pecl-zip-1.13.5-1.el6.remi.5.6.x86_64.rpm | 52 kB 00:00
      (14/15): php-xml-5.6.27-1.el6.remi.x86_64.rpm | 219 kB 00:00
      (15/15): t1lib-5.1.2-6.el6_2.1.x86_64.rpm | 160 kB 00:00
      -----------------------------------------------------------------------------------------
      Total 20 MB/s | 11 MB 00:00
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Installing : t1lib-5.1.2-6.el6_2.1.x86_64 1/25
      Installing : libzip-last-1.1.3-1.el6.remi.x86_64 2/25
      Installing : php-pecl-jsonc-1.3.10-1.el6.remi.5.6.x86_64 3/25
      Updating : php-common-5.6.27-1.el6.remi.x86_64 4/25

      WARNING : These php-* RPMs are not official Fedora / Red Hat build and
      overrides the official ones. Don't file bugs on Fedora Project nor Red Hat.

      Use dedicated forum at http://forum.remirepo.net/

      Installing : php-pecl-zip-1.13.5-1.el6.remi.5.6.x86_64 5/25
      Updating : php-cli-5.6.27-1.el6.remi.x86_64 6/25
      Installing : php-pecl-jsonc-devel-1.3.10-1.el6.remi.5.6.x86_64 7/25
      Updating : php-devel-5.6.27-1.el6.remi.x86_64 8/25
      Updating : php-pdo-5.6.27-1.el6.remi.x86_64 9/25
      Installing : php-mysqlnd-5.6.27-1.el6.remi.x86_64 10/25
      Updating : php-5.6.27-1.el6.remi.x86_64 11/25
      Updating : php-xml-5.6.27-1.el6.remi.x86_64 12/25
      Updating : php-gd-5.6.27-1.el6.remi.x86_64 13/25
      Updating : php-imap-5.6.27-1.el6.remi.x86_64 14/25
      Updating : php-mbstring-5.6.27-1.el6.remi.x86_64 15/25
      Erasing : php-mysql-5.3.3-27.el6_5.x86_64 16/25
      Cleanup : php-devel-5.3.3-27.el6_5.x86_64 17/25
      Cleanup : php-5.3.3-27.el6_5.x86_64 18/25
      Cleanup : php-cli-5.3.3-27.el6_5.x86_64 19/25
      Cleanup : php-pdo-5.3.3-27.el6_5.x86_64 20/25
      Cleanup : php-mbstring-5.3.3-27.el6_5.x86_64 21/25
      Cleanup : php-imap-5.3.3-27.el6_5.x86_64 22/25
      Cleanup : php-gd-5.3.3-27.el6_5.x86_64 23/25
      Cleanup : php-xml-5.3.3-27.el6_5.x86_64 24/25
      Cleanup : php-common-5.3.3-27.el6_5.x86_64 25/25
      Verifying : php-xml-5.6.27-1.el6.remi.x86_64 1/25
      Verifying : libzip-last-1.1.3-1.el6.remi.x86_64 2/25
      Verifying : php-pdo-5.6.27-1.el6.remi.x86_64 3/25
      Verifying : php-gd-5.6.27-1.el6.remi.x86_64 4/25
      Verifying : php-mysqlnd-5.6.27-1.el6.remi.x86_64 5/25
      Verifying : php-pecl-zip-1.13.5-1.el6.remi.5.6.x86_64 6/25
      Verifying : t1lib-5.1.2-6.el6_2.1.x86_64 7/25
      Verifying : php-imap-5.6.27-1.el6.remi.x86_64 8/25
      Verifying : php-pecl-jsonc-1.3.10-1.el6.remi.5.6.x86_64 9/25
      Verifying : php-pecl-jsonc-devel-1.3.10-1.el6.remi.5.6.x86_64 10/25
      Verifying : php-5.6.27-1.el6.remi.x86_64 11/25
      Verifying : php-cli-5.6.27-1.el6.remi.x86_64 12/25
      Verifying : php-mbstring-5.6.27-1.el6.remi.x86_64 13/25
      Verifying : php-common-5.6.27-1.el6.remi.x86_64 14/25
      Verifying : php-devel-5.6.27-1.el6.remi.x86_64 15/25
      Verifying : php-xml-5.3.3-27.el6_5.x86_64 16/25
      Verifying : php-gd-5.3.3-27.el6_5.x86_64 17/25
      Verifying : php-mbstring-5.3.3-27.el6_5.x86_64 18/25
      Verifying : php-imap-5.3.3-27.el6_5.x86_64 19/25
      Verifying : php-devel-5.3.3-27.el6_5.x86_64 20/25
      Verifying : php-common-5.3.3-27.el6_5.x86_64 21/25
      Verifying : php-cli-5.3.3-27.el6_5.x86_64 22/25
      Verifying : php-5.3.3-27.el6_5.x86_64 23/25
      Verifying : php-pdo-5.3.3-27.el6_5.x86_64 24/25
      Verifying : php-mysql-5.3.3-27.el6_5.x86_64 25/25

      Installed:
      php-mysqlnd.x86_64 0:5.6.27-1.el6.remi

      Dependency Installed:
      libzip-last.x86_64 0:1.1.3-1.el6.remi
      php-pecl-jsonc.x86_64 0:1.3.10-1.el6.remi.5.6
      php-pecl-jsonc-devel.x86_64 0:1.3.10-1.el6.remi.5.6
      php-pecl-zip.x86_64 0:1.13.5-1.el6.remi.5.6
      t1lib.x86_64 0:5.1.2-6.el6_2.1

      Updated:
      php-gd.x86_64 0:5.6.27-1.el6.remi php-mbstring.x86_64 0:5.6.27-1.el6.remi
      php-pdo.x86_64 0:5.6.27-1.el6.remi php-xml.x86_64 0:5.6.27-1.el6.remi

      Dependency Updated:
      php.x86_64 0:5.6.27-1.el6.remi php-cli.x86_64 0:5.6.27-1.el6.remi
      php-common.x86_64 0:5.6.27-1.el6.remi php-devel.x86_64 0:5.6.27-1.el6.remi
      php-imap.x86_64 0:5.6.27-1.el6.remi

      Replaced:
      php-mysql.x86_64 0:5.3.3-27.el6_5

      Complete!
      #
      #
      #
      #
      #
      #
      #
      #
      # php -v
      PHP 5.6.27 (cli) (built: Oct 14 2016 14:06:54)
      Copyright (c) 1997-2016 The PHP Group
      Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
      # yum install libmcrypt --enablerepo=epel
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.us.leaseweb.net
      * epel: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be installed
      --> Finished Dependency Resolution

      Dependencies Resolved

      =========================================================================================
      Package Arch Version Repository Size
      =========================================================================================
      Installing:
      libmcrypt x86_64 2.5.8-9.el6 epel 96 k

      Transaction Summary
      =========================================================================================
      Install 1 Package(s)

      Total download size: 96 k
      Installed size: 281 k
      Is this ok [y/N]: y
      Downloading Packages:
      libmcrypt-2.5.8-9.el6.x86_64.rpm | 96 kB 00:00
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Installing : libmcrypt-2.5.8-9.el6.x86_64 1/1
      Verifying : libmcrypt-2.5.8-9.el6.x86_64 1/1

      Installed:
      libmcrypt.x86_64 0:2.5.8-9.el6

      Complete!
      #
      #
      #
      #
      # yum install php-mcrypt --enablerepo=remi,remi-php56
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.us.leaseweb.net
      * extras: mirror.netdepot.com
      * remi: repo1.ash.innoscale.net
      * remi-php56: repo1.ash.innoscale.net
      * remi-safe: repo1.ash.innoscale.net
      * updates: mirror.symnds.com
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package php-mcrypt.x86_64 0:5.6.27-1.el6.remi will be installed
      --> Processing Dependency: libltdl.so.7()(64bit) for package: php-mcrypt-5.6.27-1.el6.remi.x86_64
      --> Running transaction check
      ---> Package libtool-ltdl.x86_64 0:2.2.6-15.5.el6 will be installed
      --> Finished Dependency Resolution

      Dependencies Resolved

      =========================================================================================
      Package Arch Version Repository Size
      =========================================================================================
      Installing:
      php-mcrypt x86_64 5.6.27-1.el6.remi remi-php56 48 k
      Installing for dependencies:
      libtool-ltdl x86_64 2.2.6-15.5.el6 base 44 k

      Transaction Summary
      =========================================================================================
      Install 2 Package(s)

      Total download size: 93 k
      Installed size: 152 k
      Is this ok [y/N]: y
      Downloading Packages:
      (1/2): libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm | 44 kB 00:00
      (2/2): php-mcrypt-5.6.27-1.el6.remi.x86_64.rpm | 48 kB 00:00
      -----------------------------------------------------------------------------------------
      Total 4.3 MB/s | 93 kB 00:00
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Installing : libtool-ltdl-2.2.6-15.5.el6.x86_64 1/2
      Installing : php-mcrypt-5.6.27-1.el6.remi.x86_64 2/2
      Verifying : libtool-ltdl-2.2.6-15.5.el6.x86_64 1/2
      Verifying : php-mcrypt-5.6.27-1.el6.remi.x86_64 2/2

      Installed:
      php-mcrypt.x86_64 0:5.6.27-1.el6.remi

      Dependency Installed:
      libtool-ltdl.x86_64 0:2.2.6-15.5.el6

      Complete!
      #
      #
      #
      # sudo service httpd restart
      Stopping httpd: [ OK ]
      Starting httpd: [ OK ]
      #



      category:php | by:ittoocomments(0)trackbacks(0) | -

      php versionup

      2016.10.28 Friday 07:13
      0
        1
        [root@cnserver4 ~]# rpm -qa | grep php
        php-5.3.3-27.el6_5.x86_64
        php-mysql-5.3.3-27.el6_5.x86_64

        2
        [root@cnserver4 ~]# yum info php
        Loaded plugins: fastestmirror, security
        Determining fastest mirrors

        3
        [root@cnserver4 ~]# cat /etc/yum.repos.d
        cat: /etc/yum.repos.d: Is a directory
        [root@cnserver4 ~]#

        4
        [root@cnserver4 ~]# yum repolist all
        Loaded plugins: fastestmirror, security
        Loading mirror speeds from cached hostfile
        5
        [root@cnserver4 ~]# cat /etc/redhat-release
        CentOS release 6.3 (Final)
        [root@cnserver4 ~]#
        [root@cnserver4 ~]#
        [root@cnserver4 ~]#

        6
        [root@cnserver4 ~]# rpm -qa | grep epel
        [root@cnserver4 ~]# rpm -qa | grep remi
        [root@cnserver4 ~]#
        [root@cnserver4 ~]# cat /etc/yum.repos.d/epel.repo
        cat: /etc/yum.repos.d/epel.repo: No such file or directory
        [root@cnserver4 ~]#
        [root@cnserver4 ~]#
        [root@cnserver4 ~]# ls /etc/yum.repos.d/CentOS-Base.repo
        /etc/yum.repos.d/CentOS-Base.repo
        [root@cnserver4 ~]#


        7
        [root@cnserver4 ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
        Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
        warning: /var/tmp/rpm-tmp.BwWKhw: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
        Preparing... ########################################### [100%]
        1:epel-release ########################################### [100%]
        [root@cnserver4 ~]#

        [root@cnserver4 ~]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
        Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
        warning: /var/tmp/rpm-tmp.fkYXu8: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
        Preparing... ########################################### [100%]
        1:remi-release ########################################### [100%]
        [root@cnserver4 ~]#



        8
        編集
        vi /etc/yum.repos.d/epel.repo

        [root@cnserver4 ~]# vi /etc/yum.repos.d/epel.repo
        [root@cnserver4 ~]# head -10 /etc/yum.repos.d/epel.repo
        [epel]
        name=Extra Packages for Enterprise Linux 6 - $basearch
        #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
        mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
        failovermethod=priority
        enabled=0 ←★ 0 に編集する
        gpgcheck=1

        一応バックアップ
        cp /etc/php.ini /home/php.ini

        既存のphpを削除
        [root@cnserver4 ~]# yum remove php*
        Loaded plugins: fastestmirror, security
        Setting up Remove Process
        Resolving Dependencies

        [root@cnserver4 ~]#
        [root@cnserver4 ~]# php -v
        -bash: php: command not found
        [root@cnserver4 ~]#

        9
        [root@cnserver4 ~]# yum --enablerepo=epel,remi info php  ★エラーになるが調べるだけだし
        cn5 だとOKだった

        Loaded plugins: fastestmirror, security
        Loading mirror speeds from cached hostfile

        Cannot retrieve metalink for repository: epel. Please verify its path and try again
        [root@cnserver4 ~]#


        10 これを先
        yum install --enablerepo=epel libwebp
        yum install --enablerepo=remi gd-last


        11
        [root@cnserver4 ~]#
        [root@cnserver4 ~]# yum install php php-common --enablerepo=remi,remi-php56
        Loaded plugins: fastestmirror, security
        Loading mirror speeds from cached hostfile
        * base: ftp.tsukuba.wide.ad.jp
        * extras: ftp.tsukuba.wide.ad.jp
        * rem


        -----------------
        ようやく次

        # yum install php-mysqlnd php-mbstring php-gd php-pdo php-gd php-xml --enablerepo=remi,remi-php56

        # yum install libmcrypt --enablerepo=epel


        # yum install php-mcrypt --enablerepo=remi,remi-php56
        12
        #
        sudo service httpd restart

        # php -v
        PHP 5.6.27 (cli) (built: Oct 14 2016 14:06:54)
        Copyright (c) 1997-2016 The PHP Group
        Zend Engine v2.6.0, Copyri

        http://qiita.com/zaburo/items/fd67b294c610d54c3aee
        http://d.hatena.ne.jp/C_6B4A2B/20130427/1367073209


        category:php | by:ittoocomments(0)trackbacks(0) | -

        php Carbon

        2016.10.19 Wednesday 07:08
        0
          $day = null ;
          $weekjp = ['日','月','火','水','木','金','土'];
          $day = "20160701" ;
          if($day == null) {
          // 本日
          $dt = Carbon::now();
          $yyyymmdd = $dt->format('Ymd'); // 2016年05月01日
          $youbi = $weekjp[$dt->weekOfMonth] ;
          } else {
          // $dt = new Carbon('2016-04-30');
          $dt = new Carbon($day);
          $yyyymmdd = $dt->format('Ymd'); // 2016年05月01日
          $youbi = $weekjp[$dt->weekOfMonth] ;
          //var_dump($dt);

          }

          var_dump($yyyymmdd);
          var_dump($youbi);
          var_dump($dt);
          category:php | by:ittoocomments(0)trackbacks(0) | -

          php無名関数

          2016.10.15 Saturday 14:41
          0
            php
            php 5.3 で無名関数が追加され、関数を変数に入れたり関数の引数に渡したりすることができる ようになりました。

            $add = function($a, $b) { return $a + $b; }
            $call2 = function($func, $a, $b) { return $func($a, $b); }
            var_dump($call2($add, 1, 3)); // => int(4)
            category:php | by:ittoocomments(0)trackbacks(0) | -

            ad
            Calender
              12345
            6789101112
            13141516171819
            20212223242526
            2728293031  
            << October 2019 >>
            Selected entry
            PR
            Category
            Archives
            Recent comment
            • パス指定 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-4: truncated ¥xXX escape
              久米隆文
            • 円マークが自動変換されてる
              aaaaaa
            • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
              66hills
            • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
              ssd
            • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
              max
            • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
              DOM
            • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
              DOM
            • コンピュータ業界の根本的な変化
              cloud
            • コンピュータ業界の根本的な変化
              Dellの仮想化
            • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
              えちごや
            Recent trackback
            • スマートフォンの法人活用例
              無線LANネットのブログ
            • Yahoo!オークションからのアフィリエイト収入が一気に70%減になってしまい涙目になってる話
              特選情報
            Recommend
            Link
            Profile
            Search
            Others
            Mobile
            qrcode
            Powered
            無料ブログ作成サービス JUGEM