Showing results for 
Show  only  | Search instead for 
Did you mean: 

I can't access my php query it has an error of HTTP ERROR 500

i cant manage to access my fetch query can anybody help me here is my code


<?php require_once('conn.php') ?>
$query = "Select *, concat(sh.firstname , ' ' , sh.lastname) as name, s.address as shopaddress from shop s RIGHT JOIN shopowner sh ON s.shopowner_idshopowner = sh.idshopowner where s.activation = 'Active' AND s.shoptype NOT LIKE '%Gas Station%'";

$result = mysqli_query($conn, $query);

$shop = mysqli_fetch_all($result, MYSQLI_ASSOC);

echo json_encode($shop);



my problem seems to be this part

$result = mysqli_query($conn, $query);

$shop = mysqli_fetch_all($result, MYSQLI_ASSOC);

Community Manager

Hi @Fen. Welcome to GoDaddy Community! I'm no coding expert, but I've always found the best way to troubleshoot 500 errors is to see what the error log says is happening. Usually, you can find the log from 500 errors in the error_log file in the root directory for your site. If you don't see that there, you may want to set up some custom PHP error logging. Once you have the error log, that should help you identify what the problem is. Hope that helps. 


JesseW - GoDaddy | Community Manager | 24/7 support available at | Remember to choose a solution and give kudos.