Quantcast
Channel: Troubleshooting
Viewing all articles
Browse latest Browse all 1814

IIS 8 cannot import into database

$
0
0

Hi guys. I am having website on localhost (XAMPP) and I migrate it into newly create IIS8. PHP (5.5.38) MarinaDB (10.1.13) and phpmyadmin (4.6.4) are same on both sides, but still there are few php functions which are not working (mostly when I want to import or update database)

Input in normal html

<div>Service Partner: </div><div><input type="text" id="partners_id" name="partners_id" value="" /></div>

In php which is inserting into db I have:

<?php
require_once '_db.php';$stmt = $db->prepare("INSERT INTO reservations (name, start, end, ...,partners_id) 
VALUES (:name, :start, :end, ..., :partners_id)");$stmt->bindParam(':start', $_POST['start']);$stmt->bindParam(':end', $_POST['end']);$stmt->bindParam(':name', $_POST['name']); ...$stmt->bindParam(':partners_id', empty($_POST['partners_id']) ? '9999' : $_POST['partners_id']);$stmt->execute(); class Result {} $response = new Result();$response->result = 'OK';$response->message = 'Created with id: '.$db->lastInsertId();$response->id = $db->lastInsertId(); header('Content-Type: application/json'); echo json_encode($response); ?>


In xampp, it inserts everything into database and on IIS it doesn't.

Then I have other php, which is inserting into different table and that one is working. So it is not about user right, or rights set in database.

Do you know, where is the problem. And yes, I check if there is any typo..if the table name, column names are right. 

Thank you for any ideas


Viewing all articles
Browse latest Browse all 1814

Trending Articles



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