file_exists() [function.file-exists]

Status
Not open for further replies.

os242

New Member
Messages
46
Reaction score
0
Points
0
Hi there:

I am trying to add a graph with data of my site using JpGraph but when I try to load the Graph I get the following error: "file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf) is could not be found in the allow directories..." But I don't know where to find such directories.

Could you give me any hints?

Thanks
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
It is trying to open files which are outside of your home directory. (We don't allow this) You'll have to upload any files it is looking for and edit the script to look for them in your home directory, not on the server.

-Corey
 

os242

New Member
Messages
46
Reaction score
0
Points
0
Thaks Corey, I did understand about the constrain of opening files in not allowed directories, however I do not undertand which directories the system is asking me to put the files in the complete message says:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf) is not within the allowed path(s): (/home/os242:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/os242/public_html/jpgraph-2.2/src/jpgraph_ttf.inc.php on line 330
JpGraph Error Font file "/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf" is not readable or does not exist.

I have put a folder with all fonts at home/os242 & /public_html and neither of them worked, could you clarify me where should I put them? What is the : in the path described by the error message (/home/os242:/usr/lib/php:/usr/local/lib/php:/tmp), are they 4 different options, is there one configuration option?

Thanks for your help
 

YamiKaitou

Member
Messages
636
Reaction score
0
Points
16
You have to alter the source code of the file. You have to change the location that it is trying to load the font from to the new location
 

os242

New Member
Messages
46
Reaction score
0
Points
0
Yes, it is working now, I re-defined the fonts library path in the following file: jpg-config.inc which is under /jpgraph directory and under /public_html directory. Thanks
 
Status
Not open for further replies.
Top