3 Replies - 587 Views - Last Post: 04 January 2019 - 10:14 AM

#1 vivekwebdev20   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-January 19

Wordpress Website Showing Error

Posted 04 January 2019 - 02:08 AM

Hi My Website “aaron-helmet.com” 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
bad

[attachment=43932:aaron-errors.PNG]

Is This A Good Question/Topic? 0
  • +

Replies To: Wordpress Website Showing Error

#2 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6805
  • View blog
  • Posts: 28,134
  • Joined: 12-December 12

Re: Wordpress Website Showing Error

Posted 04 January 2019 - 02:14 AM

Quote

No such file or directory in /var/www/html/cms/application/models/api_model.php on line 14

Is there such a file on the server? Provide line 14 and relevant lines before it.

Quote

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

Provide the code that relates to this warning.

What do you think these warnings are telling you?

Etc..



Topic moved to Web Development forum.
Was This Post Helpful? 0
  • +
  • -

#3 vivekwebdev20   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 04-January 19

Re: Wordpress Website Showing Error

Posted 04 January 2019 - 02:28 AM

In Server that code and folder structure not available.

View Postandrewsw, on 04 January 2019 - 02:14 AM, said:

Quote

No such file or directory in /var/www/html/cms/application/models/api_model.php on line 14

Is there such a file on the server? Provide line 14 and relevant lines before it.

Quote

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

Provide the code that relates to this warning.

What do you think these warnings are telling you?

Etc..



Topic moved to Web Development forum.



At Server that folder Structure and File are not available..Any idea how can we resolve it.

This post has been edited by andrewsw: 04 January 2019 - 02:26 AM
Reason for edit:: removed previous quote, use the Reply button

Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2351
  • View blog
  • Posts: 7,185
  • Joined: 15-January 14

Re: Wordpress Website Showing Error

Posted 04 January 2019 - 10:14 AM

Well, that's the problem. You need to create the file and folder structure that the code expects.

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

That PHP code is trying to open "cache/domains/". Since that is relative, it's trying to open "/var/www/html/cms/application/models/cache/domains/" to read the files in that directory. That directory doesn't exist, so you're getting the error. The solution is to either create that directory, and give it appropriate permissions so that PHP can read and write, or change the configuration in the code to use a different directory.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1