markt3404 Posted July 27, 2019 Share Posted July 27, 2019 My new host (Siteground) cloned and moved my html/php site (built by the previous owner) from Heart Internet server. All of the site works except for the sidebar, I get these 2 errors. Anyone shed any light on these at all? Warning: readdir(): supplied argument is not a valid Directory resource in /home/customer/www/dunster.org.uk/public_html/include/toolbox.php on line 97 Warning: opendir(/home/sites/dunster.org.uk/public_html//local_information) [function.opendir]: failed to open dir: No such file or directory in /home/customer/www/dunster.org.uk/public_html/include/toolbox.php on line 86 Quote Link to comment Share on other sites More sharing options...
markt3404 Posted July 27, 2019 Author Share Posted July 27, 2019 Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted July 27, 2019 Share Posted July 27, 2019 Quote Warning: opendir(/home/sites/dunster.org.uk/public_html//local_information ) [function.opendir]: failed to open dir: No such file or directory in /home/customer/www/ dunster.org.uk/public_html/include/toolbox.php on line 86 the path being used in the opendir() statement either has a hard-coded '/home/sites/' in it or is using a variable that has that incorrect value in it. based on the path where the code is actually at, that part of the path should be - /home/customer/www/ 1 1 Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 27, 2019 Share Posted July 27, 2019 To add to what Mac said, usually there are some configuration files involved. We have no way of saying for sure without code to look at, but a typical strategy would be to set up a variable or constant that contains the site root. Mac helpfully highlighted the differences for you. You should do a search through the source files for '/home/sites' and make sure that is replaced with '/home/customer/www'. Sometimes these configurations are stored in database tables, so that might be the problem if it's not hardcoded. There is no way for us to know for sure again without looking at some of the sourcecode for the site. 1 Quote Link to comment Share on other sites More sharing options...
markt3404 Posted July 27, 2019 Author Share Posted July 27, 2019 Thanks guys. The guy who ran the site has retired and I'm taking it over to my hosting but this error appears on my hosting only, Siteground say it's not their issue just old or broken coding. .I am still getting to grips with PHP, I can read it but not fully understand it all, HTML and CSS I work with daily but this website will be a hobby of mine until I just rebuild it in WordPress later this year. Have screenshot the code Quote Link to comment Share on other sites More sharing options...
gw1500se Posted July 27, 2019 Share Posted July 27, 2019 Don't screenshot code. Post the code using the code icon (<>) and select PHP. 1 Quote Link to comment Share on other sites More sharing options...
markt3404 Posted July 27, 2019 Author Share Posted July 27, 2019 Massive MASSIVE thank you guys, that fixed it! 😀😀😀😀 1 Quote Link to comment Share on other sites More sharing options...
gizmola Posted July 28, 2019 Share Posted July 28, 2019 Seems like you figured out that you needed to find where the $base variable was being set, and change that. Congrats on figuring it out, and on behalf of the the others who aided, you're most welcome. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.