715
edits
(→信息) |
|||
| Line 73: | Line 73: | ||
*第二个限制位于PHP服务器配置。在这种情况下,您需要更改 php.ini 文件中的参数 '''upload_max_filesize''' 。这需要管理员去访问PHP服务器。 | *第二个限制位于PHP服务器配置。在这种情况下,您需要更改 php.ini 文件中的参数 '''upload_max_filesize''' 。这需要管理员去访问PHP服务器。 | ||
== | ==配置错误== | ||
根据您的配置,如果您遇到错误: | |||
<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> | ||
您必须编辑文件php.ini。 | |||
查找指令 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> | ||
此外,对于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> | ||
在Vhosts中: | |||
<syntaxhighlight lang="c"> | <syntaxhighlight lang="c"> | ||
open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}:/var/tmp | open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}:/var/tmp | ||
edits