Cardale Posted November 21, 2009 Share Posted November 21, 2009 I am getting a consistent error being created by users that I cannot duplicate any rational way unless I am trying to insert malicious code. I did a search a few of the IPs in my error log and I believe it is a bot. Could this error come from search bots? My error system is catching these results and preventing any information from being displayed(I believe any input here is welcome) but I would sure hate to think I am preventing search crawlers from following my site. Here is my error out of my error log. Time: 20 Nov 09 - 4:46:20 AM (PST) File: /var/www/index.php Line: 275 Code: E_NOTICE Message: Array to string conversion Quote Link to comment https://forums.phpfreaks.com/topic/182365-consistent-error/ Share on other sites More sharing options...
Alex Posted November 21, 2009 Share Posted November 21, 2009 We really can't offer much help without seeing code. Most likely it's some kind of uncaught exception that is caused by a bot being able to access some file in a way that you would not normally have anticipated. Quote Link to comment https://forums.phpfreaks.com/topic/182365-consistent-error/#findComment-962354 Share on other sites More sharing options...
Cardale Posted November 21, 2009 Author Share Posted November 21, 2009 Oh sorry. This is the line that throws the error. if (get_magic_quotes_gpc()){ $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); } Quote Link to comment https://forums.phpfreaks.com/topic/182365-consistent-error/#findComment-962355 Share on other sites More sharing options...
Alex Posted November 21, 2009 Share Posted November 21, 2009 The only thing I could think of is if you have an array in the $_POST superglobal, then you'll get that error message. Like if you have a form with something like this: <input type="text" name="var[]" /> <input type="text" name="var[]" /> Where $_POST['var'] would be an array and would throw E_NOTICE Array to string conversion when you try to run it through stripslashes() Quote Link to comment https://forums.phpfreaks.com/topic/182365-consistent-error/#findComment-962357 Share on other sites More sharing options...
Cardale Posted November 21, 2009 Author Share Posted November 21, 2009 I think I understand how it is happening ... maybe, but what I don't know is if this is a malicious user or a serch crawler. Would a search crawler attempt to insert any arrays into GET POST ? Quote Link to comment https://forums.phpfreaks.com/topic/182365-consistent-error/#findComment-962364 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.