annmann Posted July 15, 2022 Share Posted July 15, 2022 Hi, First of all, sorry guys, I'm a beginner at this, my dad used to work on our websites but he passed and I am confused about one of them. Hosted through cPanel, it just disappeared. This is the error I am getting instead of the website: Warning: require(/home/briro/public_html/wp-includes/cron.php): failed to open stream: No such file or directory in /home/briro/public_html/wp-settings.php on line 210 Fatal error: require(): Failed opening required '/home/briro/public_html/wp-includes/cron.php' (include_path='.:/usr/local/lib/php') in /home/briro/public_html/wp-settings.php on line 210 I got to a point where I figured out how to find the 210 line but not sure what to exactly insert there? Tried include_path='.:/usr/local/lib/php' and a few other combinations but it doesn't work. This is what it looks like now: https://ibb.co/1s7N9PF Could you help please what I should insert exactly so the website works again? The problem is I really don't know what happened, I literally haven't changed anything on it.... Thank you in advance: Annamaria Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/ Share on other sites More sharing options...
ginerjm Posted July 15, 2022 Share Posted July 15, 2022 The trick is to actually find that script file and make sure you are looking for it (with your 'require') in that place. Simple as that. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598256 Share on other sites More sharing options...
webdeveloper123 Posted July 15, 2022 Share Posted July 15, 2022 (edited) Have you looked in those folders for the cron.php file? Seems like your using wordpress, which may mean you could update out of date plugins, but I wouldn't recommend messing with the php files that come with that plugin/wordpress unless you know what your doing btw if you want to include or require a php file the code is: <?php include 'includes/header.php' ?> or <?php require 'includes/header.php' ?> both above are stand alone, but you can remove opening and closing php tags to fit it into your script The part after the first "include" and the first "require" is the location of that file. Edited July 15, 2022 by webdeveloper123 Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598262 Share on other sites More sharing options...
gizmola Posted July 18, 2022 Share Posted July 18, 2022 On 7/15/2022 at 5:43 AM, annmann said: Hi, First of all, sorry guys, I'm a beginner at this, my dad used to work on our websites but he passed and I am confused about one of them. Annamaria Condolences on your loss. I don't believe that script is a core part of wordpress. Depending on how old the wordpress install is, this could be something that was orphaned some time in the past, or it might have been something custom. Clearly it isn't used as the script it is attempting to include doesn't exist. You might consider just commenting that line of code out at line 210. Simply add two forward slashes at the start of the line, and save the file again. This will eliminate the error, and as the script doesn't exist, you won't experience any functional change. // include ABSPATH . etc. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598320 Share on other sites More sharing options...
annmann Posted July 18, 2022 Author Share Posted July 18, 2022 4 hours ago, gizmola said: Condolences on your loss. I don't believe that script is a core part of wordpress. Depending on how old the wordpress install is, this could be something that was orphaned some time in the past, or it might have been something custom. Clearly it isn't used as the script it is attempting to include doesn't exist. You might consider just commenting that line of code out at line 210. Simply add two forward slashes at the start of the line, and save the file again. This will eliminate the error, and as the script doesn't exist, you won't experience any functional change. // include ABSPATH . etc. Thank you. I tried adding // at the start of the line 210 but unfortunately it doesn't work. Not sure why this is happening because I def didn't change anything... Do you have any other suggestions? I would highly appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598323 Share on other sites More sharing options...
annmann Posted July 18, 2022 Author Share Posted July 18, 2022 (edited) On 7/15/2022 at 3:46 PM, ginerjm said: The trick is to actually find that script file and make sure you are looking for it (with your 'require') in that place. Simple as that. From my understanding as a complete beginner at this, I did find the script file. Could you please help me out what I should insert in this case on line 210 based on this error message? Thank you! Edited July 18, 2022 by annmann Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598324 Share on other sites More sharing options...
ginerjm Posted July 18, 2022 Share Posted July 18, 2022 If you found the file then you now know where it resides so put THAT path in the require line. As I said - very simple. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598329 Share on other sites More sharing options...
ginerjm Posted July 18, 2022 Share Posted July 18, 2022 And PS - since you have not bothered to SHOW us this line 210 nor the exact location of this file you have located, how the heck are we supposed to show you exactly what to type? A require line simply points to a file with the exact path along with the filename. So just do it. This is not rocket science it is simply a way to add some already written and tested code that you want to literally include in your current script. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598331 Share on other sites More sharing options...
webdeveloper123 Posted July 18, 2022 Share Posted July 18, 2022 did you look inside On 7/15/2022 at 1:43 PM, annmann said: (/home/briro/public_html/wp-includes/ for cron.php? Is it an actual file that exists in the folder? Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598332 Share on other sites More sharing options...
webdeveloper123 Posted July 18, 2022 Share Posted July 18, 2022 3 hours ago, annmann said: From my understanding as a complete beginner at this, I did find the script file. Could you please help me out what I should insert in this case on line 210 based on this error message? If you found it, you should use the code I posted and put it near the top or at the top. Eg <?php include 'includes/cron.php' ?> <?php require 'includes/cron.php' ?> But you have to make sure the cron.php is in a folder called includes. If you have a different folder name, you should use that instead. It might be a good idea to screen shot the folder where cron.php is in and share some more code. E.g - the original include and require lines of code Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598336 Share on other sites More sharing options...
annmann Posted July 19, 2022 Author Share Posted July 19, 2022 18 hours ago, ginerjm said: And PS - since you have not bothered to SHOW us this line 210 nor the exact location of this file you have located, how the heck are we supposed to show you exactly what to type? I did show you... I took a screenshot of it and shared in my original post... It is this one: https://ibb.co/1s7N9PF Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598361 Share on other sites More sharing options...
annmann Posted July 19, 2022 Author Share Posted July 19, 2022 (edited) 18 hours ago, webdeveloper123 said: did you look inside for cron.php? Is it an actual file that exists in the folder? I looked at that folder and it doesn't actually have cron.php inside it! Took a screenshot: https://ibb.co/vhNHG1N Edited July 19, 2022 by annmann Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598363 Share on other sites More sharing options...
dodgeitorelse3 Posted July 19, 2022 Share Posted July 19, 2022 (edited) Have you looked in the wp-includes folder as the error suggested? Edited July 19, 2022 by dodgeitorelse3 Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598365 Share on other sites More sharing options...
dodgeitorelse3 Posted July 19, 2022 Share Posted July 19, 2022 always possible cron.php has been deleted. I would be looking everywhere for it. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598366 Share on other sites More sharing options...
maxxd Posted July 19, 2022 Share Posted July 19, 2022 cron.php is a standard file in WordPress installs, so if it's suddenly missing from the wp-includes directory then it got deliberately removed. I recommend re-installing WP and examining your logs for deletes or unusual/suspicious logins. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598367 Share on other sites More sharing options...
ginerjm Posted July 19, 2022 Share Posted July 19, 2022 I don't click on things. If you have code the polite thing to do is post it here so we can see it and work on it if neccessary. Pics don't help anyone. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598368 Share on other sites More sharing options...
webdeveloper123 Posted July 19, 2022 Share Posted July 19, 2022 Do you have a backup of your website? @maxxd - if she does can she safely simple copy & paste cron.php back into that folder? Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598369 Share on other sites More sharing options...
webdeveloper123 Posted July 19, 2022 Share Posted July 19, 2022 do what @dodgeitorelse3 suggested and click on the wp-includes folder and look in there. At the moment you have screen shotted the wrong folder. You have screen shotted the public_html folder, the folder your looking for is within public_html where the screen shot with the red arrow is at. go into that folder and screen shot it Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598370 Share on other sites More sharing options...
ginerjm Posted July 19, 2022 Share Posted July 19, 2022 (edited) From your post of 6:33am Monday I am starting to wonder just exactly what your computer knowledge is. Frankly, the problem and solution is, as I said before, very simple to research and resolve, if you know anything about computers (not even programming) at all. The fact that we've been on this for 2 days is amazing. From the latest post, a directory listing that doesn't seem to show the cron.php file in it, I have to wonder what experience you have with computer directories/folders and filenames. You do use a computer I hope. And assuming that you do know how to read a directory/folder's info and recognize a particular file when you need to, you have to browse thru your server's folders and find this cron.php file. That is the whole task in front of you. Can you do that? You may need to navigate a little higher up your server's directory structure (above the public_html folder) as high as you can go and start from there looking for the cron.php folder. Tip: if you have a copy of FileZilla on your pc, use it to connect and do this navigation. This topic will continue until you find this file and jot down the full list of folders that point to where it is. That is the path, in case you really don't know this stuff already. You are the only one who can do this since you are the sole user of the domain apparently. Please don't take this as criticism but simply someone (among many) trying to help who is having his own problem understanding why it is so difficult for you to resolve this yourself. Good luck in your new search. Edited July 19, 2022 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598371 Share on other sites More sharing options...
webdeveloper123 Posted July 19, 2022 Share Posted July 19, 2022 Hey I have used Cpanel before, there is something along the lines of File Manager which in the top right ( i think) there is a search function. type cron.php in there and see what comes up. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598372 Share on other sites More sharing options...
ginerjm Posted July 19, 2022 Share Posted July 19, 2022 Hopefully our OP can use Cpanel as well.... Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598373 Share on other sites More sharing options...
dodgeitorelse3 Posted July 19, 2022 Share Posted July 19, 2022 2 hours ago, webdeveloper123 said: At the moment you have screen shotted the wrong folder. You have screen shotted the public_html folder, the folder your looking for is within public_html where the screen shot with the red arrow is at I thought the same thing due to the + sign next to that folder but at top of screen he is in the right folder. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598374 Share on other sites More sharing options...
ginerjm Posted July 19, 2022 Share Posted July 19, 2022 Some screen shot. It doesn't show the filename in question. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598375 Share on other sites More sharing options...
dodgeitorelse3 Posted July 19, 2022 Share Posted July 19, 2022 That's what OP was showing .... that the required file isn't in the wp-includes folder. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598376 Share on other sites More sharing options...
ginerjm Posted July 19, 2022 Share Posted July 19, 2022 Too bad the OP can't show us WHERE the file is then. We could put this measly problem to bed. Quote Link to comment https://forums.phpfreaks.com/topic/315047-require-and-include-path-help-needed/#findComment-1598377 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.