I have few website in CakePHP 2.4, and have to upgrade its Mysql API to MariaDB API, I am wondering if CakePHP 2.4 support MariaDB natively? Or I have to install some extension for PHP, and change CakePHP a little bit, hope someone can give me some advice, thanks.
As I was googling, and I fond this - https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/, so their driver, API is same.
All MySQL connectors (PHP, Perl, Python, Java, .NET, MyODBC, Ruby, MySQL C connector etc) work unchanged with MariaDB.
There are some installation issues with PHP5 that you should be aware of (a bug in how the old PHP5 client checks library compatibility).
Related
I'm dealing with a legacy firebird database and can't seem to get it to work with PHP7.4.
The interbase extension isn't available anymore in PHP7.4, I can only install PDO_FIREBIRD.
There are also no releases on PECL.
https://pecl.php.net/package/interbase
Any hints how to make it work with 7.4?
Recent versions of PHP indeed no longer ship with the interbase package. Instead you can use the Firebird PHP driver, which is a fork and continued development of the interbase package.
Well, I faced some caveats while dealing with legacy Firebird data structures.
To put it simply, I had to address two broad issues:
1 - Match client libraries with dataset On-disk Structure (ODS)
Each Firebird version supports a limited range of On-Disk Structures (ODSs). The following link has a pretty nice reference on this topic:
https://ib-aid.com/en/articles/all-firebird-and-interbase-on-disk-structure-ods-versions
ADODB and PHP PDO are abstraction layers to client libraries in the host system. And PHP 7.4 supports only FB 3.0 and later clients. So, it is necessary to match the abstraction layer with the client library available.
For datasets up to FB 2.5:
disk structure should be up to ODS 11;
client version should be up to FB 2.5.9 (recommended);
PHP engine should be up to 7.3 (7.1 already has issues);
legacy functions ibase_ and fbird_ should work fine;
ADODB, PHP PDO, etc. should not work.
For datasets starting from FB 3.0:
disk structure should be ODS 12 or higher;
client version should be FB 3.0 or higher;
PHP engine should be 7.4 or higher;
legacy functions ibase_ and fbird_ should not work;
ADODB, PDO etc. should work fine.
2 - Match client and server platforms and params
For any client and server combination:
the client and the server should share the same platform, 32 or 64 bits;
the connection should use SQL dialect 1 or 3, depending on legacy dataset usage;
the character encoding should be WIN-1251 (legacy) or UTF-8 (new default).
Opinion
In my experience, it is difficult to "force" legacy FB connections into an up-to-date PHP engine. I suppose it is more challenging with Linux systems because libgcc has different entry points from versions 5 to 6 (I guess...), and musl just ain't supported.
Things are more flexible in Windows since fbclient.dll is the only client library needed for the connection, and it depends on Win32 libraries that have maintained the same entry points over the years.
I'd recommend upgrading the dataset to Firebird 4 and using updated extensions and clients. However, if this is not an option, downgrading should be streamlined from the host OS, through the PHP engine, until the FB client.
Unfortunately, I believe "this is the way."
All the best.
Recently I have problems connecting firebird with php. I went through many questions until I discovered that there has to be 3 dll's inside the apache bin folder. gds32.dll
msvcr71.dll
fbclient.dll.
Without these dll's it doesn't work, for some unknown reason the new version of xampp came missing.
I'm dealing with a legacy firebird database and can't seem to get it to work with PHP7.4.
The interbase extension isn't available anymore in PHP7.4, I can only install PDO_FIREBIRD.
There are also no releases on PECL.
https://pecl.php.net/package/interbase
Any hints how to make it work with 7.4?
Recent versions of PHP indeed no longer ship with the interbase package. Instead you can use the Firebird PHP driver, which is a fork and continued development of the interbase package.
Well, I faced some caveats while dealing with legacy Firebird data structures.
To put it simply, I had to address two broad issues:
1 - Match client libraries with dataset On-disk Structure (ODS)
Each Firebird version supports a limited range of On-Disk Structures (ODSs). The following link has a pretty nice reference on this topic:
https://ib-aid.com/en/articles/all-firebird-and-interbase-on-disk-structure-ods-versions
ADODB and PHP PDO are abstraction layers to client libraries in the host system. And PHP 7.4 supports only FB 3.0 and later clients. So, it is necessary to match the abstraction layer with the client library available.
For datasets up to FB 2.5:
disk structure should be up to ODS 11;
client version should be up to FB 2.5.9 (recommended);
PHP engine should be up to 7.3 (7.1 already has issues);
legacy functions ibase_ and fbird_ should work fine;
ADODB, PHP PDO, etc. should not work.
For datasets starting from FB 3.0:
disk structure should be ODS 12 or higher;
client version should be FB 3.0 or higher;
PHP engine should be 7.4 or higher;
legacy functions ibase_ and fbird_ should not work;
ADODB, PDO etc. should work fine.
2 - Match client and server platforms and params
For any client and server combination:
the client and the server should share the same platform, 32 or 64 bits;
the connection should use SQL dialect 1 or 3, depending on legacy dataset usage;
the character encoding should be WIN-1251 (legacy) or UTF-8 (new default).
Opinion
In my experience, it is difficult to "force" legacy FB connections into an up-to-date PHP engine. I suppose it is more challenging with Linux systems because libgcc has different entry points from versions 5 to 6 (I guess...), and musl just ain't supported.
Things are more flexible in Windows since fbclient.dll is the only client library needed for the connection, and it depends on Win32 libraries that have maintained the same entry points over the years.
I'd recommend upgrading the dataset to Firebird 4 and using updated extensions and clients. However, if this is not an option, downgrading should be streamlined from the host OS, through the PHP engine, until the FB client.
Unfortunately, I believe "this is the way."
All the best.
Recently I have problems connecting firebird with php. I went through many questions until I discovered that there has to be 3 dll's inside the apache bin folder. gds32.dll
msvcr71.dll
fbclient.dll.
Without these dll's it doesn't work, for some unknown reason the new version of xampp came missing.
Does anyone know if there is a PHP module for Sybase Active Server Edition (ASE), compatible with version 12.5 that will work with PHP 7+ since the removal of sybase_connect I'm struggling to find a driver and according to the documentation slqsrv needs MSSQL 2005+
I do have freeTDS installed, and have looked at PDO_DBLIB but it seems that it's not really coming recommended.
I'm running on Ubuntu Server LTS.
Plan B is it worth just trying to migrate my Script to something like Python -
please not Perl it screws with my head ;-)
THe ASE OpenClient SDK contains drivers for Perl, PHP and Python.You can get this either by downloading the full SDK from the SAP support website, but it may be easier to just download the ASE Express Edition from https://www.sap.com/community/topic/ase.html.
The connectivity drivers are located in $SYBASE/OCS_16-0.
Currently I am using MariaDB version 5.5.45 on CentOS 5.11 x86_64. Currently site has PHP version 5.3.29 and my forum site on this same server uses PHP version 5.6.10. My forum site is built using vBulletin version 4.2.3. So, I want to know whether it is safe to upgrade MariaDB 5.5 to 10.0 series? And is MariaDB 10.0 stable version compatible with vBulletin 4.2.3 and PHP 5.6?
I have tried a lot to get information about it on MariaDB official site and vBulletin but can't get sufficient and reliable information. It would be great if anyone can help me for this.
I would expect them to be compatible, with one exception... Do not use the mysql_* interface in PHP. Only use mysqli_* or PDO. Your homework is to see what interface vBulletin uses. (Glance at the code, if possible.)
Thanks Rick.
From vBulletin support, I came to know that vBulletin 4.2.3 is compatible with MraiaDB 10+ series. However, vBulletin 4 does not have official support to MariaDB 10+. VB 5 has offical support to it.
Also, I have upgraded to MariaDB 10.0.21 and it is working fine without any problem with my vBulletin 4.2.3 and PHP 5.6.10 and also on site having PHP 5.3.29. There is only one change I have to do for this is, I have to change database user's old passwords to new ones before upgrading as MariaDB 10 uses different scheme to save database user's passwords.
I think this information can be helpful to others. :-)
I want to use NOSQL database for my mobile application back end web services. I have gone through the MongoDB document.But i am not sure will it be suitable with PHP?
And I have below queries related to the same.
Can i use Mysql and NoSQL(MongoDB) databases on the same server?
Can i use MongoDB with PHP and apache? If yes then which version of MongoDB should i use for PHP?
Is it possible to install NoSQL database if LAMP is already installed on the same machine?
Regards,
Pratibha
In following lines few short answer:
Yes. You should only install PHP Mongodb driver for your PHP version. The MongoDB PHP driver should work on nearly any system: Windows, Mac OS X, Unix, and Linux; little- and big-endian machines; 32- and 64-bit machines; PHP 5.2, 5.3, 5.4 and 5.5.
Yes. Latest version should be the best choice.
Yes. As far as I know Mongodb server relies on different ports and in standard condition there is no conflict.
Your server should have only enough resources (basically enough memory) to run everything.