故障排除: Difference between revisions

Jump to navigation Jump to search
 
Line 73: Line 73:
*第二个限制位于PHP服务器配置。在这种情况下,您需要更改 php.ini 文件中的参数 '''upload_max_filesize''' 。这需要管理员去访问PHP服务器。
*第二个限制位于PHP服务器配置。在这种情况下,您需要更改 php.ini 文件中的参数 '''upload_max_filesize''' 。这需要管理员去访问PHP服务器。


==信息==
==配置错误==
Depending of your configuration, if you encounter the error
根据您的配置,如果您遇到错误:
 
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
Warning: tempnam(): open_basedir restriction in effect. File(C:\WINDOWS\TEMP) is not within the allowed path(s): (c:/dolibarr) in C:\dolibarr\www\dolibarr\htdocs\core\modules\import\import_xlsx.modules.php on line 182
Warning: tempnam(): open_basedir restriction in effect. File(C:\WINDOWS\TEMP) is not within the allowed path(s): (c:/dolibarr) in C:\dolibarr\www\dolibarr\htdocs\core\modules\import\import_xlsx.modules.php on line 182
</syntaxhighlight>
</syntaxhighlight>


You will have to edit the php.ini
您必须编辑文件php.ini。
Find the directive upload_tmp_dir: uncomment the line and change its value to a required path. In this example it is "/var/tmp":
 
查找指令 upload_tmp_dir :取消注释该行并将其值更改为所需的路径。在本例中,它是“/var/tmp”:


<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
Line 88: Line 90:
upload_tmp_dir = /var/tmp
upload_tmp_dir = /var/tmp
</syntaxhighlight>
</syntaxhighlight>
Additionally for PHP versions 5.5 and greater, find the directive sys_temp_dir: uncomment the line and change its value to a required path. In this example, it is "/var/tmp":
 
此外,对于PHP 5.5及更高版本,可以找到指令 sys_temp_dir :取消对该行的注释,并将其值更改为所需的路径。在本例中,它是“/var/tmp”:
 
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
; Directory where the temporary files should be placed.
; Directory where the temporary files should be placed.
Line 95: Line 99:
</syntaxhighlight>
</syntaxhighlight>


And in Vhosts
在Vhosts中:
 
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}:/var/tmp
open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}:/var/tmp
715

edits

Navigation menu