LinuxForum.Fans
Тема

Как прикрутить php55 к apache24?

Автор: Plintus 40 сообщений 10353 просмотров В конец обсуждения ↓
#402759
text
uname -a
FreeBSD sprinter 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
#402764
pitdron написал:

Обновите pkg

cd /usr/ports/ports-mgmt/pkg
make deinstall install clean

В конце ошибка и stop

text
===>  Checking if pkg already installed
===>   pkg-1.3.8_3 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of pkg
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop. make[1]: stopped in /usr/ports/ports-mgmt/pkg *** Error code 1

Stop. make: stopped in /usr/ports/ports-mgmt/pkg

#402774

Убрал птицу с debug ,сделал мake deinstall php 5 а затем make install из порта. Перезапустил апач

text
Fri Nov 28 09:16:06.320728 2014] [mpm_prefork:notice] [pid 34814] AH00169: caught SIGTERM, shutting down
PHP Warning:  PHP Startup: session: Unable to initialize module\nModule compiled with build ID=API20121212,NTS,debug\nPHP    compiled with build ID=$
PHP Warning:  PHP Startup: mbstring: Unable to initialize module\nModule compiled with build ID=API20121212,NTS,debug\nPHP    compiled with build ID$
PHP Warning:  PHP Startup: xml: Unable to initialize module\nModule compiled with build ID=API20121212,NTS,debug\nPHP    compiled with build ID=API2$
PHP Warning:  PHP Startup: xmlrpc: Unable to initialize module\nModule compiled with build ID=API20121212,NTS,debug\nPHP    compiled with build ID=A$
PHP Warning:  PHP Startup: mysql: Unable to initialize module\nModule compiled with build ID=API20121212,NTS,debug\nPHP    compiled with build ID=AP$
$ ID=API20121212,NTS\nThese options need to match\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212/mysqli.so' - /usr/local/lib/php/20121212/mysqli.so: Undefined$
$efined symbol "_zval_ptr_dtor_wrapper" in Unknown on line 0

[Fri Nov 28 09:16:07.112412 2014] [mpm_prefork:notice] [pid 84811] AH00163: Apache/2.4.10 (FreeBSD) PHP/5.5.19 configured -- resuming normal operati$ [Fri Nov 28 09:16:07.112799 2014] [core:notice] [pid 84811] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'

И хотя я делал deinstall все библиотеки в пресловутой 20121212 остались за 26-е число да и сама эта директория та же, от названия которой я отсёк debug :)
У меня также не прикручивалась php56 и мне сказали нафиг я вообще её использую, она недопилена. Я так понял что надо помладше взять. Может вообще 53 попробовать?

#402777

еще раз попробуйте

text
cd /usr/ports/ports-mgmt/pkg
make deinstall
make install
make clean

Если все правильно то

text
portversion -v | grep php

должен выдать список установленных приложений и модулей php.

#402778
text
root@sprinter:/usr/ports/ports-mgmt/pkg # make deinstall
===>  Deinstalling for pkg
/usr/ports/ports-mgmt/pkg/work/pkg-1.3.8/src/pkg-static: not found
===>   pkg not installed, skipping

Делаю make install

#402780

Опять та же история

text
===>  Installing for pkg-1.3.8_3
===>  Checking if pkg already installed
===>   pkg-1.3.8_3 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of pkg
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop. make[1]: stopped in /usr/ports/ports-mgmt/pkg *** Error code 1

Stop. make: stopped in /usr/ports/ports-mgmt/pkg

deinstall показывает что пакет не установлен а install говорит что он установлен :)

#402782

make install FORCE_PKG_REGISTER=1

#402783

При этом:

text
 portversion -v | grep php
[Reading data from pkg(8) ... - 72 packages found - done]
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 24394 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000.........24000... ..... done]
mod_php55-5.5.19            =  up-to-date with port 
php55-5.5.19                =  up-to-date with port 
php55-mbstring-5.5.19       =  up-to-date with port 
php55-mysql-5.5.19          =  up-to-date with port 
php55-mysqli-5.5.19         =  up-to-date with port 
php55-session-5.5.19        =  up-to-date with port 
php55-xml-5.5.19            =  up-to-date with port 
php55-xmlrpc-5.5.19         =  up-to-date with port 
#402784
text
make install FORCE_PKG_REGISTER=1
===>  Installing for pkg-1.3.8_3
===>   Registering installation for pkg-1.3.8_3
If you are upgrading from the old package format, first run:

# pkg2ng

#402786

Я начал а потом вспомнил что усёк debug из названия директории

text
pkg2ng
Converting packages from /var/db/pkg
Analysing shared libraries, this will take a while... 
Checking all packages:  63%
pkg: fstat() failed for(/usr/local/lib/php/20121212-debug/mbstring.so): No such file or directory
Checking all packages:  65%
pkg: fstat() failed for(/usr/local/lib/php/20121212-debug/mysql.so): No such file or directory
Checking all packages:  66%
pkg: fstat() failed for(/usr/local/lib/php/20121212-debug/mysqli.so): No such file or directory
Checking all packages:  68%
pkg: fstat() failed for(/usr/local/lib/php/20121212-debug/session.so): No such file or directory
Checking all packages:  69%
pkg: fstat() failed for(/usr/local/lib/php/20121212-debug/xml.so): No such file or directory
Checking all packages:  70%
pkg: fstat() failed for(/usr/local/lib/php/20121212-debug/xmlrpc.so): No such file or directory
Checking all packages:  93%^C

восстановил название. запустил pkg2ng

#402787

