ozzyizzy Posted November 13, 2015 Share Posted November 13, 2015 Hi. So I was having a great day and got lots done so I decided to push things a little and thought I would finally put a blog on my cubecart in a sub directory. All went seemingly fine, but now my site is down (knicknacs.com.au). What I did was: Created a new folder and a new database for wordpress in cpanel. Uploaded wp into said new folder. Went to knicknacs.com.au/blog, and created a config file. All good. Decided to have a break before creating my amazing new blog site, and have some lunch. Meanwhile I get a message from uptime robot that my site is down ( 500 internal server error). Error logs in cpanel show these errors repeatedly .[13-Nov-2015 02:38:04 UTC] PHP Warning: include_once() [<a href='http://docs.php.net/manual/en/function.include.php'>function.include.php</a>]: Failed opening '/home/XXXXXXXXXXX/public_html/classes//cubecart.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/XXXXXXXXX/public_html/classes/autoloader.class.php on line 77 [13-Nov-2015 02:38:04 UTC] PHP Fatal error: Class 'Cubecart' not found in /home/XXXXXXXXX/public_html/controllers/controller.index.inc.php on line 62As this happened while I was mucking around with wp I believe it has something to do with that and the htaccess.I can currently access my cubecart admin, wp admin, and knicknacs.com.au/blog. but not knicknacs.com.au. Does anyone know what has to happen for knicknacs.com.au to go to cubecart in my root directory? I got this far, and I don't want to do a restore at this point. CheersUPDATE. Removed the /blog folder and restored the "classes", knicknacs.com.au is up again, but I would still like to know how to put a wp in a blog subfolder. Pretty please! Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 13, 2015 Share Posted November 13, 2015 That!!! is very interesting.Looking at how CubeCart scans for class files, for it to find Cache, Database, Config, and ten other classes before reporting that the Cubecart class failed to open for inclusion is bizarre.The statement before the include_once of it is to file_exists() for its presence. But there is an aspect to checking the existence of files: PHP has a statcache that remembers the result. Where and for how long, I do not know.Then, having no useful knowledge about WP, it is not inconceivable to me that WP will do funny things with finding classes for its own purposes, and maybe affecting the statcache.Did the file cubecart.class.php actually disappear? Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted November 14, 2015 Author Share Posted November 14, 2015 I am not sure if it disappeared or not. I had send out an email campaign and did not want my site to be down any longer than was necessary. As all the errors logged were as reported I thought I would restore the "classes" first after removing the "blog" folder ( that had no effect, and site stayed down). As soon as I did restore the classes the site came back up. I thought it very strange too. I will try again on Monday to put the blog folder back to see what happens. I would really like a blog. I have no idea why the site went down the way it did, but will try to replicate it in a few days. Thanks for you reply bsmither. I'll update once I have tried again. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted November 14, 2015 Share Posted November 14, 2015 There is no problem adding WordPress in a /blog sub-directory with CubeCart in the top level - we have this configured this way with many clients. I think maybe this was a coincidence as installing WP correctly cannot cause other files to be removedIan Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted November 16, 2015 Author Share Posted November 16, 2015 Update- Reinstalled wp in /blog sub folder, and this time it is working with no issue at all. I guess the internet gremlins decided I was having far too good a day on Friday and threw me a curve ball ( Friday the 13th!). I don't know why I had the issue above, and could not replicate it. I am just glad it was an easy fix. Thank you bsmither and Ian for your suggestions and support. Cheers 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.