{"id":661,"date":"2013-01-01T20:30:05","date_gmt":"2013-01-01T19:30:05","guid":{"rendered":"http:\/\/blog.techmedia.pl\/?p=661"},"modified":"2014-11-19T23:44:22","modified_gmt":"2014-11-19T22:44:22","slug":"zend-framework-instalacja-w-ubuntu-12-04","status":"publish","type":"post","link":"https:\/\/www.techmedia.pl\/blog\/zend-framework-instalacja-w-ubuntu-12-04\/","title":{"rendered":"Zend Framework &#8211; instalacja w Ubuntu 12.04"},"content":{"rendered":"<p>Chc\u0105c uruchamia\u0107 projekty korzystaj\u0105ce z Zend&#8217;a na naszym serwerze www, bez konieczno\u015bci kopiowania wszystkich plik\u00f3w framework&#8217;a do ka\u017cdego projektu mo\u017cemy zainstalowa\u0107 Zend&#8217;a na serwerze. W tym Celu z konsoli wpisujemy:<\/p>\n<pre>root@server:# apt-get install zend-framework libzend-framework-zendx-php<\/pre>\n<p>Po instalacji mo\u017cemy sprawdzi\u0107 czy wszystko przebieg\u0142o w porz\u0105dku:<\/p>\n<pre>root@server:# zf show version<\/pre>\n<p>powinna wy\u015bwietli\u0107 si\u0119 wersja Zenda jak poni\u017cej:<!--more--><\/p>\n<pre>Zend Framework Version: 1.11.11<\/pre>\n<p>Kolejnym krokiem jest edycja pliku konfiguracyjnego w dowolnym edytorze:<\/p>\n<pre>root@server:# vim \/etc\/php5\/conf.d\/zend-framework.ini<\/pre>\n<p>i dodanie linii ze \u015bcie\u017ckami dost\u0119pu, jak poni\u017cej:<\/p>\n<pre>[Zend]\r\ninclude_path=${include_path} \":\/usr\/share\/php\/libzend-framework-php:\/usr\/share\/php:\/usr\/share\/php\/PHPunit:\/usr\/share\/php\/PEAR\"<\/pre>\n<p>Na koniec \u0142adujemy now\u0105 konfiguracj\u0119 do serwera www:<\/p>\n<pre>root@server:# service apache2 reload<\/pre>\n<pre>i sprawdzamy czy instalacja przebieg\u0142a prawid\u0142owo:<\/pre>\n<pre>root@server:# php -v<\/pre>\n<p>powinni\u015bmy otrzyma\u0107 co\u015b podobnego do poni\u017cszego:<\/p>\n<pre>PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41)\r\nCopyright (c) 1997-2012 The PHP Group\r\nZend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies<\/pre>\n<p>Je\u017celi po wykonaniu z konsoli polecenia tworz\u0105cego nowy projekt Zend&#8217;a:<\/p>\n<pre>root@server:\/var\/www\/new_project# <strong>zf create project<\/strong><\/pre>\n<p>otrzymujemy jeden z poni\u017cszych komunikat\u00f3w:<\/p>\n<pre>Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created.\r\n\r\nPHP Warning:\u00a0 require_once(PHP\/CodeCoverage\/Filter.php): failed to open stream: No such file or directory in \/usr\/share\/php\/PHPUnit\/Autoload.php on line 46\r\n\r\nWarning: require_once(PHP\/CodeCoverage\/Filter.php): failed to open stream: No such file or directory in \/usr\/share\/php\/PHPUnit\/Autoload.php on line 46\r\n\r\nPHP Fatal error:\u00a0 require_once(): Failed opening required 'PHP\/CodeCoverage\/Filter.php' (include_path='\/usr\/share\/php\/libzend-framework-php:\/usr\/share\/php') in \/usr\/share\/php\/PHPUnit\/Autoload.php on line 46\r\n\r\nFatal error: require_once(): Failed opening required 'PHP\/CodeCoverage\/Filter.php' (include_path='\/usr\/share\/php\/libzend-framework-php:\/usr\/share\/php') in \/usr\/share\/php\/PHPUnit\/Autoload.php on line 46\r\n\r\nPHP Fatal error:\u00a0 Call to undefined method PHP_CodeCoverage_Filter::getInstance() in \/usr\/share\/php\/PHPUnit\/Autoload.php on line 64\r\n\r\nFatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in \/usr\/share\/php\/PHPUnit\/Autoload.php on line 64<\/pre>\n<p>mo\u017ce to oznacza\u0107, \u017ce musimy wykona\u0107 poni\u017csze polecenia:<\/p>\n<pre>root@server:# pear upgrade pear\r\nroot@server:# pear channel-discover pear.phpunit.de\r\nroot@server:# pear channel-discover components.ez.no\r\nroot@server:# pear channel-discover pear.symfony.com\r\nroot@server:# pear channel-discover pear.symfony-project.com\r\nroot@server:# pear update-channels\r\nroot@server:# pear upgrade-all\r\nroot@server:# pear install --alldeps phpunit\/PHPUnit\r\nroot@server:# pear install phpunit\/PHP_CodeCoverage\r\nroot@server:# apt-get install phpunit<\/pre>\n<p>Na zako\u0144czenie musimy jeszcze za\u0142adowa\u0107 now\u0105 konfiguracj\u0119 do serwera www:<\/p>\n<pre>root@server:# service apache2 reload<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Chc\u0105c uruchamia\u0107 projekty korzystaj\u0105ce z Zend&#8217;a na naszym serwerze www, bez konieczno\u015bci kopiowania wszystkich plik\u00f3w framework&#8217;a do ka\u017cdego projektu mo\u017cemy zainstalowa\u0107 Zend&#8217;a na serwerze. W tym Celu z konsoli wpisujemy: root@server:# apt-get install zend-framework libzend-framework-zendx-php Po instalacji mo\u017cemy sprawdzi\u0107 czy wszystko przebieg\u0142o w porz\u0105dku: root@server:# zf show version powinna wy\u015bwietli\u0107 si\u0119 wersja Zenda jak poni\u017cej:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[87,4,21],"tags":[49,48,89,75,98],"yst_prominent_words":[],"_links":{"self":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/661"}],"collection":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/comments?post=661"}],"version-history":[{"count":5,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/661\/revisions"}],"predecessor-version":[{"id":1516,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/661\/revisions\/1516"}],"wp:attachment":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/media?parent=661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/categories?post=661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/tags?post=661"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}