Feed create error on shared host

Done! thanks, that was a typo.

Glad you got it working, although I’m not sure the best place for the data files is in the emoncms folder, that was just a test really.

Here’s a little test you can do.

Write a new file to the emoncms folder called “emoncms_path.php” and in that new blank file add the following

echo dirname(__FILE__); ?>

save and then try navigating to


This is what I got from a emonsd image

You should be able to then replace the dirname(__FILE__).' part of what you have working now with 'path/to/emoncms (note the one single quote in both).

If that also still works, you can use what you have learnt about the actual path to locate your data elsewhere using /path/to/some/other/folder/data/php??? should you chose as you will know the path’s “root” starting point.

When you are done just delete that new file.

1 Like

Now that was clever! I have done this and now moved the folder to the suggested location (by the manual on emoncms.org) and everything is working! thanks alot for all the help!

1 Like

As a matter of interest, what was the paths starting point? what were we missing?

/var/www/virtual/bmj.is/fjarvoktun/emoncmsdata/php… is the whole path

Oh! wow, yes that is a full path originating from the root of the whole filesystem, several levels up from your share of the shared host. I’m not sure we would of ever guessed that, it would need to be found the way we did it or documented by your hosting provider.

1 Like

exactly! that is why your solution how to find the absolute path is brilliant!!

If your up for trying another way, can you try this too.

            'datadir' => '../../emoncmsdata/phpfina/'

it’s a relative path and each ../ is “back one level”, so from the emoncms folder it should go back through htdocs to fjarvoktun and then forward into your data folders without knowing where the absolute paths start.

It’s not important, just curiosity really, but I’m wondering if relative paths might the easy answer, i don’t know enough about PHP to know if there are any operational/security issues there. But I was thinking if your hosting supplier decided to have a reshuffle and puts you on /var/www/virtual_2/bmj.is (for example) it would break your setup with an absolute path, where as it would not effect a relative path.

I had a similar issue with a cloud VM a couple of years ago when my sites went down, the hosting provider had moved all VM’s to another physical server, the issue I had wasn’t path related, but they do move things around behind the scenes.


you are right, I was also thinking about this, if my hosting supplier would mess with something… this is a better solution, and YES it works, I just tried it :slight_smile:

1 Like