今日の花:みずたがらし 燃える愛情  今日の星:ファイ・エーリダニー(エリダヌス座φ星) 幸せをわかちあう清い心

Luxeritas(ルクセリタス) ローカルのPHP7.4で動かす

2023年1月5日ルクセリタス

ここのメモは STINGER6 を使っていた時のものでしたので、R2.1.29現在のものに書き換えました。1つ1つインストールするくらいなら XAMPP を使った方が簡単でしょう。

ただ、データベースが MySQL でなく MariaDB になってしまいますが。

使っているファイル。
httpd-2.4.41-win64-VC15.zip  ダウンロード先へ
php-7.4.2-Win32-vc15-x64.zip  ダウンロード先へ
mysql-installer-community-5.7.28.0.msi  ダウンロード先へ
phpMyAdmin-5.0.1-all-languages.zip  ダウンロード先へ

Apacheの設定

サービスを自動から手動に変更する。
====================
起動 >httpd
停止 Ctrl + C
サービス登録 >httpd -k install
サービス起動 >httpd -k start
サービス停止 >httpd -k stop または >httpd -k shutdown
サービス再起動 >httpd -k restart
サービス削除 >httpd -k uninstall
====================
httpd.confを別ネームでコピーし保存しておく。
httpd.confを編集。

変更
#Define SRVROOT “c:/Apache24″ を
Define SRVROOT “c:/app64/Apache24″

変更 Wordpressのパーマリンク用
#LoadModule rewrite_module modules/mod_rewrite.so を
LoadModule rewrite_module modules/mod_rewrite.so

追加
LoadModule php7_module c:/app64/php7/php7apache2_4.dll

変更
#ServerName www.example.com:80 を
ServerName localhost:80

変更
# DocumentRoot “${SRVROOT}/htdocs" を
DocumentRoot “d:/www"

変更
# <Directory “${SRVROOT}/htdocs"> を
<Directory “d:/www">

変更 <Directrory “${SRVROOT}/htdocs">エリア内
#Options Indexes FollowSymLinks を
Options Indexes FollowSymLinks ExecCGI

変更 <Directory “${SRVROOT/htdocs">エリア内
#AllowOverride None を
AllowOverride All

変更 <IfModule dir_module>エリア内
#DirectoryIndex index.html を
DirectoryIndex index.php index.cgi index.html

変更 <IfModule alias_module>エリア内
ScriptAlias /cgi-bin/ “${SRVROOT/cgi-bin/" を
#ScriptAlias /cgi-bin/ “${SRVROOT/cgi-bin/"

変更 <IfModule mine_module>エリア内
#AddHandler cgi-script .cgi を
AddHandler cgi-script .cgi

追加 <IfModule mime_module>エリア内
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

最終行に追加
PHPIniDir “c:/app64/php7″

phpの設定

php.ini-developmentをphp.iniにリネームコピーし編集。

変更
; extension_dir = “ext" を
extension_dir = “c:/app64/php7/ext"

;extension=bz2
;extension=curl
;extension=gd2
;extension=mbstring
;extension=mysqli
;extension=openssl を
extension=bz2
extension=curl
extension=gd2
extension=mbstring
extension=mysqli
extension=openssl

;date.timezone = を
date.timezone = “Asia/Tokyo"

MySQLの設定

サービスを自動から手動に変更する。
====================
接続 >mysql -u root -p
終了 >exit
サービス登録 >mysqld –install 登録名 –defaults-file=*/my.ini
サービス起動 >net start mysql
サービス停止 >net stop mysql
サービス削除 >mysqld –remove 登録名
====================
my.iniを別ネームでコピーし保存しておく。
my.iniを編集。

変更
# default-character-set= を
default-character-set=UTF8

変更
# character-set-server= を
character-set-server=UTF8

phpMyAdminの設定

config.sample.inc.phpをconfig.inc.phpにリネームコピーし編集。

変更
$cfg['blowfish_secret’] = “; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ を
$cfg['blowfish_secret’] = 'passnotane’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

コメントアウトを外す
$cfg['Servers’][$i]['pmadb’] = 'phpmyadmin’;
$cfg['Servers’][$i]['bookmarktable’] = 'pma__bookmark’;
$cfg['Servers’][$i]['relation’] = 'pma__relation’;
$cfg['Servers’][$i]['table_info’] = 'pma__table_info’;
$cfg['Servers’][$i]['table_coords’] = 'pma__table_coords’;
$cfg['Servers’][$i]['pdf_pages’] = 'pma__pdf_pages’;
$cfg['Servers’][$i]['column_info’] = 'pma__column_info’;
$cfg['Servers’][$i]['history’] = 'pma__history’;
$cfg['Servers’][$i]['table_uiprefs’] = 'pma__table_uiprefs’;
$cfg['Servers’][$i]['tracking’] = 'pma__tracking’;
$cfg['Servers’][$i]['userconfig’] = 'pma__userconfig’;
$cfg['Servers’][$i]['recent’] = 'pma__recent’;
$cfg['Servers’][$i]['favorite’] = 'pma__favorite’;
$cfg['Servers’][$i]['users’] = 'pma__users’;
$cfg['Servers’][$i]['usergroups’] = 'pma__usergroups’;
$cfg['Servers’][$i]['navigationhiding’] = 'pma__navigationhiding’;
$cfg['Servers’][$i]['savedsearches’] = 'pma__savedsearches’;
$cfg['Servers’][$i]['central_columns’] = 'pma__central_columns’;
$cfg['Servers’][$i]['designer_settings’] = 'pma__designer_settings’;
$cfg['Servers’][$i]['export_templates’] = 'pma__export_templates’;

追加
$cfg['Servers’][$i]['extension’] = 'mysqli’;
====================
phpMyAdminをインストールしたフォルダ「sql」内にあるcreate_tables.sqlをインポートし、phpmyadminのデータベースを作る。

こちらのサイトを参考にさせていただきました。 DBOnline
====================

コメント欄を閉じる

ディスカッション

コメント一覧

まだ、コメントがありません

コメントをどうぞ

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.