Tag: php

Updating Values on database with mysqlserver and PHP

I was wondering if someone could point me on the right path here. There’s a database with fields: PersonID, FirstName, LastName, isActive. I collect those values from a form: <form action=”” method=”POST” id=”myForm”><input type=”hidden” name=”hdnId” id=”hdnId” value=”<?php echo $var_PersonID?>”> First Name<br> <input type=”text” name=”txt_first_name” id=”txt_first_name” value=”<?php echo $var_FirstName;?>”> Last Name<br> <input type=”text” name=”txt_last_name” id=”txt_last_name” value=”<?php […]

My query returns null result if the field contains a special character

I made a simple query in SQL Server with PHP SELECT TOP 10 * FROM Art WHERE Articulo = ‘NAME’; And one of the fields I need to read returns NULL if the data contains any spanish character. I could work with random characters, but not with this null values. What could be causing them? […]

PHP – Connect to MS SQL Server

I’m trying to connect to a Windows MS Sql Server database using PHPon Linux and I know I have the hostname, port, userid and password correct. I verified this with some client software to make sure I could get to the database. So I’m sure it’s just either the right driver, method, or a syntax […]

Ubuntu migrate package PHP 7.0 and 7.1

Hi I am new with Ubuntu and have some problem with PHP. 1. I already install phpmyadmin and PHP 7.0 and it work well and have 1 application running on it. 2. I have a new project that need to connect to MSSQL with another server but PHP 7.0 not support MSSQL PHP library so […]

SQL Takes too much

For some reason my script takes too much time, that is why i had to add the ini_set(‘max_execution_time’, 300); since 30 seconds being the default got me a fatal error. I can’t understand why this is happening, if i go directly into SSMS i get that query in 0 secs. what can be happening? i […]

Sync Framework Insert Triggers With Yii2 not working

I have used Sql Server with PHP framework to Sync online database with local database. I made an application in .net Framework and used Microsoft SyncFramework to sync two databases. The problem I am facing now is that whenever database is provisioned and tracking tables are made along with triggers and stored procedures. All create […]

Issue while handling PNG image from MSSQL database

I’m having trouble saving/viewing a PNG file stored in a MsSQL database, as follows: I’m using the next code to get the file: function manualDIRECTimg(){ ini_set(‘mssql.textlimit’, ‘100000000’); ini_set(‘mssql.timeout’, ‘9999’); ini_set(‘mssql.compatability_mode’, ‘1’); ini_set(‘mssql.textsize’, ‘100000000’); set_time_limit(0); header(‘Content-Type: image/png’); $codPRODUSerp = $_GET[‘id’]; $rowerp=mssql_fetch_array(mssql_query(“EXECUTE spWEBSelectFoto “.$codPRODUSerp.”, 1″)); $img=$rowerp[‘0’]; // The image is stored in column0 if($img!=”){ global $defaultPRODUCTimagePATH; $imagineprodusTMP […]

Access internal MSSQL database with php/laravel

I make a small php-website for a company and have to access the internal MSSQL database. The sqlsrv driver for php are installed. I can connect in the internal network structure to the Database. The network structure looks like this: Internet —> Firewall —> Server Farm(in this server farm) Server1: WinGate Proxy Server Server2: MSSQL […]

Connection error to mssql from Centos7

I have Centos7 installation with nginx/php5.6. MS SQL 2008 R2 is working on another server. MSSQL definitely has allowed tcp connection, custom (non domain) user, firewall disabled, and I can connect to it using HeidiSQL and that setting from another Windows machine. I can telnet to MSSQL from Centos (and I see Log error “Length […]

Using ODBTP from Linux client to MSSQL – response error

I have MSSQL running on a Windows server. I can connect to it using ODBTP, ADODB and PHP from other windows servers. When I try the same thing on a Linux server, I get a response error: [ODBTPERR][0]Invalid Response in /var/www/html/Database/adodb5/drivers/adodb-mssql.inc.php on line 726:[ODBTPERR][0]Invalid Response The ODBTP (v1.1.4) is enabled as an extension on the […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.