質問編集履歴

3

bassboneさんの追記依頼に応じて実施内容を追記しました

2018/03/05 08:08

投稿

imprezza
imprezza

スコア61

test CHANGED
File without changes
test CHANGED
@@ -259,3 +259,77 @@
259
259
 
260
260
 
261
261
  //以下省略//
262
+
263
+
264
+
265
+ ※追記(3)
266
+
267
+ bassboneさんの操作を実施してみました
268
+
269
+ which php
270
+
271
+ >>/usr/bin/php
272
+
273
+
274
+
275
+ which php
276
+
277
+ >>/usr/bin/php
278
+
279
+
280
+
281
+ シンボリックリンクをたどっていくと…
282
+
283
+ cd /usr/bin
284
+
285
+ ls -l php*
286
+
287
+ >>lrwxrwxrwx 1 root root 21 8月 27 2016 php -> /etc/alternatives/php
288
+
289
+ >>lrwxrwxrwx 1 root root 28 8月 17 2017 php-config -> /etc/alternatives/php-config
290
+
291
+
292
+
293
+ cd /etc/alternatives
294
+
295
+ ls -l php*
296
+
297
+ >>lrwxrwxrwx 1 root root 15 1月 17 11:07 php -> /usr/bin/php7.2
298
+
299
+ >>lrwxrwxrwx 1 root root 22 8月 17 2017 php-config -> /usr/bin/php-config7.0
300
+
301
+ >>lrwxrwxrwx 1 root root 38 8月 17 2017 php-config.1.gz -> /usr/share/man/man1/php-config7.0.1.gz
302
+
303
+ >>lrwxrwxrwx 1 root root 31 1月 17 11:07 php.1.gz -> /usr/share/man/man1/php7.2.1.gz
304
+
305
+ >>lrwxrwxrwx 1 root root 18 8月 17 2017 phpize -> /usr/bin/phpize7.0
306
+
307
+ >>lrwxrwxrwx 1 root root 34 8月 17 2017 phpize.1.gz -> /usr/share/man/man1/phpize7.0.1.gz
308
+
309
+
310
+
311
+ cd /usr/bin/
312
+
313
+ ls -l php*
314
+
315
+ >>lrwxrwxrwx 1 root root 21 8月 27 2016 php -> /etc/alternatives/php
316
+
317
+ >>lrwxrwxrwx 1 root root 28 8月 17 2017 php-config -> /etc/alternatives/php-config
318
+
319
+ >>-rwxr-xr-x 1 root root 4169 1月 12 08:52 php-config7.0
320
+
321
+ >>-rwxr-xr-x 1 root root 4062856 1月 12 08:53 php7.0
322
+
323
+ >>-rwxr-xr-x 1 root root 4218976 2月 9 19:41 php7.1
324
+
325
+ >>-rwxr-xr-x 1 root root 4432704 2月 7 02:34 php7.2
326
+
327
+ >>lrwxrwxrwx 1 root root 24 8月 17 2017 phpize -> /etc/alternatives/phpize
328
+
329
+ >>-rwxr-xr-x 1 root root 4687 1月 12 08:52 phpize7.0
330
+
331
+
332
+
333
+ php7.0~php7.2というファイル群にたどり着きました
334
+
335
+ 途中に散見するphp-config等がphp7.0なのにphpのシンボリックリンクがphp7.2となっているのが悪さをしているのでしょうか…

2

追記依頼に応じてphpinfo の内容を追記しました

2018/03/05 08:08

投稿

imprezza
imprezza

スコア61

test CHANGED
File without changes
test CHANGED
@@ -51,3 +51,211 @@
51
51
   そのうえでphpinfoを表示すると…何故が表示されます
52
52
 
53
53
   一体何のPHPエンジンが動作しているのか判らない状態になってしまいました