Теперь

portupgrade -f *php5*

#402788
text
pkg2ng
Converting packages from /var/db/pkg
Analysing shared libraries, this will take a while... 
Checking all packages: 100%

Сделал

text
 make install FORCE_PKG_REGISTER=1 

вообще никаких сообщений

#402789
pitdron написал:
Теперь

portupgrade -f *php5*

portupgrade -f *php5*
portupgrade: No match.

#402813

Я сделал deinstal php55 и попробовал поставить php53

text
make install clean
===>  Installing for php53-5.3.29_2
===>   php53-5.3.29_2 depends on file: /usr/local/sbin/apxs - found
===>   php53-5.3.29_2 depends on shared library: libpcre.so - found (/usr/local/lib/libpcre.so.3)
===>   php53-5.3.29_2 depends on shared library: libxml2.so - found (/usr/local/lib/libxml2.so.2.9.2)
===>  Checking if php53 already installed
===>   Registering installation for php53-5.3.29_2
pkg-static: php53-5.3.29_2 conflicts with mod_php55-5.5.19 (installs files into the same place).  Problematic file: /usr/local/libexec/apache24/libphp5.so
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps

***************************************************************

*** Error code 70

Stop. make[1]: stopped in /usr/ports/lang/php53 *** Error code 1

Stop.

#402816

А так вроде установился

text
/usr/ports/www/mod_php55 # make deinstall
===>  Deinstalling for mod_php55
===>   Deinstalling mod_php55-5.5.19
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED: mod_php55-5.5.19

The operation will free 3 MB. [preparing module `php5' in /usr/local/etc/apache24/httpd.conf] [1/1] Deleting mod_php55-5.5.19: 100% root@sprinter:/usr/ports/www/mod_php55 # cd /usr/ports/lang/php53 root@sprinter:/usr/ports/lang/php53 # make install clean ===> Installing for php53-5.3.29_2 ===> php53-5.3.29_2 depends on file: /usr/local/sbin/apxs - found ===> php53-5.3.29_2 depends on shared library: libpcre.so - found (/usr/local/lib/libpcre.so.3) ===> php53-5.3.29_2 depends on shared library: libxml2.so - found (/usr/local/lib/libxml2.so.2.9.2) ===> Checking if php53 already installed ===> Registering installation for php53-5.3.29_2 [activating module `php5' in /usr/local/etc/apache24/httpd.conf] ***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps

***************************************************************

===> SECURITY REPORT: This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/libexec/apache24/libphp5.so /usr/local/bin/php /usr/local/bin/php-cgi

If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern.

For more information, and contact details about the security status of this software, see the following webpage: http://www.php.net/ ===> Cleaning for pkg-1.3.8_3 ===> Cleaning for php53-5.3.29_2

#402817

Но опять те же яйца только в профиль :)
[

text
Fri Nov 28 12:06:00.687663 2014] [mpm_prefork:notice] [pid 72222] AH00169: caught SIGTERM, shutting down
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/session.so' - Cannot open &quot;/usr/local/lib/php/20090626/s$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/mbstring.so' - Cannot open &quot;/usr/local/lib/php/20090626/$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/xml.so' - Cannot open &quot;/usr/local/lib/php/20090626/xml.s$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/xmlrpc.so' - Cannot open &quot;/usr/local/lib/php/20090626/xm$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/mysql.so' - Cannot open &quot;/usr/local/lib/php/20090626/mys$
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/mysqli.so' - Cannot open &quot;/usr/local/lib/php/20090626/my$
[Fri Nov 28 12:06:01.419501 2014] [mpm_prefork:notice] [pid 73033] AH00163: Apache/2.4.10 (FreeBSD) PHP/5.3.29 with Suhosin-Patch configured -- resu$
[Fri Nov 28 12:06:01.419890 2014] [core:notice] [pid 73033] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'

А директории для 20090626/ вообще нет, осталась только 20121212/ от php 55 но зато в 53 есть окошечко в конфиге дла подключения апача :D
Может у кого-то есть таблица совместимости версий php с апачем?

#402822

В общем получилась каша

text
portversion -v | grep php
[Reading data from pkg(8) ... - 71 packages found - done]
php53-5.3.29_2              =  up-to-date with port 
php55-mbstring-5.5.19       =  up-to-date with port 
php55-mysql-5.5.19          =  up-to-date with port 
php55-mysqli-5.5.19         =  up-to-date with port 
php55-session-5.5.19        =  up-to-date with port 
php55-xml-5.5.19            =  up-to-date with port 
php55-xmlrpc-5.5.19         =  up-to-date with port 
#402829

php53 не делает директорию /usr/local/lib/php/20090626 которая нужна апачу . Он формирует только buid

#402843

В общем я удалил с помощью pkg delete все остатки php55 переустановил php53 И всё заработало *BRAVO*

text

[Fri Nov 28 13:37:34.811549 2014] [mpm_prefork:notice] [pid 1071] AH00169: caught SIGTERM, shutting down
[Fri Nov 28 13:37:35.538611 2014] [mpm_prefork:notice] [pid 76780] AH00163: Apache/2.4.10 (FreeBSD) PHP/5.3.29 with Suhosin-Patch configured -- resu$
[Fri Nov 28 13:37:35.539004 2014] [core:notice] [pid 76780] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'

Только вот posfixadmin почему то не в обычной форме



Как его к нормальному виду привести?

#402852

Ура товарищи. С php53 всё заработало . Всем спасибо за терпение *DANCE*

Войдите или зарегистрируйтесь, чтобы ответить.