{"id":362,"date":"2012-05-19T20:38:01","date_gmt":"2012-05-19T18:38:01","guid":{"rendered":"http:\/\/blog.techmedia.pl\/?p=362"},"modified":"2012-05-19T20:44:28","modified_gmt":"2012-05-19T18:44:28","slug":"instalacja-bibliteki-gd-php-5-w-ubuntu","status":"publish","type":"post","link":"https:\/\/www.techmedia.pl\/blog\/instalacja-bibliteki-gd-php-5-w-ubuntu\/","title":{"rendered":"Instalacja bibliteki GD PHP 5 w Ubuntu"},"content":{"rendered":"<p>Je\u015bli integrujecie <em>Uploadify z jQuery UI<\/em> ze swoj\u0105 stron\u0105 www i pojawia Wam si\u0119 b\u0142\u0105d <em>&#8222;HTTP Error&#8221;<\/em> lub chcecie skorzysta\u0107 z funkcji <em>imagecreatefromjpeg()<\/em>, kt\u00f3ra nie dzia\u0142a, a w logach jest wpis <em>&#8222;Call to undefined function imagecreatefromjpeg()&#8221;<\/em> bardzo mo\u017cliwe, \u017ce nie macie zainstalowanej biblioteki <em>GD<\/em> z <em>PHP<\/em>. Mo\u017cna to sprawdzi\u0107 dodaj\u0105c do strony www napisanej w <em>PHP<\/em> poni\u017cszy wpis:<\/p>\n<pre><strong>echo \"&lt;pre&gt;\"; print_r(gd_info()); echo \"&lt;\/pre&gt;\";<\/strong><strong><\/strong><\/pre>\n<p>Je\u015bli wy\u015bwietlaj\u0105c stron\u0119 w przegl\u0105darce otrzymamy wynik r\u00f3\u017cny od poni\u017cszego:<\/p>\n<pre>Array\r\n(\r\n    [GD Version] =&gt; 2.0\r\n    [FreeType Support] =&gt; 1\r\n    [FreeType Linkage] =&gt; with freetype\r\n    [T1Lib Support] =&gt; 1\r\n    [GIF Read Support] =&gt; 1\r\n    [GIF Create Support] =&gt; 1\r\n    [JPEG Support] =&gt; 1\r\n    [PNG Support] =&gt; 1\r\n    [WBMP Support] =&gt; 1\r\n    [XPM Support] =&gt;\r\n    [XBM Support] =&gt;\r\n    [JIS-mapped Japanese Font Support] =&gt;\r\n)<\/pre>\n<p>lub nie otrzymamy nic oznacza to, \u017ce musicie zainstalowa\u0107 bibliotek\u0119 <em>GD<\/em> w systemie. W tym celu wystarczy wyda\u0107 poni\u017csze polecenie z konsoli:<\/p>\n<pre>root@server:# <strong>apt-get install php5-gd<\/strong><\/pre>\n<p>Pami\u0119tajcie, aby przed instalacj\u0105 biblioteki wykona\u0107 aktualizacj\u0119 systemu wydaj\u0105c poni\u017csze polecenia:<\/p>\n<pre>root@server:# <strong>apt-get update<\/strong>\r\nroot@server:# <strong>apt-get upgrade<\/strong><\/pre>\n<p>Po instalacji nale\u017cy zrestartowa\u0107 serwer www wydaj\u0105c polecenie:<\/p>\n<pre><code>root@server:# <strong>\/etc\/init.d\/apache2 restart<\/strong><\/code><\/pre>\n<p>Je\u015bli dalej wyst\u0119puj\u0105 b\u0142\u0119dy, powodem jest co\u015b innego, szukajcie na tym forum, powinno by\u0107 rozwi\u0105zanie.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Je\u015bli integrujecie Uploadify z jQuery UI ze swoj\u0105 stron\u0105 www i pojawia Wam si\u0119 b\u0142\u0105d &#8222;HTTP Error&#8221; lub chcecie skorzysta\u0107 z funkcji imagecreatefromjpeg(), kt\u00f3ra nie dzia\u0142a, a w logach jest wpis &#8222;Call to undefined function imagecreatefromjpeg()&#8221; bardzo mo\u017cliwe, \u017ce nie macie zainstalowanej biblioteki GD z PHP. Mo\u017cna to sprawdzi\u0107 dodaj\u0105c do strony www napisanej w [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[84,4],"tags":[86,48,38,85],"yst_prominent_words":[],"_links":{"self":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/362"}],"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=362"}],"version-history":[{"count":5,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":364,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions\/364"}],"wp:attachment":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/tags?post=362"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}