New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

PHP MySQL driver: problem with integer casting as strings, from database

Started by Evan, January 19, 2019, 01:50:31 PM

Previous topic - Next topic

Evan

Hello,

We have an issue with our server. We are building an API system, and the integer values we get from the database are cast into strings when they hit the PHP codebase.

(the exact same code works fine on other xampp local dev environments)

After much research, our problem is most like with the PHP-MySQL driver.

https://stackoverflow.com/questions/20079320/php-pdo-mysql-how-do-i-return-integer-and-numeric-columns-from-mysql-as-int


Our sysadmin is telling me there is not much he can do about it, because we cannot just use a different CentOS PHP installation or PHP driver. We need to use PHP installation specifically through CWP, and compile PHP ourselves on the server each time.


Do you have any clue how we can tackle this issue? Any help appreciated.

Thanks!


[CWP7/CentOS 7.6.1810/PHP 7.1.22/MariaDB 10.1.37]

Netino

This could be a specific issue of your server.

You must study the PHP documentation:
http://php.net/manual/pt_BR/book.mysqlnd.php

And check some incompatibility, if any.

Regards,
Netino