Re: Apache crashes every time I call mysqli_fetch_assoc()
| From: | Chris | Date: | Thu, 10 Jul 2008 00:24:50 +0000 |
| Subject: | Re: Apache crashes every time I call mysqli_fetch_assoc() | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45137@lists.php.net to get a copy of this message | ||
Bonger O wrote:
> Hi,
>
> I have set up an environment on my Vista laptop comprising of Apache 2.2,
> MySQL Server 5.1 and Php 5.2.5.
>
> I'm using a simple php program that I found in a PHP/SQL book. The PHP
> program queries a MySQL table and traverses the results array of the query
> and should display on screen. However, there seems to be a problem with my
> environment and as every time I run the program I get the error "*Apache
> HTTP server stopped working and was closed*".
>
> Below is the code I am using, but I have managed to narrow the problem down
> to *$row = mysqli_fetch_assoc($result);*
> For some reason this is causing the crash. Would there be any reason that
> this function cant be found perhaps? I really have no clue!!!
If the function doesn't exist php gives that error, not a random crash.
Does the query work outside of php (type it in to the mysql console
directly) ?
Does it happen for a particular record? ie it gets up to record #5
before it crashes. What's in record #5?
How many records are returned by the query? Maybe you're selecting too
much data and the srever is killing it because it's taking too much
memory (random guess :P).
Do you have another environment you can try it in?
What happens there when you:
- use the same database
- use a different database
--
Postgresql & php tutorials
http://www.designmagick.com/