首页 新闻 会员 周边 捐助

phpinfo()中的Loaded Configuration File (none) 怎么解决?

0
悬赏园豆:30 [已解决问题] 解决于 2017-11-05 20:25

问题是:Fatal error: Call to undefined function mysqli_connect() in D:\study\worksapce\second\index.php on line 89

在5.3.29php.ini配置文件

; http://php.net/doc-root
doc_root =

; The directory under which PHP opens the script using /~username used only
; if nonempty.
; http://php.net/user-dir
user_dir =

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
;extension_dir = "./"
; On windows:
extension_dir = "D:\study\AMP\php-5.6.32-Win32-VC11-x64\ext"

extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll

Apache2.4 httpd.conf配置

#configure php5.6
PHPIniDir D:\study\AMP\php-5.6.30-Win32-VC11-x64\php.ini
LoadModule php5_module D:\study\AMP\php-5.6.32-Win32-VC11-x64\php5apache2_4.dll
AddType application/x-httpd-php .php .phtml
#LoadModule php5_module modules/libphp5.so

<IfModule alias_module>
   Alias /Workspace/ "D:/study/worksapce/"
   <Directory "D:/study/worksapce/">
       Options Indexes FollowSymLinks
       AllowOverride None
       Require all granted
   </Directory>
</IfModule>

无论无何怎么改配置文件都不能加载php.ini的文件加载位置Loaded Configuration File

请各位大神指教!万分感激,昨天搞到2点!

Drunk_fish的主页 Drunk_fish | 初学一级 | 园豆:178
提问于:2017-11-04 12:42
< >
分享
最佳答案
0

windows7系统有问题,导致php.ini无法在phpinfo()函数加载;要注意现查询php -ini|findstr ini或者php --ini查询

Loaded Configuration File php.ini的目录  ;重新安装一遍PHP 并配置php.ini还有Apache服务器的httpd.conf;

问题一般就解决;参考下http://www.cnblogs.com/tigertall/archive/2010/01/28/1658869.html

Drunk_fish | 初学一级 |园豆:178 | 2017-11-05 20:21
其他回答(1)
0

php.ini 放在哪个文件夹中的?

收获园豆:30
dudu | 园豆:29568 (高人七级) | 2017-11-04 13:18

我自己安装的php安装目录,但是那个没有生效

Configuration File (php.ini) Path C:\Windows
Loaded Configuration File (none)
extension_dir C:\php\ext C:\php\ext

扩展的目录也没有生效,还是默认

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 13:22

D:\study\AMP\php-5.6.32-Win32-VC11-x64\

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 13:37

@Drunk_fish: 把 php.int 复制到 C:\Windows 文件夹试试

支持(0) 反对(0) dudu | 园豆:29568 (高人七级) | 2017-11-04 14:04

@dudu: 请问一下那个php.ini文件不能自己指定位置吗?

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 14:06

@dudu: 复制那个C:\Windows还是没用,大佬,还有解决的方法!

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 14:17

@Drunk_fish: 建议参考 Windows下PHP安装配置 重新安装配置试试

支持(0) 反对(0) dudu | 园豆:29568 (高人七级) | 2017-11-04 14:51

@dudu: 无法加载自己安装的目录的php.ini,哎~~~~

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 15:06

@Drunk_fish: 运行 php --ini 命令的结果是什么?

支持(0) 反对(0) dudu | 园豆:29568 (高人七级) | 2017-11-04 15:18

@dudu: 
pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.38 2015-11-23

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled
PDO drivers =>

Phar

Phar: PHP Archive support => enabled
Phar EXT version => 2.0.2
Phar API version => 1.1.1
SVN revision => $Id: 780be432570e80dd34c1a9c217ef87ade22bf136 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
OpenSSL support => disabled (install ext/openssl)


Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

Reflection

Reflection => enabled
Version => $Id: 5f15287237d5f78d75b19c26915aa7bd83dee8b8 $

session

Session Support => enabled
Registered save handlers => files user
Registered serializer handlers => php_serialize php php_binary wddx

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOA
D_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_strict_mode => Off => Off
session.use_trans_sid => 0 => 0

SimpleXML

Simplexml support => enabled
Revision => $Id: d7077fc935154236afb4fe70814ba358efdbdca4 $
Schema support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, Spl
Observer, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException,
 BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryItera
