jpgraph警告(2):file_exists()[function.file-exists]:open_basedir限制生效

时间:2015-01-30 17:17:35

标签: cakephp cakephp-2.0 jpgraph open-basedir

我在使jpgraph的图像在网络上运行时遇到了麻烦。当我在localhost中运行时,jpgraphs可以工作,但是当我上传它时会出现一条错误消息:

  

警告(2):file_exists()[function.file-exists]:open_basedir   限制有效。文件(/usr/share/fonts/truetype/arialbd.ttf)不在允许的路径中:(/ home /:/ usr / lib / php:/ tmp)[APP / Vendor / jpgraph / jpgraph-3.5 .0b1 / src / jpgraph_ttf.inc.php,第505行

和这个

  

警告(2):file_exists()[function.file-exists]:open_basedir   限制有效。文件(/usr/share/fonts/truetype/arialbd.ttf)是   不在允许的路径内:(/ home /:/ usr / lib / php:/ tmp)   [APP / Vendor / jpgraph / jpgraph-3.5.0b1 / src / jpgraph_ttf.inc.php,第510行]

如果您有任何疑问需要澄清,请不要犹豫。提前谢谢

1 个答案:

答案 0 :(得分:0)

这实际上是PHP配置的问题,而不是CakePHP。

来自http://php.net/manual/en/ini.core.php

  

将PHP可以访问的文件限制为指定的目录树

打开php.ini,查找open_basedir行,并将其注释掉。

重启网络服务器,你应该好好去。