54
+
55
+
56
+
57
+ ※追記(2)
58
+
59
+ bassboneさんの依頼に回答します
60
+
61
+ phpinfo.php
62
+
63
+ <?php
64
+
65
+ phpinfo();
66
+
67
+ ?>
68
+
69
+ 上記PHPファイルをコマンドラインで
70
+
71
+ #php phpinfo.php
72
+
73
+ と実行した結果です
74
+
75
+
76
+
77
+ phpinfo()
78
+
79
+ PHP Version => 7.2.2-3+ubuntu16.04.1+deb.sury.org+1
80
+
81
+
82
+
83
+ System => Linux ws9011 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:22:43 UTC 2018 i686
84
+
85
+ Build Date => Feb 6 2018 16:11:23
86
+
87
+ Server API => Command Line Interface
88
+
89
+ Virtual Directory Support => disabled
90
+
91
+ Configuration File (php.ini) Path => /etc/php/7.2/cli
92
+
93
+ Loaded Configuration File => /etc/php/7.2/cli/php.ini
94
+
95
+ Scan this dir for additional .ini files => /etc/php/7.2/cli/conf.d
96
+
97
+ Additional .ini files parsed => /etc/php/7.2/cli/conf.d/10-mysqlnd.ini,
98
+
99
+ /etc/php/7.2/cli/conf.d/10-opcache.ini,
100
+
101
+ /etc/php/7.2/cli/conf.d/10-pdo.ini,
102
+
103
+ /etc/php/7.2/cli/conf.d/15-xml.ini,
104
+
105
+ /etc/php/7.2/cli/conf.d/20-calendar.ini,
106
+
107
+ /etc/php/7.2/cli/conf.d/20-ctype.ini,
108
+
109
+ /etc/php/7.2/cli/conf.d/20-dom.ini,
110
+
111
+ /etc/php/7.2/cli/conf.d/20-exif.ini,
112
+
113
+ /etc/php/7.2/cli/conf.d/20-fileinfo.ini,
114
+
115
+ /etc/php/7.2/cli/conf.d/20-ftp.ini,
116
+
117
+ /etc/php/7.2/cli/conf.d/20-gd.ini,
118
+
119
+ /etc/php/7.2/cli/conf.d/20-gettext.ini,
120
+
121
+ /etc/php/7.2/cli/conf.d/20-iconv.ini,
122
+
123
+ /etc/php/7.2/cli/conf.d/20-json.ini,
124
+
125
+ /etc/php/7.2/cli/conf.d/20-mbstring.ini,
126
+
127
+ /etc/php/7.2/cli/conf.d/20-mysqli.ini,
128
+
129
+ /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini,
130
+
131
+ /etc/php/7.2/cli/conf.d/20-phar.ini,
132
+
133
+ /etc/php/7.2/cli/conf.d/20-posix.ini,
134
+
135
+ /etc/php/7.2/cli/conf.d/20-readline.ini,
136
+
137
+ /etc/php/7.2/cli/conf.d/20-shmop.ini,
138
+
139
+ /etc/php/7.2/cli/conf.d/20-simplexml.ini,
140
+
141
+ /etc/php/7.2/cli/conf.d/20-sockets.ini,
142
+
143
+ /etc/php/7.2/cli/conf.d/20-sysvmsg.ini,
144
+
145
+ /etc/php/7.2/cli/conf.d/20-sysvsem.ini,
146
+
147
+ /etc/php/7.2/cli/conf.d/20-sysvshm.ini,
148
+
149
+ /etc/php/7.2/cli/conf.d/20-tokenizer.ini,
150
+
151
+ /etc/php/7.2/cli/conf.d/20-wddx.ini,
152
+
153
+ /etc/php/7.2/cli/conf.d/20-xmlreader.ini,
154
+
155
+ /etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
156
+
157
+ /etc/php/7.2/cli/conf.d/20-xsl.ini
158
+
159
+
160
+
161
+ PHP API => 20170718
162
+
163
+ PHP Extension => 20170718
164
+
165
+ Zend Extension => 320170718
166
+
167
+ Zend Extension Build => API320170718,NTS
168
+
169
+ PHP Extension Build => API20170718,NTS
170
+
171
+ Debug Build => no
172
+
173
+ Thread Safety => disabled
174
+
175
+ Zend Signal Handling => enabled
176
+
177
+ Zend Memory Manager => enabled
178
+
179
+ Zend Multibyte Support => provided by mbstring
180
+
181
+ IPv6 Support => enabled
182
+
183
+ DTrace Support => available, disabled
184
+
185
+
186
+
187
+ Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
188
+
189
+ Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
190
+
191
+ Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
192
+
193
+
194
+
195
+ This program makes use of the Zend Scripting Language Engine:
196
+
197
+ Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
198
+
199
+ with Zend OPcache v7.2.2-3+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
200
+
201
+
202
+
203
+ //以下省略//
204
+
205
+
206
+
207
+ 因みにWEBで同じphpinfo.phpを呼び出した際の内容は以下の通りです
208
+
209
+
210
+
211
+ PHP Version 7.0.27-1+ubuntu16.04.1+deb.sury.org+1
212
+
213
+ System Linux ws9011 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:22:43 UTC 2018 i686
214
+
215
+ Build Date Jan 5 2018 14:12:46
216
+
217
+ Server API Apache 2.0 Handler
218
+
219
+ Virtual Directory Support disabled
220
+
221
+ Configuration File (php.ini) Path /etc/php/7.0/apache2
222
+
223
+ Loaded Configuration File /etc/php/7.0/apache2/php.ini
224
+
225
+ Scan this dir for additional .ini files /etc/php/7.0/apache2/conf.d
226
+
227
+ Additional .ini files parsed /etc/php/7.0/apache2/conf.d/10-mysqlnd.ini, /etc/php/7.0/apache2/conf.d/10-opcache.ini, /etc/php/7.0/apache2/conf.d/10-pdo.ini, /etc/php/7.0/apache2/conf.d/15-xml.ini, /etc/php/7.0/apache2/conf.d/20-calendar.ini, /etc/php/7.0/apache2/conf.d/20-ctype.ini, /etc/php/7.0/apache2/conf.d/20-dom.ini, /etc/php/7.0/apache2/conf.d/20-exif.ini, /etc/php/7.0/apache2/conf.d/20-fileinfo.ini, /etc/php/7.0/apache2/conf.d/20-ftp.ini, /etc/php/7.0/apache2/conf.d/20-gettext.ini, /etc/php/7.0/apache2/conf.d/20-iconv.ini, /etc/php/7.0/apache2/conf.d/20-json.ini, /etc/php/7.0/apache2/conf.d/20-mysqli.ini, /etc/php/7.0/apache2/conf.d/20-pdo_mysql.ini, /etc/php/7.0/apache2/conf.d/20-phar.ini, /etc/php/7.0/apache2/conf.d/20-posix.ini, /etc/php/7.0/apache2/conf.d/20-readline.ini, /etc/php/7.0/apache2/conf.d/20-shmop.ini, /etc/php/7.0/apache2/conf.d/20-simplexml.ini, /etc/php/7.0/apache2/conf.d/20-sockets.ini, /etc/php/7.0/apache2/conf.d/20-sysvmsg.ini, /etc/php/7.0/apache2/conf.d/20-sysvsem.ini, /etc/php/7.0/apache2/conf.d/20-sysvshm.ini, /etc/php/7.0/apache2/conf.d/20-tokenizer.ini, /etc/php/7.0/apache2/conf.d/20-wddx.ini, /etc/php/7.0/apache2/conf.d/20-xmlreader.ini, /etc/php/7.0/apache2/conf.d/20-xmlwriter.ini, /etc/php/7.0/apache2/conf.d/20-xsl.ini
228
+
229
+ PHP API 20151012
230
+
231
+ PHP Extension 20151012
232
+
233
+ Zend Extension 320151012
234
+
235
+ Zend Extension Build API320151012,NTS
236
+
237
+ PHP Extension Build API20151012,NTS
238
+
239
+ Debug Build no
240
+
241
+ Thread Safety disabled
242
+
243
+ Zend Signal Handling disabled
244
+
245
+ Zend Memory Manager enabled
246
+
247
+ Zend Multibyte Support disabled
248
+
249
+ IPv6 Support enabled
250
+
251
+ DTrace Support available, disabled
252
+
253
+ Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
254
+
255
+ Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
256
+
257
+ Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*
258
+
259
+
260
+
261
+ //以下省略//

1

検証のために実施した操作を追記しました

2018/03/05 07:41

投稿

imprezza
imprezza

スコア61

test CHANGED
File without changes
test CHANGED
@@ -31,3 +31,23 @@
31
31
  対策方針はどちらでも構いません(どちらでも良いという構築は本来NGだとは思いますが…)
32
32
 
33
33
  一度PHP環境の設定し直しをする方法はありませんか?
34
+
35
+
36
+
37
+ ※追記
38
+
39
+  PHP環境の見直しのため、WEBサーバを止めて
40
+
41
+  ・apt-get purge php7.0
42
+
43
+  ・apt-get purge php7.2
44
+
45
+  ・apt-get purge php5.6
46
+
47
+  ・apt-get purge php5
48
+
49
+  と、PHP関連をこれでもかとアンインストールしてまっさらな状態にしてみました。
50
+
51
+  そのうえでphpinfoを表示すると…何故が表示されます
52
+
53
+  一体何のPHPエンジンが動作しているのか判らない状態になってしまいました