SQLite support for PHP 4.2.3 - php

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...

Related

Is Cassandra-PDO for PHP stable?

I'm new to Cassandra and I'm looking for the best way to integrate it with PHP.
As always there are many clients but it looks like most of them are not being supported. From what I've seen the most up to date is PHPCassa, unfortunately it doesn't look like it was designed for CQL (which as I understand is the preferable way to talk to Cassandra).
Cassandra-PDO looks interesting because it's using PDO abstraction, and I can (probably?) use high level libraries like Doctrine or Propel with it. Unfortunately the last commit was pushed about 2 years ago and it was very difficult to compile it (to be fair, it was probably a Mac / Thrift issue). I'm always very paranoiac about building something around "rusty" projects, so my question is:
Is it safe to use Cassandra-PDO with Cassandra 2.x? If it's not a good idea should I forget about CQL and go for PHPCassa or perhaps there is another solution?
This might help: https://github.com/Orange-OpenSource/YACassandraPDO
"This repository is a fork of:
https://code.google.com/a/apache-extras.org/p/cassandra-pdo/ We cloned
it on GitHub because the original project seemed to be dead.
This version is developped for the CQL3 target only. We do not provide
any support for former versions of CQL."
HTH,
Carlo
To my knowledge YACassandraPDO not stable.
Please check this PHP library http://evseevnn.github.io/php-cassandra-binary/
It is written by me, and how to work with it is similar to the PDO wrapper. Maybe it will suit you.

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.

Protect my PHP App

I have developed an app and its written in PHP (with a bunch of SQL scripts), this app will be used by a few small companies. For them to use it, I will have to install Apache and SQL Server for them.
Every method I have thought has fallen short of what I need. I was actually just hoping to use ZendGuard or IonCube but they don't support PHP 5.3.x.
Is there a simpler method where I can maybe store a key in the database and make the app run only when it knows its on that server?
Maybe create a key based on some random numbers/letters and the machine name, sql server host name and encode/decode this when ever the system is in use?
Thanks all for any help or ideas
Even if Zend and Ioncube don't support PHP 5.3 code (which I find hard to believe!! Are you sure?), I'm sure they will in the foreseeable future.
I think it's worth asking them when they are going to introduce support for it.
Update: It indeed seems true: Zend but then, the question is, does your software really need 5.3 (i.e. use 5.3 specific features like namespaces and such?)

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

Finding exact requirements for a php application

I am developing a php application which my customers will download and install on their own servers. I know the base requirements for my application (like min. php version) but is there a way to generate a list of requirements that needed to run my application on windows or unix systems?
Thanks.
You mean, generate a list of requirements based on an analysis of your source code?
While in theory, that might be possible, I don't think such a solution exists. I think there is no way than analyzing your code by hand, with the PHP manual very close by.
Do you use GD? Then you need PHP with the GD module. Do you need to create GIF images with GD? Then you need GD, but not between versions 1.6 and (I think) 1.8. Do you use PDO? Then you need PHP > 5.1.0. And so on and so on.
In short, I'm afraid think this is going to be a manual process. Manual also as in "PHP manual" - the User Contributed Notes to each function and method are a gem, and any common cross-platform problems are usually noted there somewhere.
While you can trust that PHP x.y.z has a defined set of functions and behaviour, be sure to test well before you declare something suitable to run on a different server. IIS's support of PHP is way better now, I'm told, but the last time a ported a big PHP application over to IIS, it took me three days to work around all the mysterious bugs.
Just be aware of what you are using. For example, you should clearly communicate if you need something like .. a special database binding ( other then mysql ), xml libraries etc.., or even better, create an installer that is bundled with your software that checks that kind of stuff.
Other than that, there should be no problems concerning different servers ( apache / iis / fastcgi.. ). So to answer your question: you have to generate that list all by yourself.
As others have said, you'll need to manually keep track of special libraries and functions you're using. If you need PHP4 compatibility then you won't be able to use the built-in XML libraries for example. You can also check the list of functions added to PHP 5.
One thing I would recommend is installing WampServer if you have access to a Windows machine. Aside from being good for local development, you can download modules for most Apache/PHP/MySQL versions and test combinations.

Categories