开发者

IIS + PHP + MySQL returns 500 - Internal server error

We're building a new server and using IIS 7. PHP pages a served just fine and dandy, but the second we use any code to access a MySQL database, the page hangs for a good minute and serves the following error:

Server Error

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Our database.php config file is开发者_JAVA百科 configured correctly, so I can't figure out what might be doing this. MySQL seems to be properly installed as well.

Any ideas? Googling hasn't lead me anywhere useful.


Looks like your MySQL-Extension of PHP is not loaded correctly. Is it included in the php.ini? If so, please just take a look in the php_error.log. There should be an entry there. Please post it here


Rdp to your IIS web server Right click on the folder where your site contents in and click on properties go to security tab > advance > click on Edit > click on add > and enter domain users and click ok. Now click on Edit and give full control or modify or read Now select "Replace all existing inheritable permissions on all descendants with inheritable permission from this object Click on apply, let it finish the process and click on Ok and ok.

This will fix the problem.


Change the memory_limit variable in you php.ini file. I had a similar problem where I was doing a very large select query.

On a development server the query would run fine, but on the live server it would throw a 500 error.

The difference turned out to be that my live server's memory_limit was set at "64M" whereas the dev server was "512M". I bumped the live server up to 512M and that resolved the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