2015-12-18 9 views
6

फ़ाइल पथ में मौजूद है, लेकिन php ini फ़ाइल लोड नहीं कर सका। मैं क्या कोशिश करता हूं - chmod, chown, बदलें कॉन्फ़िगरेशन पथ बदलें। कोई परिणाम नहीं।PHP 7.0.1 ini फ़ाइल लोड नहीं कर सका

# /opt/php7/bin/php -i 
phpinfo() 
PHP Version => 7.0.1 

System => Linux portal-app 3.8.13-68.1.3.el7uek.x86_64 #2 SMP Wed Apr 22 11:51:54 PDT 2015 x86_64 
Build Date => Dec 18 2015 10:01:55 
Configure Command => './configure' '--prefix=/opt/php7' '--exec- prefix=/opt/php7' '--enable-fpm' '--with-fpm-user=user' '--with-fpm-group=nginx' '--disable-cgi' '--disable-short-tags' '--with-openssl' '--with-zlib' '--with-curl' '--with-snmp' '--with-xmlrpc' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--enable-exif' '--enable-intl' '--enable-ftp' '--enable-zip' '--with-mcrypt' '--with-imap=/opt/distrib/php7/ext/imap-2007f' '--with-imap-ssl' '--with-ldap' '--with-ldap-sasl' '--enable-mbstring' '--enable-soap' '--enable-pcntl' '--enable-sockets' '--enable-bcmath' '--enable-mysqlnd' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pgsql' '--with-libdir=lib64' '--with-fpm-systemd' 
Server API => Command Line Interface 
Virtual Directory Support => disabled 
Configuration File (php.ini) Path => /opt/php7/lib 
Loaded Configuration File => (none) 
Scan this dir for additional .ini files => (none) 
Additional .ini files parsed => (none) 
PHP API => 20151012 
PHP Extension => 20151012 
Zend Extension => 320151012 

# ls -la /opt/php7/lib 
drwxr-xr-x 15 root root 4096 дек 8 09:24 php 
-rwxr-xr-x 1 php nginx 760 дек 18 10:12 php.ini 
+0

'ls -Z' आप SELinux लॉग जाँच कर ली है के उत्पादन में क्या है? – bansi

+0

SELinux अक्षम है – Vovan4elli

+0

hmmm तब कोई विचार नहीं है। लेकिन एक बात मैंने देखी है कि आपको php.ini के लिए निष्पादन अनुमति की आवश्यकता नहीं है। 0755 के लिए – bansi

उत्तर

5

स्ट्रेस ने मुझे समस्या को खोजने में मदद की।

# echo "<?php phpinfo() ?>" | strace /opt/php7/bin/php 2>&1 | grep php.ini 
open("/etc/php7/php.ini/php-cli.ini", O_RDONLY) = -1 ENOTDIR (Not a directory) 
open("/opt/php7/bin/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory) 
open("/etc/php7/php.ini/php.ini", O_RDONLY) = -1 ENOTDIR (Not a directory) 

मुझे समझ में नहीं आता क्यों, लेकिन PHP गलत फ़ोल्डर में दिख रहा है। ऐसा लगता है कि परिवर्तन with-config-file-pathmake clean के बिना समस्या का कारण बनता है।

मैंने --with-config-file-path=/opt/php7/lib से ./configure जोड़ा और make clean && make && make install निष्पादित किया।

यह समस्या हल हो।

+0

मुझे वही मिला: '/ etc/php7' काम नहीं करेगा, लेकिन'/etc/php7/cli' किया था। सुनिश्चित नहीं है कि यह 'साफ करें' या निर्देशिका का अतिरिक्त स्तर है। धन्यवाद, किसी भी मामले में! – halfer

संबंधित मुद्दे