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]

Link to comment
Share on other sites

  • 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.
Link to comment
Share on other sites

  • 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. )

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.