I have to rewrite PHP project, and as a person who comes from CI and Kohana frameworks I'am looking into using FuelPHP - times changes, time to try something new. Only this project requires PostgreSQL.
I'am very new to FuelPHP, so my problem explanation can be foolish :). I've installed pgsql PDO module, set database, etc., so everything what PHP and PostgreSQL itself requires for work is set.
Now I want to know, is it possible, to get FuelPHP work with PostgreSQL? As I understand in current 1.3v only way is PDO, but for me somehow it doesn't work - no connection or select errors, just empty selects. I red somewhere that in 2.0v pgsql will be supported better, bet I don't think it's solution to use 2.0v beta release. :)
Currently I'am trying to understand if it will be possible to use FuelPHP for this project, because it's a long term work - ~6 months for rewrite for one person - but after that there will be included more programmers.
It is not perfect but FuelPHP works PostgreSQL. At least you can CRUD.
See http://docs.fuelphp.com/classes/database/introduction.html
There is a example configuration for PostgreSQL
// a PDO driver configuration, using PostgreSQL
Related
I am starting to implement an e-commerce module with PHP. I analyzed and get prestashop is perfact for my requirement. I read almost all documentation of prestashop but I never find mongoDB. I decided to use database mongoDB. But I am not sure how to use it with prestashop.
Can anyone help me here?
I won't be possible because all classes and module use SQL queries;
I would be theoretically possible to build your own Db driver implementation, but then again you couldn't use it since it needs to process SQL.
Currently there are 3 Db driver type: PDO, mysqli and MySQL, the best one is selected based on server PHP version.
I am currently using RedBean version 3.5. I think I would like to move to the latest version of RedBean, version 4.
I have found no documentation about upgrade process, other than an indication it is not straightforward.
My questions are:
Is my RedBean 3.5 database schema compatible 4, or will up have to migrate all of the tables to some new format?
Is any of my RedBean 3.5 code compatible with version 4, or will I need to rewrite my code that uses RedBean 3.5?
I have taken the lack of answers provided for this question to be another sign that it is time for me to leave RedBean.
I have started the transition to Eloquent - Illuminate. I am just barely into the migration, and already I like Eloquent better, and I wish I had switched to it earlier. Some reasons why:
significantly more documentation available on the web
more explicit mechanism for defining entity relationships
control over table names
support for migrations
support for composer (RedBean 4 no longer provides this)
I was really looking forward to using the migration features to update my table names to more readable versions of the RedBean auto-created table names. Unfortunately, using artisan is not practical without a full install Laravel. So I will implement migrations with Phinx.
When I upgraded from RB3.x to RedBeanPHP Version 4 there was not much to do. I just exchanged rb.php library file, added some namespace stuff and this was just it. The database was left untouched and everything worked fine.
Nevertheless I am still using the Cooker plugin, because R::dispense( $beanAsArray ) does not load beans with id given and does not ignore empty fields which is needed when beans are coming from HTML forms.
RB4 is still available for use with Composer, as far as stated here https://github.com/gabordemooij/redbean.
I've been searching for a Modern PHP Framework just like this post's title. I've tried Yii, Laravel, Doctrine, they do not support that (I really like Laravel).
I've been using good ol' AdoDb PHP DBAL library for SQL Server in Linux, but combine it with Laravel seems impossible...
Anyway, I'm going to check CodeIgniter, SilverStripe, CakePHP, and Zend Framework (last).
If all fails, then I just go with Laravel and make web-service-interface for SQL Server using NodeJS, but the power of ORM will be gone.
I just need some pointers, suggestion, success stories, or anything...
Thanks
EDIT01
Maybe PHP Framework with some kind of technology like Ruby's ActiveResource where the database model is a RESTful web service?
I'm looking for a good php framework with support for handling database migrations. Ideally I would like to be able to run a command that generates a migration script, one that updates the database with changes and can handle rolling back those changes. Is there anything out there that does this?
The Doctrine project supports migrations - http://www.doctrine-project.org/projects/migrations/2.0/docs/reference/introduction/en
Hmm, that documentation is a bit lacking, at least in the introduction. Hopefully it gets better as it goes on.
Whilst most popular in Symfony, this can easily be integrated into other frameworks or even used on its own.
Promising, but not yet have a stable version : https://github.com/fuel/fuel
There is a new php framework called Laravel and it has migrations the same way as ruby on rails. It seems so pretty!
You can find it at http://laravel.com/
Migrations Docs
In addition, the framework introduces the idea of bundles, what can give to your project a great modular view.
If you try it, tell us your experience! :)
symfony - http://www.symfony-project.org/
In symfony you can write database schema using ORM like Propel, it is independant from database driver. If you have a database already, you want to migrate to a different db, I think you can dump the db, change the db config, and re-import it to the new db. (though I have not tried it myself.)
There are much php framework over there that can use any database. For example Zend, Ci, Cake and many others. One thing you should do is change database type that's usually stored in configuration file. And then migrate your database manually. No framework that can generate migration script automatically. U can also use ESF for database migration
I am searching for DAL or ORM (Only ORM no MVC) Solution in PHP5 that can efficiently access SqlServer.
I am new to SqlServer. and I need to code a part of ASP.net website in PHP5.
I am currently Using QCodo However its codegenerator is making some problem with ASP's own tables (?? the ASP Guys told me that its for ASP's Membership Management. and these tables are handled internally).So I need some alternative solution that can work in this situation too !!
I've wrestled with this for quite a while and there are a few key points that you need to be aware of when it comes to SQL Server and PHP.
The driver of choice is currently the 2.0 release of the Microsoft Drivers for PHP for SQL Server. You can find more information about that driver here. I installed it using the Microsoft Web PI application.
As of this post, I know of only 1 ORM that supports this driver and that is Propel. That being said, Propel's generator has a dependancy upon Phing, which is best installed via PEAR. After wrestling with trying to get all of this working in Windows Server 2k8, I gave up and I'll just be writing my own wrapper or using the native PDO functions.
Several options, from more to less complex:
Doctrine
Propel
Zend_Db
The three of them support MSSQL through PDO's MSSQL Server extension.