FuelPHP 1.7 install on Windows

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

I developed FuelPHP 1.7 project on MacOS and planted it to Windows Server.
I stacked with some..

Copy whole sources to Windows

After copying all of the sources and access the system with browser.
I got an error message.

Install composer

This is because of lack of the composer.
Install the composer. However unexpected authentication required..

Proxy authentication

The error is due to proxy settings, so add proxy configurations to system variables.

Then, run again.

Activate openssl

Edit php.ini for enabling openssl.

And restart Apache and try again!

Git install

Therefore, download an installer “GitExtensions224SetupComplete.msi” from gitextensions and install!

That’s it. Windows… an annoying OS!

FuelPHP 404 page routing

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

How routing works

APPPATH/config/routes.php is supposed to handle the default routings.

APPPATH/config/routes.php

What if no _404_ routing?

If thee is no “_404_” routing description in routes.php, FuelPHP handles it for default routing using COREPATH/views/errors/404.php, while 500 errors take the same with 505.php.
FuelPHP >> Forums

404.php

Just an html file with the php extension.

Screen Shot 2013-10-15 at 12.16.19 PM

FuelPHP 1.6 REST delete() error

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

$model->delete() error

I’m establishing a REST web application with orm.
My REST controller is as follows;

The model “M_Company” extends Model_Soft.
The above code “delete_data()” is supposed to delete (update “deleted_at” column) data passed.
However, the result says

Seems nothing wrong with the code…

orm/classes/belongsto.php

I got an answer to solve the issue in FuelPHP forum.
FuelPHP >> Forums

I’ve copied the source of 1.6.1 to my 1.6 source and the issued was solved!!!!

FuelPHP application with Backbone.js model.save()

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

Backbone.emulateJSON = true;

I’ve working on a FuelPHP web application with Backbone.js and encountered an issue where model.save() sends a wierd dataset to the server.

That code seems perfectly fine, but the sent data is ..

What!? How come the whole object turned into a key of the sent object?
I was totally lost for 3 and an half hours.. Then, got the answer!

This convert the obj to this.

Happy :)

json_decode(Input::put(‘model’));

Now, move on to FuelPHP REST controller. The sent object data (Input::put(‘model’)) need to be decoded by “json_decode()”;

What a annoying staff! Happy though :)