I've got a web application that is coded in cakePHP, but from last couple of week, the herpes virus is affected towards the site and it is not showing any pages. even when we visit the source code, there is nothing there to show.
I've checked the index.php, there's no extra entry. Can outside assistance me to discover the answer. and, how do i prevent these virus attacks?
Thanks ahead of time
Knowing without a doubt that you've a virus, i quickly cannot assist you to.
If there's an opportunity that it is not really a virus...
If you're running PHP, a 'white blank page' could be a characteristic of a syntax error.
Somewhere inside your code there might be a typo.
Make sure you can place errors
activating 'display errors'
setting 'error reporting' to show all kind of errors
Temporally add this to the peak of the script
<?php //ensure errors are displayed ini_set('display_errors', 1); //show all type of errors apart from Notices error_reporting(E_ALL ^E_NOTICE);
Likewise try getting rid of the closing php tags from the foot of pure-php scripts:
<?php //i am 100% php ?>
<?php //i am 100% php
Clearly, have a closing php tag whether it separates php from html.
This can be a common coding-practice.
A little of brute pressure may help. Start towards the top of the script and add something similar to:
<?php //ensure errors are displayed ini_set('display_errors', 1); //show all type of errors apart from Notices error_reporting(E_ALL ^E_NOTICE); echo('hello - i got this far'); exit; //...other code
Refresh the page. If you're able to see
hello - i got this far
You already know that it's a problem that you could solve.
Tidy-up / comment-out individuals lines of code, pointed out above.
Debugging And Also The Scientific Method
Check both server's error logs and also the PHP error log. No output within the browser generally signifies there's an issue with the script and "display_errors" is off, which means you get nothing sent.