Wordpress Website Showing Error


Hi My Website is showing error.when we refresh it then its work properly.
Any Idea?

Displaying Error

Warning : opendir(cache/domains/): failed to open dir: No such file or directory in /var/www/html/cms/application/models/api_model.php on line 14

Warning : readdir() expects parameter 1 to be resource, boolean given in /var/www/html/cms/application/models/api_model.php on line 15

Notice : Undefined variable: domains in /var/www/html/cms/application/models/api_model.php on line 22

Warning : in_array() expects parameter 2 to be array, null given in /var/www/html/cms/application/models/api_model.php on line 22

Please find attached screenshot.



Hi vivekwebdev20, welcome to the forums!

The error message shows that you have a problem in your (or your site host’s) server setup, it has nothing to do with the website itself.



We already connected to hosting provider but they are not able to resolve this issue.they saying its a developing issue


It looks to me as though one of your plug-ins (or the WP install itself) has not been properly installed. What do you mean by “refresh”? Refresh what?

Slightly off-topic, you should not be displaying error messages and warnings on a live site as they are a security risk.


Thanks …We will not in future.

Actually when we first time open in browser its display above mentioned error then if we refresh same urls then website working properly…not any error came out


Are you developing the live website or a different dev site at the same host?

Do you configure the server your self or is it the hosting provider that does?


My first guess was that it was likely due to a change with the allow_url_fopen setting. The error message being “no such” doesn’t suggest that as the cause (though the “failed to open” could) and it wouldn’t be the first time I’ve seen an error message that was somewhat misleading.

Looking closer, I see “cache”. Considering that the error is only on initial load and not present with a refresh, I’m wondering if “cache” is a temporary folder that is created per session. It would be intuitive to think of a cache folder as being more or less long-lived (persists across sessions) and one would think if it was temporary there would be a name somewhere to indicate that, but it wouldn’t be the first time I saw something with a less than ideal descriptive name.

In any case, I think if there is a chance the opendir might fail it would be a good idea to wrap that bit in a conditional to deal with what happens when there is a fail.


Sir any idea how can we resolve it.


Hi Sir,

We are not developed this website, just maintained.No another website at this host.We are not configure the server.


I’d need to see, if not more, at least the beginning 30 or so lines of the api_model.php file. Is the file open source and available somewhere?


Sir below mentioned file and folder strucuture is not present in my server. I don’t know where is came from
var/www/html/cms/application/models/api_model.php on line 14
/var/www/html/cms/application/models/api_model.php on line 15
/var/www/html/cms/application/models/api_model.php on line 22
/var/www/html/cms/application/models/api_model.php on line 22


I’m not seeing errors. You found and fixed the problem?


We didnot resolve it sir…any idea how can we resolve…we had much more but still same error


Sorry, not really. The page loads fine for me and I’m not seeing any errors that look anything like the screen capture.

Might it have something to do with your browser / browser addons wanting “https” and not liking “http”?


Please Check site:"aaron-helmet.com" in incognito Window.

Just Copy and paste it :-



No error(s) that I can see



This is when you try to visit the home page, right, not when you try to go to your dashboard?

Have you tried to access the site using a different computer and or a different browser?


In Incognito WIndow(Chrome) .In Google Search…Paste it.
site:" aaron-helmet.com " .Then we found this error


I don’t get an error accessing your site in any browser, including Chrome incognito mode. But you haven’t answered my question.