Jump to content

require and include path - help needed


annmann

Recommended Posts

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

Link to comment
Share on other sites

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 by webdeveloper123
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by annmann
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by ginerjm
Link to comment
Share on other sites

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.

image.png.aabb5fd16e1d0f2dbcb83590771ba0ed.png

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.