Jump to content

PHP Function/Server acting differently. HELP!


Recommended Posts

So, I've got a website using a Smarty Imagetext plugin, which makes use of some PHP functions. (attached the plugin file/code)

 

They worked before, but now I've got a new Server.  Main differences:

 

CentOs -> Ubuntu 9.10

Old PHP5 (don't know which, server crashed) -> PHP 5.2.10

 

Here's the error it gives :

Warning:  imagettfbbox(): Could not read font in /mnt/websites/optimalenergy/website/library/classes/3rdparty/smarty/smarty_custom_plugins/shared.imagetext.php  on line 169

 

Even though, the font file parameter of that function is a path directly to the otf file.  e.g. /mnt/websites/optimalenergy/website/ images/global/textcache/fonts/FONTFILE.otf

 

[attachment deleted by admin]

  • 4 weeks later...

Have you checked the existence of the file and the ability of Apache (in terms of permissions) to read it?

Yes, I put on a test page, that thing, with a static path to the font file.  It's there, it's "owned" by www-data (webserver) and the file is on a mounted samba share, which is mounted with 0777 permissions.
  • 1 month later...

So, I finally had time to look at this again, and I think I found what the problem is...

 

The font file in question, well, this whole website is running on an Ubuntu 9.10 desktop edition Apache 2.2 web server, with php 5.2.10 ... but the actual files for the website, resides on a mounted windows server 2003 share...

 

If the files are local, on the machine, it works perfectly.

 

here's the command I'm using to mount the filesystem :

mount -t cifs -o username=xxx,password=xxx,netbiosname=xxx,uid=www-data,gid=www-data,ip=192.168.0.2,rw,lfs,dir_mode=0777,file_mode=0777 //192.168.0.2/websites /mnt/websites

 

PS.  777 isn't an issue, seeing that it's a local development server.

 

Any ideas why it can't read the font file on that ?  ( It used to work on an old CentOs server I had, but the hard drive failed and I set up a new Ubuntu one. )

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.