Hi. I'm trying to get YiiFramework setup on a XAMPP local host. I've gone through all the steps up to the point of running yiic webapp. When I try to do this, it fails with the error "Could not open input file: c:\xampp\htdocs\YiiFramework\yiic I have checked to make sure that yiic exists there and it does. I've also checked to make sure I have admin privileges. I do. I'm just using the Windows Command Prompt to run the batch. What now?
Page 1 of 1
Install: yiic won't run. I'm stuck Newbie is stuck....
#2
Posted 27 August 2012 - 12:12 AM
Step-1 )Download Yii Framework Zip and Extract and Rename with YII
setp2 ) Put Folder in side c:\xampp\htdocs\YII
Then Follow Steps
http://www.yiiframew...start.first-app
setp2 ) Put Folder in side c:\xampp\htdocs\YII
Then Follow Steps
http://www.yiiframew...start.first-app
#3
Posted 27 August 2012 - 02:42 AM
Try yiic.bat instead.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
#5
Posted 27 August 2012 - 09:52 AM
I already tried all of these things and searched the forum to see if anybody else has encountered this BEFORE I opened this topic.
None of these ideas have helped yet.
If I could understand what was going on inside the yiic batch file, maybe I could unravel it.
I must have missed a step on the setup:
But, this just doesn't make any sense to me. Here's what's in the file:
What is YII_PATH being set to with "%~dp0"
The condition "%PHP_COMMAND%" is probably returning false, so the command doesn't execute. Why?
None of these ideas have helped yet.
If I could understand what was going on inside the yiic batch file, maybe I could unravel it.
I must have missed a step on the setup:
But, this just doesn't make any sense to me. Here's what's in the file:
@setlocal
set YII_PATH=%~dp0
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
"%PHP_COMMAND%" "%YII_PATH%yiic" %*
@endlocal
set YII_PATH=%~dp0
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
"%PHP_COMMAND%" "%YII_PATH%yiic" %*
@endlocal
What is YII_PATH being set to with "%~dp0"
The condition "%PHP_COMMAND%" is probably returning false, so the command doesn't execute. Why?
#6
Posted 27 August 2012 - 10:06 AM
I found the answer to the last question on Stack Overflow:
So, basically, all this batch file does is to start php.exe and then run yiic.
I'm wondering....maybe the batch file doesn't know that it should run yiic.php instead of yiic.bat...
AHA!
I changed the yii.bat file to specify what php is supposed to run, like this:
IT WORKED! I have YII!
YIIPEEE!
"The variable %0 in a batch script is set to the name of the executing batch file. The ~dp special syntax between the % and the 0 basically says to expand the variable %0 to show the drive letter and path, which gives you the current directory containing the batch file!"
So, basically, all this batch file does is to start php.exe and then run yiic.
I'm wondering....maybe the batch file doesn't know that it should run yiic.php instead of yiic.bat...
AHA!
I changed the yii.bat file to specify what php is supposed to run, like this:
%PHP_COMMAND%" "%YII_PATH%yiic.php" %
IT WORKED! I have YII!
YIIPEEE!
Share this topic:
Page 1 of 1

Help













