running a codeigniter application on localhost/xampp - php

What versions of PHP and MYSQL should I use, if I want to run a codeigniter application of version 2.2.0 on my XAMPP local host?
Thanks in advance.

Codeigniter 2.2.0 needs below Server Requirements
PHP version 5.1.6 or newer.
A Database is required for most web application programming. Current supported databases are MySQL (4.1+), MySQLi, MS SQL, Postgres, Oracle, SQLite, and ODBC.

PHP version 5.6 or newer is recommended.
It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features.
A database is required for most web application programming. Currently supported databases are:
MySQL (5.1+) via the mysql (deprecated), mysqli and pdo drivers
Oracle via the oci8 and pdo drivers
PostgreSQL via the postgre and pdo drivers
MS SQL via the mssql, sqlsrv (version 2005 and above only) and pdo drivers
SQLite via the sqlite (version 2), sqlite3 (version 3) and pdo drivers
CUBRID via the cubrid and pdo drivers
Interbase/Firebird via the ibase and pdo drivers
ODBC via the odbc and pdo drivers (you should know that ODBC is actually an abstraction layer)
Link Server Requirements

Upgrading to Code Igniter 2.2.0
Code Igniter 2.2.0 can be upgraded to (or installed) using any of Installatron's products. Use Installatron's optional Automatic Update feature to automatically apply Code Igniter updates as new versions are released, or use Installatron's Clone feature to duplicate an existing Code Igniter install to test the 2.2.0 upgrade prior to applying it live. Get started managing your Code Igniter installations with Installatron
What's New in Code Igniter 2.2.0
This is a security release for the 2.x branch. The Encryption Class now requires the Mcrypt extension, so please ensure your environment is ready for the update.
General Changes
Security: The xor_encode() method in the Encrypt Class has been removed. The Encrypt Class now requires the Mcrypt extension to be installed.
Security: The Session Library now uses HMAC authentication instead of a simple MD5 checksum.
Bug Fixes
Fixed an edge case (#2583) in the Email Library where Suhosin blocked messages sent via mail() due to trailing newspaces in headers.
Fixed a bug (#696) - make oci_execute() calls inside num_rows() non-committing, since they are only there to reset which row is next in line for oci_fetch calls and thus don't need to be committed.
Fixed a bug (#2689) - Database Forge Class methods create_table(), drop_table() and rename_table() produced broken SQL for tge 'sqlsrv' driver.
Fixed a bug (#2427) - PDO Database driver didn't properly check for query failures.
Fixed a bug in the Session Library where authentication was not performed for encrypted cookies.

Related

Does the mysql client package version on webserver affect PHP queries?

I have two RHEL servers, one to host the PHP application, one to host the MySQL server.
Database server has MySQL Enterprise version 5.6.21 installed.
While getting the application server built, I asked that the rpm MySQL-client-advanced-5.6.21-1.el6.x86_64 be installed (to match server), but the hardware people don't like this version since 5.6.27 is available which addressed some vulnerabilities.
The question is the following:
Does the mysql client version on the application server affect the database queries coming from the PHP application?
We're using PDO to connect to and query MySQL.
If we do this, does the application server even need a mysql client library?
Please let me know if I can clarify.
Thanks!
PHP uses its own library/driver to connect to MySQL databases. The MySQL-client-advanced package is just the CLI mysql client. PHP does not use this.
For PHP (and PDO), you should install php-pdo and php-mysqlnd. php-mysqlnd is the "MySQL native driver" and contains some enhancements. It also contains the mysqli class and the pdo-mysql connector.
Note: php-mysqlnd versions are unrelated to the MySQL server version.
Quote from the Mysql website
MySQL Native Driver is a replacement for the MySQL Client Library (libmysqlclient). MySQL Native Driver is part of the official PHP sources as of PHP 5.3.0.
https://dev.mysql.com/doc/apis-php/en/apis-php-mysqlnd.html

Laravel mssql driver support

I have been searching mssql driver for Laravel framework, but had no luck so far. I know Laravel has sqlsrv support for sql servers, but what I need is mssql connector (ones that have functions starting with 'mssql_').
We cannot use sqlsrv because most of our servers are MSSQL 2000, and sqlsrv doesn't provide support for these servers as far as I know. Also, MS does not provide sqlsrv driver for linux. (We are using freetds driver with manually compiled php 5.4.8 on Fedora 17 64-bit).
My question is
Is there any patch for mssql support in Laravel?
If not, which files should I create/modify to have mssql supported if it is ever possible?
I could use different framework that supports mssql as well, but I really like how Laravel handles everything. I didn't want to give up on Laravel just because it doesn't support mssql.
It seems it does not include that driver... I believe you can setup it at laravel/database/connectors

Can MySQL seamlessly be replaced with MariaDB or are there things to change in this case?

If I replace a MySQL 5.1 server with a MariaDB Server (Maria & XtraDB storages) instead of MySQL (MyISAM & InnoDB), will most of MySQL client software (incl. applications made with PHP 5.2 and Java SE 1.6) ...
just remain working without any changes (with minor regressions maybe)?
Or will I have to replace/reconfigure client drivers (like use another JDBC driver class and connection string)?
Or will I have even to change application code?
http://kb.askmonty.org/v/mariadb-versus-mysql
All MySQL connectors (PHP, Perl, Python, Java, MyODBC, Ruby, MySQL C connector etc) works unchanged with MariaDB.
I have used Mariadb as replacement for Oracle's MySQL for years. It is faster and very reliable. Needs just little attention in apt, but nothing severe. Also, there is one small detail with Mariadb; it is seeing [error] "PHP Warning: mysql_connect(): Headers and client library minor version mismatch" in the logs. I haven't found any other solution to that other than to start manually compiling: askMonty.
$php -i | grep 'Client API'
Client API version => 5.3.7-MariaDB
Client API library version => 5.3.7-MariaDB
Client API header version => 5.1.61
Client API version => 5.3.7-MariaDB
just remain working without any changes (with minor regressions
maybe)?
You shouldn't have any issues as long as you replace with the same version. If you're currently are using MySQL 5.1, you can replace with MariaDB 5.1. If you are using 5.5, use the corresponding one. MariaDB v5.2 and v5.3 and enhanced versions of 5.1.
Or will I have to replace/reconfigure client drivers (like use another
JDBC driver class and connection string)?
You shouldn't. MySQL and MariaDB both use the same protocol and overall syntax, but there could be a few exceptions in some cases. The URL quoted in another answer is a great resource: http://kb.askmonty.org/v/mariadb-versus-mysql
Regarding the drivers' licenses, there are differences if you plan to distribute your project commercially. In that case I recommend you to double check the license terms and if you have any concerns, use the MariaDB/SkySQL versions of the connectors as suggested in another answer. Check http://www.skysql.com/downloads/java-cc-connectors-mariadb for details.
Or will I have even to change application code?
The application code should be unchanged.
Just a little feedback requarding the compatibility with mysql driver/CodeIgniter. I ran into the problems on BIT attributes types few minutes ago.
Value was not retrived from the server. It was always empty.
I was using standard CI database configuration which is using "mysql" driver.
After changing driver in the database.php to "mysqli" problem was solved.
Just the heads up that there can be some differences if you are using old mysql driver.
$db['default']['dbdriver'] = 'mysqli';
MariaDB client API version 5.5.40
MariaDB is MySQL evolved.
It is also the same developer who is behind MySQL and MariaDB. It is almost the same (if it is not, i can only say MariaDB is MySQL improved, dot).
You don't have to change nothing in your PHP.
Contrary to popular belief, the default Connector/J JDBC driver for connecting to and interacting with MySQL in Java does not play nicely with MariaDB. To work with MariaDB, you need to have your application use the Drizzle or SkySQL driver.
http://kb.askmonty.org/en/mariadb-faq-is-there-any-java-connector-for-mariadb-than-the-one-from-mysql

PHP ORM with support for SQL Server 2005

I have been looking around the current options (and related SO questions) regarding PHP ORM solutions, however I have a couple of unique requirements:
I am running PHP on Windows Server 2003
I need to interface with SQL Server 2005
I can't seem to find a simple answer from the PHP ORM solutions out there as to which (if any) support MSSQL as an adaptor option. Outlet seems to support this, for instance, but is only mentioned in passing on the documentation page, while other references say that the current version (1.0) has only been tested with MySQL.
At the moment, I am using the Microsoft PHP SQL Server driver, which as I understand it, can't be used with current ORM solutions until the driver itself supports PDO (which the team are looking into, but with no timeframe).
So what can I use today as an ORM solution on PHP for Windows that interfaces with SQL Server. Anything out there at all?
From Doctrine manual:
The currently supported PDO database drivers are:
fbsql FrontBase
ibase InterBase / Firebird (requires PHP 5)
mssql Microsoft SQL Server (NOT for Sybase. Compile PHP --with-mssql)
mysql MySQL
mysqli MySQL (supports new authentication protocol) (requires PHP 5)
oci Oracle 7/8/9/10
pgsql PostgreSQL
querysim QuerySim
sqlite SQLite 2
And PHP on Windows should ship with an appropriate extension for MSSQL for PDO. Just enable
extension=php_pdo.dll
extension=php_pdo_mssql.dll
Propel should also support MSSQL, as it is written on top of PDO. And while not a full fledged ORM as such, Zend_Db has an adapter for MSSQL as well. The latter uses pdo-dblib though.

PHP and Oracle using a thin driver

Is there a thin driver for Oracle available to be used with PHP (for example as an extension)?
I cannot install the OCI driver/client, but need to be able to access an Oracle database.
What is the problem with installing the OCI driver ?
The InstantClient version simply requires an unzip and setting a couple of environment variables.
The other option is exposing the database functionality through web services. 11g includes an inbuilt HTTP server.
Oracle released a jdbc driver written only in java, but (afaik) without the source code, so I doubt they will release a php (source code) driver. And never heard of an attempt by someone else.
But another question: "(for example as an extension)" You would be able to install an extension but not the oci8 extension?
There is no "thin" Oracle driver in PHP. You always need an external client library such as Oracle Instant Client - which is really easy to install.
Check http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf
(Also, Oracle has RPMs of PHP and Instant Client that can be used on RH Linux.)

Categories