###問題
下記のソースでエラーがでる
<?php echo idn_to_utf8('xn--tst-qla.de'); ?>
エラー内容
Uncaught Error: Call to undefined function idn_to_utf8()
###やってみたこと
いろいろとphpの拡張モジュールをインストールしました。
yum install php-intl yum --enablerepo=remi install php-intl yum --enablerepo=remi,remi-php56 install php-intl
phpのバージョンは5.6.31で、nginxで動いています。
###nginx設定ファイル
user httpd www; worker_processes auto; worker_rlimit_nofile 20000; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 4096; multi_accept on; use epoll; } http { server_tokens off; include /etc/nginx/mime.types; default_type application/octet-stream; charset UTF-8; server_names_hash_bucket_size 128; log_format main '$request_time $sent_http_x_f_cache $sent_http_x_b_cache ' '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; client_max_body_size 20M; client_body_buffer_size 768k; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 5; connection_pool_size 1024; request_pool_size 8k; gzip on; gzip_http_version 1.0; gzip_disable "msie6"; gzip_proxied any; gzip_min_length 1024; gzip_comp_level 2; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json; brotli on; brotli_static on; brotli_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json; brotli_comp_level 3; brotli_min_length 1024; open_file_cache max=100000 inactive=20s; open_file_cache_valid 30s; open_file_cache_min_uses 2; open_file_cache_errors on; fastcgi_cache_path /var/cache/nginx/wordpress levels=1:2 keys_zone=wpcache:30m max_size=512M inactive=600m; fastcgi_ignore_headers "Vary" "Cache-Control" "Expires"; include /etc/nginx/conf.d/*.conf; }
###*.confのファイル
#======================================= # xn--testtesttest.com SSL #--------------------------------------- server { listen 443 ssl http2; server_name xn--testtesttest.com www.xn--testtesttest.com; ssl_certificate /etc/letsencrypt/live/xn--testtesttest.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/xn--testtesttest.com/privkey.pem; ssl_dhparam /etc/kusanagi.d/ssl/dhparam.key; ssl_session_tickets on; ssl_session_ticket_key /etc/kusanagi.d/ssl_sess_ticket.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; #ssl_ct on; #ssl_ct_static_scts /etc/pki/tls/certs/scts; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ## OCSP stapling #ssl_stapling on; #ssl_stapling_verify on; #resolver 8.8.4.4 8.8.8.8 valid=300s; #resolver_timeout 10s; access_log /home/kusanagi/testtesttest/log/nginx/ssl_access.log main; error_log /home/kusanagi/testtesttest/log/nginx/ssl_error.log warn; charset UTF-8; client_max_body_size 16M; root /home/kusanagi/testtesttest/DocumentRoot; index index.php index.html index.htm; rewrite /wp-admin$ $scheme://$host$uri/ permanent; location / { try_files $uri $uri/ /index.php?$args; } location = /favicon.ico { log_not_found off; access_log off; } location ~* /.well-known { allow all; } location ~* /. { deny all; } location ~* /(?:uploads|files)/.*.php$ { deny all; } #include templates.d/multisite.conf; location ~* .(jpg|jpeg|gif|png|css|js|swf|ico|pdf|svg|eot|ttf|woff)$ { access_log off; } location ~* /wp-login.php|/wp-admin/((?!admin-ajax.php).)*$ { satisfy any; allow 153.168.29.119; allow 127.0.0.1; deny all; auth_basic "basic authentication"; auth_basic_user_file "/home/kusanagi/.htpasswd"; location ~ [^/].php(/|$) { fastcgi_split_path_info ^(.+?.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_buffers 256 128k; fastcgi_buffer_size 128k; fastcgi_intercept_errors on; fastcgi_read_timeout 120s; } } location ~ [^/].php(/|$) { fastcgi_split_path_info ^(.+?.php)(/.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_buffers 256 128k; fastcgi_buffer_size 128k; fastcgi_intercept_errors on; fastcgi_read_timeout 120s; #add_header Strict-Transport-Security "max-age=31536000"; set $do_not_cache 0; ## page cache set $device "pc"; if ($request_method = POST) { set $do_not_cache 1; } if ($query_string != "") { set $do_not_cache 1; } if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { set $do_not_cache 1; } if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $do_not_cache 1; } if ($http_user_agent ~* " Android |(iPad|Android; Tablet; .+Firefox") { set $device "tablet"; } if ($http_user_agent ~* " Android .+ Mobile |(iPhone|(iPod|IEMobile|Android; Mobile; .+Firefox|Windows Phone") { set $device "smart"; } fastcgi_cache wpcache; fastcgi_cache_key "$device:$request_method:$scheme://$host$request_uri"; fastcgi_cache_valid 200 10m; fastcgi_no_cache $do_not_cache; fastcgi_cache_bypass $do_not_cache; add_header X-F-Cache $upstream_cache_status; add_header X-Signature KUSANAGI; } location ~ /fcache-purge/([^/]+)(/.*) { allow 127.0.0.1; deny all; fastcgi_cache_purge wpcache "$1:GET:$scheme://$host$2"; } }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/12 08:32 編集
2017/07/12 13:58
2017/07/13 04:17
2017/07/13 06:15
2017/09/05 07:57
2017/10/16 08:51 編集
2017/09/05 08:06
2017/09/05 08:08
2017/09/05 08:10 編集
2017/09/05 08:11
2017/09/05 08:12
2017/09/05 08:21
2017/09/05 08:26
2017/09/05 08:35
2017/09/05 12:40
2017/09/06 01:31
2017/09/06 01:33
2017/09/06 01:37
2017/09/06 01:54 編集
2017/09/06 02:01
2017/09/06 02:41
2017/09/06 02:43
2017/10/18 06:37
2017/10/18 12:59