5 users online. Create an account or sign in to join them.Users

Search

I’m getting this error in my server logs when trying to use the JIT extension:

Call to a member function Meta() on a non-object in /site.com/extensions/jit_image_manipulation/lib/image.php on line 231

Not sure if this is the problem, but I tracked it down to the class.image.php file in the extension, which returns something like this:

return $this->_meta;

so i’m not actually sure what the problem is, but this leads me to believe either the $_meta value is not being set in the class or the object that is trying to call the Image::Meta() method is not being instantiated correctly (in the code, the $image around line 217, i believe). However, I am using this extension via a symlink across multiple domains and if i go to the base install instance with this extension, JIT does work fine there. So maybe it’s some sort of url rewrite that I’m missing somewhere? I tried following michael-e’s Ninja Domains tutorial, but have not been able to figure out this JIT issue.

Digging deeper into how JIT works, I noticed this is how the $image_path gets set:

$image_path = ($param->external === true ? “http://{$param->file}” : WORKSPACE . “/{$param->file}”);

does the WORKSPACE constant get updated even if this is being symlinked from another directory? So if i have my base extensions folder here:

/root/domains/domain.com/extensions/

and then i have a symlinked directory here:

/root/domains/anotherdomain.com/extensions/

so then would the WORKSPACE value referenced in the image.php file get updated from wherever the extension is called? so for the anotherdomain.com site, would the WORKSPACE constant be updated from /root/domains/domain.com/workspace/ to /root/domains/anotherdomain.com/workspace/?

If i directly hit the image that JIT is referencing, it is shown on the server as well.

Symphony guys, you said you have one base install for multiple domains, does that also mean you have one base install for extensions as well? if so, how do you guys manage to use this extension across those different domains?

hmmm…yes, it seems like the symlinks are screwing this extension up. it took me a while to debug the values, but i finally tried to just do a setcookie() to get the values of DOCROOT and WORKSPACE and both are pointing to the base installation path, not the current (where the symlink is) working path. any suggestions on how to circumvent this issue?

I am not sure what is happening on your installation. Generally speaking there are URLs (pointing to certain “resources” on the web server, manipulated by .htaccess and PHP, for example) and physical paths on the server — please don’t mess these two up. The “Ninja Domains” technique tries to manipulate some of them. But I don’t see any problems with the JIT extension on my installations. (And you shouldn’t need to care about DOCROOT or WORKSPACE values at all.)

So:

  • Which version af Symphony and JIT are you using?
  • Does the problem occur each time JIT is used on the additional domain? Or is it maybe limited to a certain file?
  • Have you double-checked that you have created all the symlinks that were listed in my article?
  • Can you post your .htaccess files?

Any information will be helpful to find out what’s going wrong.

well, which is better - modifying the .htaccess or possibly modifying the JIT extension to take these cases into account? I modified my local copy of the extension to get this to work correctly since working from the .htaccess file is more difficult to debug to see if you’re going in the right direction.

to answer your questions, michael:

  • Which version af Symphony and JIT are you using? - 2.0.8RC3, default build of JIT
  • Does the problem occur each time JIT is used on the additional domain? Or is it maybe limited to a certain file? - All requests
  • Have you double-checked that you have created all the symlinks that were listed in my article? - Yes, all symlinks are indeed working
  • Can you post your .htaccess files? - I actually didn’t touch this file per listed above

Are the .htaccess RewriteCond (ie. REQUEST_URI, HTTP_HOST, etc) the same or very similar to PHP’s?

So what is your setup exactly? You do have two different folders on the server, one for each domain, right? Have you symlinked the workspace or are there two of them? (The latter case has never been tested by me.)

And did you copy your .htaccess file to the second domains’s root or symlink the .htaccess file as well?

[EDIT]: I would like to setup a test environment to reproduce the problem.

Yes, I have two different workspace folders. My set up is shared among sites that have no relationship to each other besides the fact they are running on symphony.

So I have it set up like this with the base symphony install:

/root/path/domains/mybasedomain.com/symbase/

Then an actual site:

/root/path/domains/awesomesite.com/v1/

And the only directories symlinked are the symphony and extensions folders. I installed symphony in both directories but removed the two folders mentioned from the awesomesite.com domain and then installed symphony accordingly which does work fine.

I start to understand your setup (which is quite cool). The problem seems to be the DOCROOT value. It is defined in index.php. Have you tried to copy index.php to your second domain and remove the symlink? (Just a thought… still I haven’t done a test setup.)

i think i posted this before, but i modified the jit extension itself to handled the resetting of the DOCROOT based on the actual server path (ie. /var/www/…, not http://…)

For me it was simply because I accidentally had workspace in my URL

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details