I am trying to query a remote MSSQL server from php. I connect fine using mssql_connect and run a simple query that gives me 3000 rows but if I try to run a query that gives me more than 100,000 rows it gives me a 500 internal server error. I tried increasing the max_execution_time for the php but with no avail. I don't know how to debug this since the connection is remote and don't have idea to go forward from here. Can anybody give any advice or solution to this problem.
-
Code or it didn't happen..Naruto– Naruto2015-10-07 15:02:07 +00:00Commented Oct 7, 2015 at 15:02
-
1Anything in the error logs? Are you running IIS or apache?chris85– chris852015-10-07 15:03:52 +00:00Commented Oct 7, 2015 at 15:03
-
I am connecting from a linux server to a remote Microsoft SQL server.jarus– jarus2015-10-07 15:06:17 +00:00Commented Oct 7, 2015 at 15:06
-
@Naruto : I just tried a simple query , if i run "select * from table where id like '%99%' " it gives me a result of 3000 rows and is fine. But if i try to run "select * from table where id like '%9%'" it gives me "500 internal server error" with a blank screen.jarus– jarus2015-10-07 15:09:47 +00:00Commented Oct 7, 2015 at 15:09
Add a comment
|
1 Answer
Thank you guys, it turned out to be a memory_limit issue. I had to increase the memory_limit in php.ini and that fixed my problem. Thanks again for quick replies.
1 Comment
S.L. Barth is on codidact.com
Fellow reviewers: this is an answer. OP explains what solved it for them, and there are no competing answers.