Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

Images not displaying on new installation. (no replies)

$
0
0
I have wampserver on my development laptop (Apache 2.4.23 - PHP 5.6.25 - MySQL 5.7.14) which has been working fine, now my laptop is old and dying I am moving my website/intranet to a proper pc with ssd.

I have downloaded the latest version of the 64bit WAMP, got it up and running fine, but no pictures are being displayed, I have one a complete backup of the laptops www folder and the MySQLi database, copied it to the new server, but images don't work, I have the following which still works on the laptop.

<?php
require('../../js/db.php');
$id = $_GET['id'];
$query = "SELECT image_type, image FROM mums_books WHERE id = ".$id;
$result = $Conn->query($query);
$row = $result->fetch_assoc();
$image = $row['image'];
header('Content-Type: '.$row['image_type']);
echo $image;
?>


This pulls a thumbnail from the database to display on the webpage, the mime type is added to the DB when the image is uploaded, so it creates the proper header each time the script is called.

Is this a problem with WAMP, because the same script still runs ok on my laptop?

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>