MAMP 500 Internal Server Error. MAC OSX php

14,602

php Syntax Error

line 5:

$image = mysql_fech_assoc($image);

replace:

$image = mysql_fetch_assoc($image);
Share:
14,602
MethodistMX_Juan_Pluma
Author by

MethodistMX_Juan_Pluma

Updated on June 08, 2022

Comments

  • MethodistMX_Juan_Pluma
    MethodistMX_Juan_Pluma about 2 years

    No results from my php code on the MAMP just got a 500 internal server error. Also I don't know if has something to do with XCache installed, no idea what's it but comes with MAMP. Here is my code. Trying to display an image binary stored on my mysql dB.

      <?php 
      mysql_connect("localhost", "root", "root") or die(mysql_error());
      mysql_select_db("catlogo") or die(mysql_error());
      $image = mysql_query("SELECT * FROM catlogo WHERE id=2");
      $image = mysql_fech_assoc($image);
      $image = $image['imagen'];
    
      header("Content-type:image/png");
      echo $image;
    
      ?>
    
  • MethodistMX_Juan_Pluma
    MethodistMX_Juan_Pluma almost 9 years
    yes is mysql_fetch_assoc, 3 years and body noticed, also the edit improvement dind't let me the chance to add just one letter