Feed create error on shared host

Hi guys.
Excuse me for my English.
I have installed emoncms on my shared host.
Everything is OK and i can send my data to it But when I wish to create feed get this error:
ERROR: Feed could not be created,could not write meta data file fopen(/proud116/emoncmsdata/phpfina/10.meta) failed to open stream: No such file or directory

In the setting file I’ve added this three lines:

            'datadir' => '/proud116/emoncmsdata/phpfiwa/'
            'datadir' => '/proud116/emoncmsdata/phpfina/'
            'datadir' => '/proud116/emoncmsdata/phptimeseries/'

phpfiwa,phpfina and phptimeseries have 755 write access.
Please HELP

most probably the path isn’t complete
I think you need to set



Thank you bro.
It works :grinning:

1 Like

3 years later… I am having the same problem, but adding home or root in front of the path does not help, I set the access for the three folders to 777 any suggestion?

Navigate to the folder where the data is to be stored and do a


This will tell you the true path.

1 Like

sorry I am totally newbie to this world… how should I do pwd? there is no command line… the screenshot is taken when in one of the folders

How have you installed this?

How do you edit the settings file? Via FTP? Is this shared/virtual hosting?


From this image you can see the path should start as /root/fja etc.

yes shared hosting, /root/fjarvoktun/emoncmsdata/php… works :slight_smile: I must have forgotten a backslash or something before because now it gets me a step closer and does not give me the “no such file or directory” error now… but now it gives me another kind of error,
If I choose PHPFIWA or PHPFINA Fixed Interval then I get “ERROR: Feed could not be created, undefined”
but if I choose PHPTIMESERIES I get “ERROR: Feed could not be created, could not write data file fopen(/root/fjarvoktun/emoncmsdata/phptimeseries/feed_104.MYD): failed to open stream: Operation not permitted”

That is a file permission error. Not sure how to fix that on a shared hosting environment.

1 Like

Feeds can be located anywhere emoncms has permission to write to. You need to move your feed folders to a better location depending on your folder/site setup, and then just edit the paths in settings.php to suit.


OK, the folders all have Chmod value 777 (full permision) what is it that could restrict emoncms permission to write to these folders? (sorry I am pretty lost in this)

Shared hosting often has quirks that mean your web application only has access to certain folders, not to the whole root folder plus all sub-folders, this is to protect your data from accidental access.

Somewhere in your shard-hosting docs this will be explained further.

I cannot guess what your hosting supplier might allow/restrict and it’s been a very long time since I used any shared hosting space so I can’t tell you where to put them exactly, sorry.


I assume you’ve seen this page in the docs

although quite dated now, I think it’s generally still valid. “public_html” tends to be (was?) freely accessible by web apps on most shared hosting.

thanks alot for trying to help! yes these are the instructions I have been following. But If I choose PHPFIWA or PHPFINA Fixed Interval when trying to create a feed then I get “ERROR: Feed could not be created, undefined”do you think that error is also because of emoncms not having write permission? don’t understand why I get different error for PHPFIWA or PHPFINA Fixed Interval and PHPTIMESERIES… p.s. I have tried to move the folders to the same folder as emoncms but with no luck, also tried to move it to the root, but also no luck

Are you saying you can now use phptimeseries ok? Or are they both still not working? The wording of the error message may just be different, or they maybe hitting different issues because they are different feed engines. If one works without issue it does mean you have the right location, permissions and settings path for that feed folder, if they are setup to be the same they should then both work, if they are the same but only one works, then yes there is another problem.

nope neither of them work, just give two different error messages :confused:


For future reference, and hopefully, to avoid some confusion for other users reading this thread…

The /root directory is the root user’s “home” directory,
which is not the same thing as the / directory which is the filesystem root directory.

1 Like

found a suggestion to change the directories in these three files (red underscore) to the same as in settings.php

it worked for that guy, but does not make any difference for me :confused:

(here is the link… ERROR: Feed could not be created, undefined [SOLVED] | Archived Forum )

I wouldn’t read too much into that post you linked, I would have been more surprised if it had worked, it suggests emoncms is unable to read it’s own settings.php file which cannot be true, emoncms would not run if it couldn’t load other settings from that same file.

You haven’t told us the hosting supplier or anything about your setup, we cannot help you to configure the unknown. If the folders are in an accessible location and the path matches, I’m confident it would work.

The path and the location must match, whether it’s a absolute path from a specific “root” folder (root of server, root of filesytem, root of website, root of user account we do not know) or perhaps try a relative path? I do not know if it will definately work, but the use of $log_filename = dirname(__FILE__).'/' . 'emoncms.log'; in the shared hosting guide might suggest it could work.

As a test, try putting the data folder inside the emoncms folder and use

            'datadir' => dirname(__FILE__).'/data/phpfina/'
            'datadir' => dirname(__FILE__).'/data/phptimeseries/'

hopefully this might remove the unknown part of the path as it should get the absolute path for the emoncms folder to which you are just adding the last levels. Not sure this will 100% work, but worth a try. The problem here is that the emoncms folder doesn’t really need to be in a location with write access to function, only the datadir’s need write access, so we still do not know if it’s the right location, we are just trying to see if the path might work, it not working doesn’t mean it wouldn’t work in another location unfortunately.

Actually, does your emoncms.log file exist? Is that being written to? If it is, then emoncms does have write permission to that location, try putting the datadir’s there until you fathom out the correct datadir path sysntax, then you can move them armed with knowing the correct path/syntax to be amended to the new location as needed.

1 Like

THAT WAS IT!! :smile:
thanks alot! you really saved my mental health for some days!
maybe you edit your last reply just if anybody else runs into this problem and reads this post. there is one extra ’ in front of dirname(

it should be

            'datadir' => dirname(__FILE__).'/data/phpfina/'

but not

            'datadir' => 'dirname(__FILE__).'/data/phpfina/'

(atleast it did not work for me until I figured out this extra “comma” :slight_smile:

Your “comma” is actually a quotation mark.
(specifically, a single quotation mark, as opposed to the " character,
often called a double quottation mark)

Side-by-side for comparison. Comma first, then quote mark ,'
(I made them them bold to make them a bit easier to see)