Notice: Undefined variable: home_query in index.php on line 18

Notice: Use of undefined constant U - assumed 'U' in inc/functions.php on line 168

I have installed a script that pulls info from api's and was able to eliminate the errors by chmod the cache folder to 777. I don't think I have to use 777 so that errors disappear, would there be another setting for this?

what other method can be done to dump the errors else where besides the top of my index.php page?

You can ignore notices. If you dont want your script to display notices, you can simply turn the notices off by editing your error_reporting in php.ini file. More on error_reporting here .
And, you can't redirect errors to another page. If you are executing a script and if you encounter errors, the errors are shown in the same page.

thanks for the advice. I went ahead and changed the php.ini for error reporting and it works sometimes. The times that it doesn't work is when it seems to stall for a moment when clicking on my links and then it resolves with functions.php errors so I am wondering if there is something else I need to look for.

You get that warning because, as the message said, you use an undefined variable.

to be sure you don't get that warning, first try to initialize your variables and after that use them:
$a = null;
// do what ever you want with $a

i thought that might be the case but when I made the adjustments to the php.ini file I and updated my plesk the errors disappeared but now I have a new issue. It looks like the script I am working with completely wiped out my php.ini file cause the entire file seems to be missing most of its settings. The only settings that are displayed are the following:
memory_limit = "100M"
include_path = "\".:\""
short_open_tag = "On"
file_uploads = "Off"
safe_mode = "On"

and the rest of the settings are not showing up like the original settings. I do have a php.ini. file which does have all its original settings not quite sure what to do next, any ideas?

I want to expand on this post by saying that the script I am using is written so that it allows for a cache folder to be written on. The cache folder is set to 777 so that the script can cache and write html files on request. Keywords are entered on the menu setting put the page is not created until the visitor clicks on the keyword link.
I had to set the php.ini folder to allow the server to write and now my php.ini seems that its missing most of its setting. I hope this makes the question I am asking clearer.

This article has been dead for over six months. Start a new discussion instead.