tor, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIte
rator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthExcep
tion, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBo
undsException, OutOfRangeException, OverflowException, ParentIterator, RangeExce
ption, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilter
Iterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIterator
Iterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeE
xception, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHea
p, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStac
k, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Internal Sendmail Support for Windows => enabled

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=hr
ef,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

tokenizer

Tokenizer Support => enabled

wddx

WDDX Support => enabled
WDDX Session Serializer => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.4

xmlreader

XMLReader => enabled

xmlwriter

XMLWriter => enabled

zip

Zip => enabled
Zip version => 1.12.5
Libzip version => 0.11.2

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.7.3
Linked Version => 1.2.7.3

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name

Environment

Variable => Value
ALLUSERSPROFILE => C:\ProgramData
APPDATA => C:\Users\Administrator\AppData\Roaming
CLASSPATH => 。;C:\Program Files\Java\jdk1.8.0_77\lib\dt.jar;C:\Program Files\Ja
va\jdk1.8.0_77\lib\tools.jar;
CommonProgramFiles => C:\Program Files\Common Files
CommonProgramFiles(x86) => C:\Program Files (x86)\Common Files
CommonProgramW6432 => C:\Program Files\Common Files
COMPUTERNAME => LISIRCOMPUTER
ComSpec => C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK => NO
HOMEDRIVE => C:
HOMEPATH => \Users\Administrator
JAVA_HOME => C:\Program Files\Java\jdk1.8.0_77
LOCALAPPDATA => C:\Users\Administrator\AppData\Local
LOGONSERVER => \\LISIRCOMPUTER
M2_HOME => D:\maven\apache-maven-3.1.1
MYSQL_HOME => D:\mysql-5.7.19-winx64
NLS_LANG => american_america.AL32UTF8
NUMBER_OF_PROCESSORS => 4
OS => Windows_NT
Path => C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Windows\system32;C:
\Windows;C:\Windows\System32\Wbem;C:\Program Files\Java\jdk1.8.0_77\bin;D:\PLSQL
\instantclient_11_2;D:\maven\apache-maven-3.1.1\bin;D:\mysql-5.7.19-winx64\bin;D
:\study\AMP\httpd-2.4.29-Win64-VC15\Apache24\bin;D:\study\AMP\php-5.6.32-Win32-V
C11-x64;D:\study\AMP\php-5.6.32-Win32-VC11-x64\ext
PATHEXT => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE => AMD64
PROCESSOR_IDENTIFIER => AMD64 Family 22 Model 48 Stepping 1, AuthenticAMD
PROCESSOR_LEVEL => 22
PROCESSOR_REVISION => 3001
ProgramData => C:\ProgramData
ProgramFiles => C:\Program Files
ProgramFiles(x86) => C:\Program Files (x86)
ProgramW6432 => C:\Program Files
PROMPT => $P$G
PUBLIC => C:\Users\Public
SESSIONNAME => Console
SystemDrive => C:
SystemRoot => C:\Windows
TEMP => C:\Users\ADMINI~1\AppData\Local\Temp
TMP => C:\Users\ADMINI~1\AppData\Local\Temp
TNS_ADMIN => D:\PLSQL\instantclient_11_2\NETWORK\ADMIN
USERDOMAIN => LISIRCOMPUTER
USERNAME => Administrator
USERPROFILE => C:\Users\Administrator
windir => C:\Windows
windows_tracing_flags => 3
windows_tracing_logfile => C:\BVTBin\Tests\installpackage\csilogfile.log

PHP Variables

