开发者

Why I can view my php source code online?

I purchased a very well-known 3rd-party php-based forum software. Uploaded to my server, run it for few weeks. This morning, when I visit my site, it display all the PHP code, including all the comments etc, like what you will see if you open it with notepad. It was very scary, my database config which is in PHP file also visible, what happened? I have no choice but to take my website down now.

What should I do? How can vie开发者_如何学编程w PHP code? I thought PHP code is very safe?

Has somebody hacked my website?


That's a configuration problem at the server (like mod_php not being loaded for some reason). Best contact your hosting provider immediately and let them know they have a serious problem!

Unless you have uploaded your own .htaccess file, which could also be the source of problematic Apache configuration settings?


Somebody disabled your script interpretation on your webserver. Ask your host admin.


Quick fix is to place a blank index.html in your website (and forum root directory if different). It won't stop people accessing your source code if they know the script names and know this error is in place, but at least it won't be displayed to every man and his dog as they visit your website/forum.

Other than that, you've had the PHP parsing module on your server disabled, either incorrectly or accidentally. Contact your host immediately, but I presume you would have already done this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