{"id":225979,"date":"2014-06-11T14:13:02","date_gmt":"2014-06-11T10:13:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=225979"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=225979","title":{"rendered":"<span class=\"post_title\">\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Sphinx \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 PHP<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: <br \/>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 LAMP (\u0434\u0430\u043b\u0435\u0435 \u0421\u0421), <br \/>  Yii framework (\u0432\u0435\u0440\u0441\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0430\u0436\u043d\u0430),<br \/>  \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0434\u0430\u043b\u0435\u0435 \u0423\u0421), \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u0435\u043c\u043e\u043d Sphinx, searchd.<br \/>  \u041d\u0430 \u0423\u0421 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0440\u0443\u0442\u0430 (\u043d\u043e \u043d\u0435 \u0441\u0430\u043c \u0440\u0443\u0442).<br \/>  \u041d\u0430 \u0421\u0421 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c ssh2_mod \u0434\u043b\u044f PHP.<\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Sphinx, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043d\u0443\u0430\u043b <a href=\"http:\/\/sphinxsearch.com\/docs\/current.html\">sphinxsearch.com\/docs\/current.html<\/a>.<br \/>  \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  \u0418\u0442\u0430\u043a, Sphinx \u2014 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0434\u0435\u043c\u043e\u043d, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 MySQL. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u043e\u043d \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0437\u0443 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c (\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0441\u0444\u0438\u043d\u043a\u0441\u0430), \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u0441\u0432\u043e\u0438 \u0444\u0430\u0439\u043b\u044b. \u0427\u0442\u043e\u0431\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 (\u0432 MySQL \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439), \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0441\u0444\u0438\u043d\u043a\u0441\u0430. \u0422\u043e\u0433\u0434\u0430, \u043e\u043d \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0435\u0435 \u0441\u0435\u0431\u0435.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430:<br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0441\u0444\u0438\u043d\u043a\u0441\u0430 \u043d\u0430 \u0423\u0421.<br \/>  \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u043a\u0440\u043e\u043d\u0443 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0432 \u043a\u043e\u0434\u0435. \u041a\u0440\u043e\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441 \u0421\u0421.<br \/>  \u0422.\u0435. \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u043e\u043d, \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u043d\u0430 \u0423\u0421.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0448\u0435\u043b \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ssh2_mod \u0434\u043b\u044f apache2 (\u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043c\u0430\u043d\u0443\u0430\u043b \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0430 CentOS \u043c\u043e\u0436\u043d\u043e \u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0437\u0434\u0435\u0441\u044c <a href=\"http:\/\/www.stableit.ru\/2010\/12\/ssh2-php-centos-55-pecl.html\">www.stableit.ru\/2010\/12\/ssh2-php-centos-55-pecl.html<\/a>).<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043c\u0430\u043d\u0443\u0430\u043b \u043f\u043e ssh2 (http:\/\/www.php.net\/manual\/en\/book.ssh2.php), \u043d\u0430\u0448\u0435\u043b \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e ssh2_exec, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u043e, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b indexer &#8212;all &#8212;rotate \u0434\u043b\u044f \u0434\u0435\u043b\u044c\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443   <\/p>\n<pre><code class=\"bash\">WARNING: failed to open pid_file '\/var\/run\/sphinx\/searchd.pid'. WARNING: indices NOT rotated. <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u043e\u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f rotate (\u0430 \u0443 \u043c\u0435\u043d\u044f \u044e\u0437\u0435\u0440 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0440\u0443\u0442\u0430, sudo -s), \u0445\u043e\u0442\u044f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u044f \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0431\u0435\u0437\u043e \u0432\u0441\u044f\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0435\u0449\u0435, \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u0444\u0443\u043d\u043a\u0446\u0438\u044f ssh2_shell). \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0438 \u0444\u0443\u043a\u043d\u0446\u0438\u0438 fwrite \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u00ab\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u00bb \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a, \u0442.\u0435. \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u043c. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 fgets.<\/p>\n<p>  \u0412\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u044c\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u044f \u043e\u0431\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u0441\u044f, \u043d\u043e\u2026<br \/>  \u00ab\u041d\u041e\u00bb \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 (\u043f\u043e\u0440\u044f\u0434\u043a\u0430 400\u043a \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442). \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u043e\u0431\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043c\u0430\u043b\u0435\u0439\u0448\u0435\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435. \u041f\u0440\u043e\u0441\u0442\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0432\u043e\u0434\u0438\u0448\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u00ab\u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00bb. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u00ab\u043d\u0435\u0434\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435\u00bb \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>  \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0440\u043e\u0434 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043d\u0430\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430, \u043f\u0440\u044f\u043c\u043e \u0432 \u043c\u0430\u043d\u0435 \u043f\u043e ssh2 \u043d\u0430 php.net. \u0410\u0432\u0442\u043e\u0440 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b (echo &#8216;[start]&#8217;; $command; echo &#8216;[end]&#8217;) \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c max_execution_time \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<br \/>  \u041a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"php\">$ip = 'ip_address';   $user = 'username';   $pass = 'password';   $connection = ssh2_connect($ip);  ssh2_auth_password($connection,$user,$pass);  $shell = ssh2_shell($connection,&quot;bash&quot;);   \/\/Trick is in the start and end echos which can be executed in both *nix and windows systems.  \/\/Do add 'cmd \/C' to the start of $cmd if on a windows system.  $cmd = &quot;echo '[start]';your commands here;echo '[end]'&quot;;  $output = user_exec($shell,$cmd);   fclose($shell);   function user_exec($shell,$cmd) {    fwrite($shell,$cmd . &quot;\\n&quot;);    $output = &quot;&quot;;    $start = false;    $start_time = time();    $max_time = 2; \/\/time in seconds    while(((time()-$start_time) &lt; $max_time)) {      $line = fgets($shell);      if(!strstr($line,$cmd)) {        if(preg_match('\/\\[start\\]\/',$line)) {          $start = true;        }elseif(preg_match('\/\\[end\\]\/',$line)) {          return $output;        }elseif($start){          $output[] = $line;        }      }    }  }  <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e\u2026<br \/>  \u0417\u0434\u0435\u0441\u044c \u041d\u041e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u043e\u0441\u044c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 preg_match. \u041f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 $output \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432\u0441\u0435, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b. \u0412\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u00ab\u0437\u0430\u0434\u0443\u043c\u0430\u0432\u0448\u0438\u043c\u0441\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u043c\u00bb \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043b\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439, \u0442.\u043a. \u043f\u0440\u0438 \u043f\u0430\u0443\u0437\u0435 \u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f echo &#8216;[end]&#8217; (\u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430, \u0430 \u043d\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f). \u0412\u0441\u0435 \u0440\u0435\u0448\u0438\u043b\u043e\u0441\u044c \u043f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 preg_match<br \/>  <code> preg_match('\/^\\[start\\]\\s*$\/',$line) <\/code><br \/>  \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 is_string \u0434\u043b\u044f $line.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0440\u0435\u0445\u0442\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c, \u0438, \u0432\u0443\u0430\u043b\u044f, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 Yii \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u043e\u0439 \u0434\u043b\u044f ssh2 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<pre><code class=\"php\">&lt;?php class SshException extends CException {}  \/**  * Class Ssh  * It is a base class for the simplify a ssh connection management  * and related commands execution  *  * @author Ivanenko Vladyslav  *\/ class Ssh {     const EXEC_TYPE_EXEC = 'exec'; \/\/ type for ssh2_exec()     const EXEC_TYPE_SHELL = 'shell'; \/\/ type for ssh2_shell()      const START_MARK = '__start__';     const FINISH_MARK = '__finish__';      const MAX_EXECUTION_TIME = 1800; \/\/ max script execution time in sec      private $user;     private $password;     private $host;     private $port;      private $shellType = 'bash'; \/\/ shell type     private $shell = null; \/\/shell identificator      private $ssh = null; \/\/connection      private $execType;      \/**      * Construct      *      * @param null $user      * @param null $password      * @param null $host      *\/     public function __construct($user = null, $password = null, $host = null, $port = null)     {         $config = Yii::app()-&gt;params['ssh'];         $params = array('user', 'password', 'host', 'port');          foreach($params as $param) {             if(isset(${$param}) && !is_null(${$param})) {                 $this-&gt;{$param} = ${$param};             } else {                 $this-&gt;{$param} = @$config[$param];             }         }          return true;     }      \/**      * Connect to Ssh      *      * @return resource      * @throws SshException      *\/     public function connect()     {         $this-&gt;ssh = @ssh2_connect($this-&gt;host, $this-&gt;port);         if(empty($this-&gt;ssh)) {             throw new SshException('Cant connect to ssh');         }          if(empty($this-&gt;execType)) {             $this-&gt;execType = self::EXEC_TYPE_SHELL;         }          return $this-&gt;ssh;     }      \/**      * Login to ssh      *      * @throws SshException      * @return bool      *\/     public function login()     {         if(!@ssh2_auth_password($this-&gt;ssh, $this-&gt;user, $this-&gt;password)) {             throw new SshException('Cant login by ssh');         }          return true;     }      \/**      * Exec command by ssh      *      * @param $cmd      * @param $type      *      * @return string      * @throws SshException      *\/     public function exec($cmd, $type = self::EXEC_TYPE_SHELL)     {         if(is_null($this-&gt;ssh)) {             $this-&gt;connect();             $this-&gt;login();         }         $this-&gt;execType = $type;         switch($this-&gt;execType) {             case self::EXEC_TYPE_EXEC: $result = $this-&gt;execCommand($cmd); break;             case self::EXEC_TYPE_SHELL: $result = $this-&gt;execByShell($cmd); break;             default: throw new SshException('Incorrect exec type'); break;         }          return $result;     }      \/**      * Executes command by the direct ssh2_exec      *      * @param $command      *      * @return string      * @throws SshException      *\/     private function execCommand($command)     {         if (!($stream = ssh2_exec($this-&gt;ssh, $command))) {             throw new SshException('Ssh command failed');         }         stream_set_blocking($stream, true);         $data = &quot;&quot;;         while ($buf = fread($stream, 4096)) {             $data .= $buf;         }         fclose($stream);          return $data;     }      \/**      * Executes command within the shell opening      *      * @param $command      *      * @return string      *\/     private function execByShell($command)     {         $this-&gt;openShell();         return $this-&gt;writeShell($command);     }      \/**      * opens shell      *      * @throws SshException      *\/     private function openShell()     {         if(is_null($this-&gt;shell)) {             \/\/ here is hardcoded width and height, you can change them.             $this-&gt;shell = @ssh2_shell($this-&gt;ssh,  $this-&gt;shellType, null, 80, 40, SSH2_TERM_UNIT_CHARS);         }          if( !$this-&gt;shell ) {             throw new SshException('SSH shell command failed');         }     }      \/**      *      * Write the command to the open shell      *      * @param $cmd      * @param int $maxExecTime in sec      *      * @return string      *\/     private function writeShell($cmd, $maxExecTime = self::MAX_EXECUTION_TIME)     {         \/\/ write start marker         fwrite($this-&gt;shell, $this-&gt;getMarker(self::START_MARK));         \/\/ write command         fwrite($this-&gt;shell, $cmd . PHP_EOL);         \/\/ write end marker         fwrite($this-&gt;shell, $this-&gt;getMarker(self::FINISH_MARK));         stream_set_blocking($this-&gt;shell, true);         sleep(1);         $output = &quot;&quot;;         $start = false;         \/\/ define the time until the script can be executed         $timeUntil = time() + $maxExecTime;          while(true) {             if(time() &gt; $timeUntil) {                 break;             }             $line = fgets($this-&gt;shell, 4096);             \/\/ if any delay is happened while command is processing             if(!is_string($line)) {                 sleep(1);                 continue;             }             \/\/ define the start executed command             if(preg_match('\/^' . self::START_MARK . '\\s*$\/', $line)) {                 $start = true;             } elseif(preg_match('\/^' . self::FINISH_MARK . '\\s*$\/', $line)) {  \/\/ define the last executed command                 break;             } elseif($start) {                 \/\/ add console output to the script output data                 $output .= $line;             }         }          return $output;     }      \/**      * Disconnect from ssh      *\/     public function disconnect() {         $this-&gt;exec('exit');         $this-&gt;ssh = null;         if(!is_null($this-&gt;shell)) {             fclose($this-&gt;shell);         }     }      \/**      * Disconnect in destruct      *\/     public function __destruct() {         $this-&gt;disconnect();     }      \/**      * Returns marker command      *      * @param string $type      *      * @return string      *\/     private function getMarker($type = self::START_MARK)     {         return 'echo &quot;' . $type . '&quot;' . PHP_EOL;     }  } <\/code><\/pre>\n<p>  \u041f.\u0421. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c, \u0432\u0435\u0434\u044c ssh2 \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0443\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434, \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0442.\u0434. \u0438 \u0442.\u043f.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. <br \/>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043e\u0442\u0437\u044b\u0432\u044b \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443!<\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440: \u0412\u043b\u0430\u0434\u0438\u0441\u043b\u0430\u0432 \u0418\u0432\u0430\u043d\u0435\u043d\u043a\u043e, PHP Developer Zfort Group      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/zfort\/blog\/225979\/\"> http:\/\/habrahabr.ru\/company\/zfort\/blog\/225979\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: <br \/>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 LAMP (\u0434\u0430\u043b\u0435\u0435 \u0421\u0421), <br \/>  Yii framework (\u0432\u0435\u0440\u0441\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0430\u0436\u043d\u0430),<br \/>  \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0434\u0430\u043b\u0435\u0435 \u0423\u0421), \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u0435\u043c\u043e\u043d Sphinx, searchd.<br \/>  \u041d\u0430 \u0423\u0421 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0440\u0443\u0442\u0430 (\u043d\u043e \u043d\u0435 \u0441\u0430\u043c \u0440\u0443\u0442).<br \/>  \u041d\u0430 \u0421\u0421 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c ssh2_mod \u0434\u043b\u044f PHP.<\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Sphinx, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043d\u0443\u0430\u043b <a href=\"http:\/\/sphinxsearch.com\/docs\/current.html\">sphinxsearch.com\/docs\/current.html<\/a>.<br \/>  \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  \u0418\u0442\u0430\u043a, Sphinx \u2014 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0434\u0435\u043c\u043e\u043d, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 MySQL. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u043e\u043d \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0437\u0443 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c (\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0441\u0444\u0438\u043d\u043a\u0441\u0430), \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u0441\u0432\u043e\u0438 \u0444\u0430\u0439\u043b\u044b. \u0427\u0442\u043e\u0431\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 (\u0432 MySQL \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439), \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0441\u0444\u0438\u043d\u043a\u0441\u0430. \u0422\u043e\u0433\u0434\u0430, \u043e\u043d \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0435\u0435 \u0441\u0435\u0431\u0435.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430:<br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0441\u0444\u0438\u043d\u043a\u0441\u0430 \u043d\u0430 \u0423\u0421.<br \/>  \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u043a\u0440\u043e\u043d\u0443 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0432 \u043a\u043e\u0434\u0435. \u041a\u0440\u043e\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441 \u0421\u0421.<br \/>  \u0422.\u0435. \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u043e\u043d, \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u043d\u0430 \u0423\u0421.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-225979","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/225979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225979"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/225979\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}