CodeIgniter Forums
codeigniter 2.0 command line on WINDOWS - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: codeigniter 2.0 command line on WINDOWS (/thread-39121.html)



codeigniter 2.0 command line on WINDOWS - El Forum - 03-01-2011

[eluser]sharpay[/eluser]
hello all,

I have upgraded to CI 2.0 and am trying to run a script on the command line on a windows machine.

I have set $config['uri_protocol'] to 'CLI'.

but when i run the script at the command prompt I end up with the "your system folder path isn't set correctly" message.

The system path in index.php is $system_path = "system";

The system folder hasn't been moved, its in the standard position.

The command entered at the command prompt =

H:\xampp\php\php.exe H:\xampp\htdocs\call_monitor\index.php

I bet im doing something stupidly wrong...

thanks for any help.


codeigniter 2.0 command line on WINDOWS - El Forum - 03-02-2011

[eluser]sharpay[/eluser]
just tried this with fresh copy of CI 2.0. same error message.


codeigniter 2.0 command line on WINDOWS - El Forum - 03-02-2011

[eluser]Phil Sturgeon[/eluser]
You are doing this correctly, I just made a slight oversight when creating this CLI support and only had it set up to work if index.php was in the "current directory". The next version of CodeIgniter Reactor (2.0.1) will work as you expected.

If you were to go to BitBucket and download the "tip" (that is more recent and different to the "2.0" tag) then this will work too.


codeigniter 2.0 command line on WINDOWS - El Forum - 03-02-2011

[eluser]sharpay[/eluser]
hi,

tried the above but still same error.

i also tried a brand new installation of CI from bitbucket. No luck.


codeigniter 2.0 command line on WINDOWS - El Forum - 03-02-2011

[eluser]Phil Sturgeon[/eluser]
Did you download tip or 2.0.0? Got much experience with BitBucket and Mercurial?

Either way it is the index.php that will set the current working directory. Did you remember to replace that?


codeigniter 2.0 command line on WINDOWS - El Forum - 03-03-2011

[eluser]sharpay[/eluser]
ha ha ops i didnt download the tip.

Its working as it should now.

Many thanks for that.