Variable => Value
_SERVER["ALLUSERSPROFILE"] => C:\ProgramData
_SERVER["APPDATA"] => C:\Users\Administrator\AppData\Roaming
_SERVER["CLASSPATH"] => 。;C:\Program Files\Java\jdk1.8.0_77\lib\dt.jar;C:\Progr
am Files\Java\jdk1.8.0_77\lib\tools.jar;
_SERVER["CommonProgramFiles"] => C:\Program Files\Common Files
_SERVER["CommonProgramFiles(x86)"] => C:\Program Files (x86)\Common Files
_SERVER["CommonProgramW6432"] => C:\Program Files\Common Files
_SERVER["COMPUTERNAME"] => LISIRCOMPUTER
_SERVER["ComSpec"] => C:\Windows\system32\cmd.exe
_SERVER["FP_NO_HOST_CHECK"] => NO
_SERVER["HOMEDRIVE"] => C:
_SERVER["HOMEPATH"] => \Users\Administrator
_SERVER["JAVA_HOME"] => C:\Program Files\Java\jdk1.8.0_77
_SERVER["LOCALAPPDATA"] => C:\Users\Administrator\AppData\Local
_SERVER["LOGONSERVER"] => \\LISIRCOMPUTER
_SERVER["M2_HOME"] => D:\maven\apache-maven-3.1.1
_SERVER["MYSQL_HOME"] => D:\mysql-5.7.19-winx64
_SERVER["NLS_LANG"] => american_america.AL32UTF8
_SERVER["NUMBER_OF_PROCESSORS"] => 4
_SERVER["OS"] => Windows_NT
_SERVER["Path"] => C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Windows\
system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Java\jdk1.8.0_77\b
in;D:\PLSQL\instantclient_11_2;D:\maven\apache-maven-3.1.1\bin;D:\mysql-5.7.19-w
inx64\bin;D:\study\AMP\httpd-2.4.29-Win64-VC15\Apache24\bin;D:\study\AMP\php-5.6
.32-Win32-VC11-x64;D:\study\AMP\php-5.6.32-Win32-VC11-x64\ext
_SERVER["PATHEXT"] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_SERVER["PROCESSOR_ARCHITECTURE"] => AMD64
_SERVER["PROCESSOR_IDENTIFIER"] => AMD64 Family 22 Model 48 Stepping 1, Authenti
cAMD
_SERVER["PROCESSOR_LEVEL"] => 22
_SERVER["PROCESSOR_REVISION"] => 3001
_SERVER["ProgramData"] => C:\ProgramData
_SERVER["ProgramFiles"] => C:\Program Files
_SERVER["ProgramFiles(x86)"] => C:\Program Files (x86)
_SERVER["ProgramW6432"] => C:\Program Files
_SERVER["PROMPT"] => $P$G
_SERVER["PUBLIC"] => C:\Users\Public
_SERVER["SESSIONNAME"] => Console
_SERVER["SystemDrive"] => C:
_SERVER["SystemRoot"] => C:\Windows
_SERVER["TEMP"] => C:\Users\ADMINI~1\AppData\Local\Temp
_SERVER["TMP"] => C:\Users\ADMINI~1\AppData\Local\Temp
_SERVER["TNS_ADMIN"] => D:\PLSQL\instantclient_11_2\NETWORK\ADMIN
_SERVER["USERDOMAIN"] => LISIRCOMPUTER
_SERVER["USERNAME"] => Administrator
_SERVER["USERPROFILE"] => C:\Users\Administrator
_SERVER["windir"] => C:\Windows
_SERVER["windows_tracing_flags"] => 3
_SERVER["windows_tracing_logfile"] => C:\BVTBin\Tests\installpackage\csilogfile.
log
_SERVER["PHP_SELF"] =>
_SERVER["SCRIPT_NAME"] =>
_SERVER["SCRIPT_FILENAME"] =>
_SERVER["PATH_TRANSLATED"] =>
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["REQUEST_TIME_FLOAT"] => 1509780044.2195
_SERVER["REQUEST_TIME"] => 1509780044
_SERVER["argv"] => Array
(
)

_SERVER["argc"] => 0

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.

C:\Users\Administrator>

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 15:24

@dudu: 

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 15:27

@dudu: 

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 15:28

@dudu: 怪事啊  大哥  php -ini|findstr ini

Loaded Configuration File D:\study\AMP\php-5.6.32-Win32-VC11-x64、php.ini

但是phpinfo()函数打出来竟然是none  ,这个有问题啊!

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 16:24

@Drunk_fish: 把 PHPIniDir D:\study\AMP\php-5.6.30-Win32-VC11-x64\php.ini 改为 PHPIniDir D:/study/AMP/php-5.6.30-Win32-VC11-x64/php.ini 试试,即 \ 改为 /

支持(0) 反对(0) dudu | 园豆:29568 (高人七级) | 2017-11-04 16:47

@dudu: 那句话我注释掉了,php -ini|findstr ini

Loaded Configuration File D:\study\AMP\php-5.6.32-Win32-VC11-x64\php.ini

phpinfo()还是一样的没有关系,改了也没有多大关系!

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-04 16:58

@dudu: 谢谢大哥,windows7系统有问题,导致无法重新加载php.ini;重新在安装一遍就好了!

支持(0) 反对(0) Drunk_fish | 园豆:178 (初学一级) | 2017-11-05 20:23
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册