fbrill — 2009-07-28T10:50:29-04:00 — #1
I'm having trouble with the deleting a joke example, the adding example is working 100%.
I'm using the code archive to overcome any spelling mistakes (So it is exactly as it is in the book)
When i run the complete site, i get an error saying the page is not available
(In Chrome on Windows, i get this error: Error 324, net::ERR_EMPTY_RESPONSE): Unknown error.)
When i change the section that fetches the jokes to:
$result = mysqli_query($link, 'SELECT joketext FROM joke'); (As in Add joke example)
It runs the site but obviously its not parsing an ID so it doesnt work.
As soon as i add the id in:
$result = mysqli_query($link, 'SELECT id, joketext FROM joke');
I get the error,
Anyone getting the same result?
Any advice please?
mittineague — 2009-07-28T11:44:43-04:00 — #2
mcderllo — 2009-08-07T23:56:01-04:00 — #3
I'm having EXACTLY the same problem when trying to run the DELETEJOKE example. I have tried other examples and always when SELECTING more than one field, I get the same error message.
When I edit the ADDJOKE example and change the SELECT statement to
$result = mysqli_query($link, 'SELECT * FROM joke');
I get the same error. The problem seems to occur when selecting more than 1 field from the database.
mittineague — 2009-08-08T00:13:48-04:00 — #4
Hi mcderllo, welcome to the forums,
Did you try the solution at http://www.sitepoint.com/forums/showthread.php?t=627677 that worked for 3 others?
mcderllo — 2009-08-08T02:04:45-04:00 — #5
After a few tries at reinstalling php 5.3 and rebooting numerous times, it is now working without any changes to the original code in the book.
Thanks for the suggestion.
jeremyvz — 2010-01-19T04:27:26-05:00 — #6
I too came right when installing php5.3, however then there's the problem of php5.3/Vista SP1 & having to use 127.0.0.1 instead of localhost. Is there not a solution to the original problem? There are clearly many users experiencing it!
vlad56 — 2010-01-19T21:04:32-05:00 — #7
I posted something about localhost yesterday, this was for Windows 7, not sure if Vista SP1 has the same issue.
Basically, I had to uncomment the line in C:\Windows\System32\drivers\etc in the hosts file that mapped 127.0.0.1 to localhost. (i.e., take out the # sign in front of it).
If there is no entry in the hosts file, you can always add one:
I've had to do a lot of hosts file stuff with Windows Servers in the past.
Maybe this will help.