Maybe Useful for you!

 

PHP CLI PROBLEM

January 4th, 2008

Today i’am was learning new web development technology, that is cakePHP web development framework. Yeaahh cake! web development that doesn’t hurt. And i wanna be a professional baker :D .

So what’s the relation with cakePHP ? i will not explain what is cakePHP and why use cakePHP. I just want to share my solved problem when working with cakePHP when baking MVC using its console. If your are also a baker, you absolutely know why we are using php command line interface? and you are really same with me if you are using XAMPP for all in one server for web development. Why because i not want to be headcache for doing configuring, compiling, and man other suck tasks. Just unpack the XAMPP package, and you are ready for use it! Your life happy, and you have much time for your girlfriend to get a date with you!

But, unfortunately PHP CLI for the PHP 5 in XAMPP is not compiled in order support with MySQL, and other database extensions. So..? what we must do?
Use php cli for php 4. PHP CLI for php4 is good enough executing all of php application in cakePHP console that had been using pure PHP 5 Object Oriented Programming features.
Find PHP CLI for PHP 4 in xampp\php\php4\phpcli.exe

In order you can use it without any problem happen, you must follow this steps first :

  1. Set the your windows Environment variable. find in, right click My Computer, and go to Advance tab, and click the Environment Variables butto.  Set the Path variable in the System variables group. Add the new value to the existing line with semicolon for separatinhpg new value. Add this value : drive_leter_where_u_save_xampp:\xampp\php\php4 . click Ok, and click Ok again, restart your computer, finish!
  2. You must use php cli with its important option. The options -c . For more information type phpcli -h in your console

Now you can use php cli for php cli for php 4 and free from suck error message and problem.

Example Use :

I used php cli for php 4 for my web app development with cakePHP console.
phpcli -c \xampp\php\php4\php.ini console\cake bake all

Enjoy..

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Reply