PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 4, 2022

[FIXED] jpgraph Warning (2): file_exists() [function.file-exists]: open_basedir restriction in effect

 February 04, 2022     cakephp, cakephp-2.0, jpgraph, open-basedir     No comments   

Issue

I'm having a trouble on making the jpgraph's image work on the web. When I run it in localhost the jpgraphs works but when I uploaded it there is an error message:

Warning (2): file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/share/fonts/truetype/arialbd.ttf) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) [APP/Vendor/jpgraph/jpgraph-3.5.0b1/src/jpgraph_ttf.inc.php, line 505]

and this

Warning (2): file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/share/fonts/truetype/arialbd.ttf) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) [APP/Vendor/jpgraph/jpgraph-3.5.0b1/src/jpgraph_ttf.inc.php, line 510]

If you guys have any questions for clarifications please don't hesitate to ask. Thank You in advance


Solution

This is actually an issue with your PHP configuration, not CakePHP.

From http://php.net/manual/en/ini.core.php

Limit the files that can be accessed by PHP to the specified directory-tree

Open your php.ini, look for the open_basedir line, and comment it out.

Restart webserver and you should be good to go.



Answered By - robmcvey
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing