- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2023-10-24T14:48:21+09:00","default:kuji","kuji")
[[php 5.3.9 de トラブル]]
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*.php にアクセスするとダウンロードになる! [#va075a2a]
pkgng へ移行して、pkg upgrade した後、.php ファイルへアクセスすると、ダウンロードになるようになったった。
まぁ、良くあるトラブルではあるが、思わぬ原因だったんで、φ(..)メモメモ
pkg upgrade した場合、Apacheやphpなどもupgradeされるが、lang/php5 のinstall オプションの mod_php5 が外されているとのこと。
# portupgrade lang/php5
[Reading data from pkg(8) ... - 284 packages found - done]
** Port marked as IGNORE: lang/php5:
doesn't install the Apache module anymore: update your OPTIONS and build www/mod_php5 port instead
** Listing the failed packages (-:ignored / *:skipped / !:failed)
- lang/php5 (marked as IGNORE)
ということなので・・・
# pkg install www/mod_php5
Updating repository catalogue
The following 1 packages will be installed:
* portinstall www/mod_php81 [#wc2f96fc]
Installing mod_php81-8.1.24...
[activating module `php' in /usr/local/etc/apache24/httpd.conf]
******************************************************************************
Installing mod_php5: 5.4.27_1,1
Make sure index.php is part of your DirectoryIndex.
The installation will require 4 MB more space
You should add the following to your Apache configuration file:
1 MB to be downloaded
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
Proceed with installing packages [y/N]: y
mod_php5-5.4.27_1,1.txz 100% 1060KB 1.0MB/s 750.0KB/s 00:01
Checking integrity... done
[1/1] Installing mod_php5-5.4.27_1,1...[activating module `php5' in /usr/local/etc/apache22/httpd.conf]
done
***************************************************************
******************************************************************************
Make sure index.php is part of your DirectoryIndex.
If you are building PHP-based ports in poudriere(8) or Synth with ZTS enabled,
add WITH_MPM=event to /etc/make.conf to prevent build failures.
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/libphp.so
***************************************************************
#
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:
https://www.php.net/
===> Cleaning for mod_php81-8.1.24
# apachectl restart
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 2232.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
で、OK!
----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);