Search

I have been experimenting with Rowan Lewis' Content field extension:

Content field extension

This would be perfect for setting up user controlled HTML5 section elements!

Works fine on default Apache (OSX) but I can't get it working on a MAMP dev machine. Enable/install returns a white screen and the error log says:

Warning: GenericErrorHandler 2 - require_once(__DIR__/libs/message-stack.php)
failed to open stream: No such file or directory in file
/Users/me/Sites/test/extensions/content_field/extension.driver.php on line 7

I have worked through all the obvious things to a front-end guy - can anyone help?

Is the extension directory called exactly content_field?

Yes the directory is exactly 'content_field' and I am using Symphony 2.3. As far as I can tell the problem seems to be an issue with the file paths when installed on a MAMP setup. No problems so far with a vanilla Apache install on OSX.

My guess is that your MAMP dev environment is running PHP5.2. The __DIR__ constant was added in PHP 5.3. Updating MAMP to a recent version should solve the issue

I bet that is it! I dont have that dev machine with me right now but will check it later. Thanks for answering -- MAMP can be both a blessing and a curse...

Answer confirmed.

I just switched the require directories to relative ref, seemed to work fine.

require_once 'libs/message-stack.php';
require_once 'libs/content-type.php';
require_once 'libs/text-content-type.php';

Any reason this might be an issue? I guess using an absolute path is better practice, but I can't see an actual problem with adapting it this way.

Sadly I don't have the capacity to update my stack, stupid shared hosting. Moving to VPS as soon as I can convince my client it's worth the outlay.

Orrrr.. not, 5.2 doesn't support anonymous functions. Ok scrap that idea.

The idea was good while it lasted :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details