Are there any PHP CQL drivers/clients available - php

Are there any php extensions for cassandra yet like the php_mysql extension, or are there any PHP wrappers available.
I have seen phpCassa and similar ones but it doesnt quite have the same flexibility as the CQL (plus i hear it may be faster to use CQL, not sure why...)
See CQL!

There's a PDO CQL driver, which seems like exactly what you're looking for.

https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP
Have you read this yet? Seems like it gives you a few options to interact with Cassandra directly from PHP
Here is an example of the code you could use in PHP. Seems SQL-esque enough to me:
http://wiki.apache.org/cassandra/ThriftExamples#PHP

Check out evseevnn's php-cassandra-binary: https://github.com/evseevnn/php-cassandra-binary
It uses Cassandra's binary protocol (no thrift) so it can be installed without any extensions!

I hope this might help you as well
http://itsallabtamil.blogspot.com/search/label/cassandra
Part 1 explains how to use PHPCassa to connect to Cassandra and fetch data via CQL
This is using PHPCassa
Regards,
Tamil

Related

SQLite support for PHP 4.2.3

i wonder, is there a way to work with SQLite on PHP version 4.2.3 ?
if you say i must update my php version, no i can't simply update my PHP version.
the system already have database, but i can't change that database it's not my authority though i can view, edit, or do anything to that database.
so i think maybe it's easier if i use my own sqlite database and make my own function to deal with the sqlite database, but i don't know if it supported by PHP version 4.2.3
thanks, any suggestion would be a great lift.
For what I found, yes, is possible to have sqlite under php4.
http://www.phpbuilder.com/columns/farell20040824.php3?page=1
http://polarwebservices.com/hostingblog/?p=6
http://forums.cpanel.net/f5/howto-install-sqlite-php4-servers-59201.html
And the source code of the sqlite extension is here: http://pecl.php.net/package/SQLite
Keep in mind is no longer supported, and is sqlite2 instead of sqlite3.
But if you are still using php4 on this year, I don't think you would really mind using an old sqlite, right? :P
By the way, IMHO, if that application makes you money, I think you should at least spend some time updating it.
I'm faced with a similar situation being stuck with PHP4. And I know where you're coming from (switching is much easier said than done specially if it's your own money you're spending).
But it's not the end of the world. Like you I needed to integrate newer technologies to my app. So what I did was instead to run 2 PHP versions along-side each other and created an API that I access via curl from PHP4.
That's the simplest approach I can think of. Hope that helps. I feel you man hehehe...

Best way of PHP with Oracle?

I'm just new with Oracle. But i wanna test with PHP. Which way or method should i use is the best?
I've found following various ways by googling yet,
The oci8 extension
The oracle extension
PEAR DB library
ADOdb library
Zend
or otherelse?
Actually i don't know know about these and which one is best.
Unfortunately PDO support is still considered experimental.
I've not read it, since I have no interest in oracle these days, but you might check out this oracle publication which I have not read.

Cassandra PHP interface with CQL available/planned?

I'm trying to plan a web application that should use a noSQL solution - Cassandra seems to be a good solution. I saw there are libraries for PHP to manipulate the database like phpCassa.
Also I saw the new version of Cassandra 0.8 is introducing a query language CQL.
Are there php interfaces that use the CQL? What is the benefit using the CQL? Is it just a more sql-like way to make queries?
Thank you!
The link Greg posted above is to date the working repo and state of the php-cql driver efforts.
While a driver is not yet available it does not stop you from using CQL, the drivers are all going to be a wrapper of the thrift method "execute_cql_query" (Until a new transport is created anyway).
That means you can simply compile thrift for php or get it from an updated project and then pass your cql query to that method. It does mean manual handling of things that a driver will/should take care of.
"Is it just a more sql-like way to make queries?", basically...yes. One of the things that came up on the Cassandra mailing list was getting CQL to be as SQL-Like as possible.
"What is the benefit using the CQL?" Well, mainly that some new Cassandra users find the thrift API tedious to get to grips with, CQL may be much easier to learn since its is so close to the "normal" sql.
https://github.com/nicktelford/php-cql
I also believe that phpCassa should support it as well.
It's designed to make NoSQL more logical for people coming from SQL as a database engine.
This will really be helpful if you wish to use CQL to communicate with Cassandra via PHP
https://gist.github.com/1024060/983a5607390433b77d5c2e64a4ee148f4df46b69
This is a sample of what zcourts mentioned in his previous post
Regards,
Tamil
The official CQL drivers supported by the Apache Cassandra project at large are, I believe, all on Apache Extras, at this link:
http://code.google.com/a/apache-extras.org/hosting/search?q=label:cql
The PHP one is at
http://code.google.com/a/apache-extras.org/p/cassandra-pdo/
Connection via Thrift deprecated.
I am using PHP library for Cassandra database via a binary protocol.

Preferred method of accessing MS SQL with PHP 5.3+ on Linux

What is the preferred method of accessing a Microsoft SQL Server database with PHP 5.3+ on Linux?
Given the different extension options now available I'm unsure which method is preferred based on reliability and performance. Right now I am using the mssql extension with FreeTDS, but I'd like to know if this isn't the best way.
I've heard some recommend using php-odbc/EasySoft because the mssql extension has been abandoned - yet others have said going the ODBC route isn't worth the performance hit.
The response to this stackoverflow question seems to touch on what I'm asking, however it's Windows centric.
Thank you!
I've had good results using PHP's PDO (PHP Data Objects) library for this sort of thing. There's an excellent tutorial at http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/. Just make sure you use the following template to initialize your database connection:
$dbh = new PDO("dblib:host=$host;dbname=$dbname", $user, $pass);
I use FreeTDS. It's far from satisfactory. In fact, I found your question because I live in hope that there must be a better solution and I keep looking for one. Unfortunately, FreeTDS seems to be the best option at the moment, if you're developing in a Linux environment.
If you were on Windows, you could obviously use the Microsoft SQL Server drivers for PHP which would be better, but even then there are missing features, like support for PDO lastInsertId().

Can I use Delphi to write to BDE and PHP to read from it?

I strongly prefer not to use additional 3rd party components, libraries or DLLs (at least in v1.0), unless there is absolutely no other solution.
Question: (how) can I use Delphi to progrtiamatically crate a BDE database and write to it, then use PHP to read from it?
Any URLs for examples of tutorial?
People are advising against it. Ok, the ultimate goal is some form of ODBC interface anyway. Someone mentioned ADO to me, but I don't see how to install it.
I need to crate the entire database and contents programatically in Delphi - at run time - I have no idea of it's contents or even name at compile time.
What's the simplest route for me? Thanks
Sounds like a bad idea to me, to be honest. BDE is long-since deprecated and I seriously doubt if you could get PHP to jive with it.
I would recommend using a standard database such as Firebird or MySQL for which established Delphi and PHP libraries exist, or XML if the dataset is not too large.
By BDE you mean Paradox or DBase? Wouldn't recomment using those anymore. I moved into Firebird and MySQL years ago just like Alan recommends.
Delphi supports Firebird/Interbase database out of the box AFAIK and PHP libraries exist for it. Other way around : MySQL support is in all PHP installations and there are some very good components for Delphi

Categories