# Further relax access to the default document root:
<Directory “/var/www/html”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
# #Options Indexes FollowSymLinks ← デフォルトの「Options Indexes FollowSymLinks」をコメントアウトします。(#をつける) Options -Indexes← 「Options -Indexes」を追加します。
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
7月 13 23:45:58 xxx-xxx-xxxxx.vs.sakura.ne.jp systemd[1]: Starting The Apache HTTP Server…
7月 13 23:45:58 xxx-xxx-xxxxx.vs.sakura.ne.jp systemd[1]: Started The Apache HTTP Server.
再度「URL」にアクセスしてみます。
今後は下図のように「Forbidden」が表示されました。
メッセージを読むと
「Forbidden
You dont’t have permission to access /wordpress/ on this server.」とあります。
つまり、「権限が足りません」ということです。
再度「/etc/httpd/conf/httpd.conf」を確認します。
# less /etc/httpd/conf/httpd.conf
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module> DirectoryIndex index.html ← index.htmlしかありません。(index.phpがありません)
</IfModule>
==============================================================================================================================================================================
Package アーキテクチャー バージョン リポジトリー 容量
==============================================================================================================================================================================
インストール中:
php-pear noarch 1:1.9.4-21.el7 base 357 k
依存性関連でのインストールをします:
php-process x86_64 5.4.16-42.el7 base 55 k
php-xml x86_64 5.4.16-42.el7 base 125 k
# pecl install pdo
WARNING: “pecl/PDO” is deprecated in favor of “channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO”
WARNING: channel “pecl.php.net” has updated its protocols, use “pecl channel-update pecl.php.net” to update
downloading PDO-1.0.3.tgz …
Starting to download PDO-1.0.3.tgz (52,613 bytes)
…..done: 52,613 bytes
12 source files, building
running: phpize Can’t find PHP headers in /usr/include/php The php-devel package is required for use of this command. ERROR: `phpize’ failed ← エラーになりました。
#
エラーメッセージを確認すると「The php-devel package is required」とあります。
つまり「php-devel」をインストールする必要があります。
# yum install php-devel ← 「php-devel」をインストールします。
読み込んだプラグイン:fastestmirror, langpacks
http://repos.fedorapeople.org/repos/sic/qt48/epel-7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 – Not Found
他のミラーを試します。
To address this issue please refer to the below knowledge base article
総ダウンロード容量: 601 k
インストール容量: 4.0 M
Is this ok [y/d/N]: y
Downloading packages:
php-devel-5.4.16-42.el7.x86_64.rpm | 601 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
インストール中 : php-devel-5.4.16-42.el7.x86_64 1/1
検証中 : php-devel-5.4.16-42.el7.x86_64 1/1
# pecl install pdo ← 再度挑戦します。
WARNING: “pecl/PDO” is deprecated in favor of “channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO”
WARNING: channel “pecl.php.net” has updated its protocols, use “pecl channel-update pecl.php.net” to update
downloading PDO-1.0.3.tgz …
Starting to download PDO-1.0.3.tgz (52,613 bytes)
…..done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
building in /var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3
running: /var/tmp/PDO/configure
checking for grep that handles long lines and -e… /usr/bin/grep
checking for egrep… /usr/bin/grep -E
checking for a sed that does not truncate output… /usr/bin/sed
checking for cc… cc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether cc accepts -g… yes
checking for cc option to accept ISO C89… none needed
checking how to run the C preprocessor… cc -E
checking for icc… no
checking for suncc… no
checking whether cc understands -c and -o together… yes
checking for system library directory… lib
checking if compiler supports -R… no
checking if compiler supports -Wl,-rpath,… yes
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for PHP prefix… /usr
checking for PHP includes… -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory… /usr/lib64/php/modules
checking for PHP installed headers prefix… /usr/include/php
checking if debug is enabled… no
checking if zts is enabled… no
checking for re2c… no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk… gawk
checking whether to enable PDO support… yes, shared
checking how to print strings… printf
checking for a sed that does not truncate output… (cached) /usr/bin/sed
checking for fgrep… /usr/bin/grep -F
checking for ld used by cc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface… BSD nm
checking whether ln -s works… yes
checking the maximum length of command line arguments… 1572864
checking whether the shell understands some XSI constructs… yes
checking whether the shell understands “+=”… yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format… func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format… func_convert_file_noop
checking for /usr/bin/ld option to reload object files… -r
checking for objdump… objdump
checking how to recognize dependent libraries… pass_all
checking for dlltool… no
checking how to associate runtime and link libraries… printf %s\n
checking for ar… ar
checking for archiver @FILE support… @
checking for strip… strip
checking for ranlib… ranlib
checking for gawk… (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object… ok
checking for sysroot… no
checking for mt… no
checking if : is a manifest tool… no
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for dlfcn.h… yes
checking for objdir… .libs
checking if cc supports -fno-rtti -fno-exceptions… no
checking for cc option to produce PIC… -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works… yes
checking if cc static flag -static works… no
checking if cc supports -c -o file.o… yes
checking if cc supports -c -o file.o… (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/libtool –mode=compile cc -I. -I/var/tmp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/include -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/main -I/var/tmp/PDO -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/PDO/pdo.c -o pdo.lo
libtool: compile: cc -I. -I/var/tmp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/include -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/main -I/var/tmp/PDO -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/PDO/pdo.c -fPIC -DPIC -o .libs/pdo.o
/bin/sh /var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/libtool –mode=compile cc -I. -I/var/tmp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/include -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/main -I/var/tmp/PDO -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/PDO/pdo_dbh.c -o pdo_dbh.lo
libtool: compile: cc -I. -I/var/tmp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/include -I/var/tmp/pear-build-rootyLQcqQ/PDO-1.0.3/main -I/var/tmp/PDO -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/PDO/pdo_dbh.c -fPIC -DPIC -o .libs/pdo_dbh.o
/var/tmp/PDO/pdo_dbh.c: In function ‘pdo_stmt_instantiate’:
/var/tmp/PDO/pdo_dbh.c:410:8: error: ‘zval’ has no member named ‘refcount’
object->refcount = 1;
^
/var/tmp/PDO/pdo_dbh.c:411:8: error: ‘zval’ has no member named ‘is_ref’
object->is_ref = 1;
^
/var/tmp/PDO/pdo_dbh.c: In function ‘pdo_stmt_construct’:
/var/tmp/PDO/pdo_dbh.c:424:2: error: too few arguments to function ‘std_object_handlers.write_property’
std_object_handlers.write_property(object, &z_key, query_string TSRMLS_CC);
^
/var/tmp/PDO/pdo_dbh.c:435:6: error: ‘zend_fcall_info’ has no member named ‘object_pp’
fci.object_pp = &object;
^
/var/tmp/PDO/pdo_dbh.c:458:6: error: ‘zend_fcall_info_cache’ has no member named ‘object_pp’
fcc.object_pp = &object;
^
/var/tmp/PDO/pdo_dbh.c: In function ‘zim_PDO_setAttribute’:
/var/tmp/PDO/pdo_dbh.c:752:12: error: ‘zval’ has no member named ‘refcount’
(*item)->refcount++;
^
/var/tmp/PDO/pdo_dbh.c: In function ‘zim_PDO_getAttribute’:
/var/tmp/PDO/pdo_dbh.c:818:28: error: ‘zval’ has no member named ‘refcount’
dbh->def_stmt_ctor_args->refcount++;
^
/var/tmp/PDO/pdo_dbh.c: In function ‘pdo_hash_methods’:
/var/tmp/PDO/pdo_dbh.c:1126:20: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
ifunc->arg_info = funcs->arg_info + 1;
^
/var/tmp/PDO/pdo_dbh.c:1128:26: error: ‘const struct _zend_arg_info’ has no member named ‘required_num_args’
if (funcs->arg_info[0].required_num_args == -1) {
^
/var/tmp/PDO/pdo_dbh.c:1131:50: error: ‘const struct _zend_arg_info’ has no member named ‘required_num_args’
ifunc->required_num_args = funcs->arg_info[0].required_num_args;
^
/var/tmp/PDO/pdo_dbh.c:1133:9: error: ‘zend_internal_function’ has no member named ‘pass_rest_by_reference’
ifunc->pass_rest_by_reference = funcs->arg_info[0].pass_by_reference;
^
/var/tmp/PDO/pdo_dbh.c:1134:9: error: ‘zend_internal_function’ has no member named ‘return_reference’
ifunc->return_reference = funcs->arg_info[0].return_reference;
^
/var/tmp/PDO/pdo_dbh.c:1134:48: error: ‘const struct _zend_arg_info’ has no member named ‘return_reference’
ifunc->return_reference = funcs->arg_info[0].return_reference;
^
/var/tmp/PDO/pdo_dbh.c:1139:9: error: ‘zend_internal_function’ has no member named ‘pass_rest_by_reference’
ifunc->pass_rest_by_reference = 0;
^
/var/tmp/PDO/pdo_dbh.c:1140:9: error: ‘zend_internal_function’ has no member named ‘return_reference’
ifunc->return_reference = 0;
^
/var/tmp/PDO/pdo_dbh.c: In function ‘pdo_dbh_init’:
/var/tmp/PDO/pdo_dbh.c:1242:37: warning: assignment from incompatible pointer type [enabled by default]
pdo_dbh_object_handlers.get_method = dbh_method_get;
^
/var/tmp/PDO/pdo_dbh.c: In function ‘pdo_dbh_new’:
/var/tmp/PDO/pdo_dbh.c:1413:37: error: ‘zend_class_entry’ has no member named ‘default_properties’
zend_hash_copy(dbh->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
^
make: *** [pdo_dbh.lo] エラー 1 ERROR: `make’ failed ← make が失敗したようです。
# yum install php-pdo
読み込んだプラグイン:fastestmirror, langpacks
http://repos.fedorapeople.org/repos/sic/qt48/epel-7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 – Not Found
他のミラーを試します。
To address this issue please refer to the below knowledge base article
総ダウンロード容量: 98 k
インストール容量: 192 k
Is this ok [y/d/N]: y
Downloading packages:
php-pdo-5.4.16-42.el7.x86_64.rpm | 98 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
インストール中 : php-pdo-5.4.16-42.el7.x86_64 1/1
検証中 : php-pdo-5.4.16-42.el7.x86_64 1/1
コメント