我安装了PHP 5.4.28并且PHP没有读取配置文件,因为我在配置文件中设置了ioncube,当我放入shell“php -v”时,ioncube没有响应。但没有直接,只有当我在参数“php -v -c /etc/php54.ini”中设置文件时,我才能在“php -v”中看到ioncube。在“php -r'phpinfo();' | grep .ini“已正确设置”配置文件(php.ini)Path => /etc/php54.ini“。我不知道出了什么问题。
要点:
php -v
PHP 5.4.24 (cli) (built: Jan 28 2014 10:21:58)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
php -c /etc/php54.ini -v
PHP 5.4.24 (cli) (built: Jan 28 2014 10:21:58)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.5.2, Copyright (c) 2002-2014, by ionCube Ltd.
php -r“phpinfo();” | grep .ini
**Configuration File (php.ini) Path => /etc/php54.ini**
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
答案 0 :(得分:0)
/etc/php54.ini
似乎是一个路径,而不是一个文件,当你不提供它。就我而言,例如我得到了这个:
bf@desktop-bf:~$ php -r "phpinfo();" | grep .ini
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini