Install Yii on XAMPP on Linux
Posted 29 April 2009 - 09:42 AM
when i run
% cd WebRoot/testdrive
% php YiiRoot/framework/yiic.php webapp WebRoot/testdrive
i get the following error
php command not found, although on my localhost i see the xampp installation.
Does anyone run Yiic on XAMPP in Linux?
Posted 20 September 2010 - 12:39 PM
sudo apt-get install php5-cli
I don't know how to use the command line with Xampp or where is the path to php.
by installing php5-cli it tells me the path, I just created a new application this way
/usr/bin/php5 webroot/yiiroot/framework/yiic.php webapp webroot/testdrive
hope it helps !
Posted 07 July 2011 - 02:57 PM
If you are using lampp the webroot is: /opt/lampp/htdocs/testdrive -> you must create a folder, it would be named testdrive or whatever you want it.
In my case i unzipped the yii framework in the folder /opt/lampp/htdocs/yiif and my webapp will be in /opt/lampp/htdocs/yii
First, open the terminal
/opt/lampp/htdocs/yiif/framework/yiic webapp yii
That worked for me.
Posted 26 September 2011 - 01:17 PM
lanesa@lanesa-mocha:~$ cd /opt/lampp/htdocs
lanesa@lanesa-mocha:/opt/lampp/htdocs$ yii/framework/yiic webapp htdocs/testdrive
/usr/bin/env: php: No such file or directory
Posted 04 October 2011 - 05:31 PM
chmod -R 0755 /opt/lampp/htdocs
$ export PATH=/opt/lampp/bin:$PATH
if you would like to have that bin folder inserted in your path every time you login
edit the file .bashrc located in your home folder (ubuntu) for other distro it is .bashprofile
$ sudo gedit /hone/salimane/.bashrc
and add at the end of the file
For mint and later versions of ubuntu it might be a better idea to add it under
That way when you:
php framework/yiic.php webapp projectName
php will be recognised.
You can then go ahead and change the permission of that folder to be writeable by your user.
chgrp -R userName projectName/ chown -R 0775 projectName/
If you need more information on how to install lampp for linux follow the instructions under:
I hope it was helpful.
Posted 05 October 2011 - 06:36 PM
If you just get the error page
'Unable to resolve the request"site".' in /opt/lampp/htdocs/framework/web/CWebApplication.php:281
Make sure your permissions are set correctly, and your class filenames match the class name (case sensitive)
I migrated from windows to linux, both running xampp.
My mistake was to have all the files permissions set correctly, but the copied folders didn't.
Posted 08 October 2011 - 05:40 AM
To set the right permissions to the /var/www/html folder I create a group apache (file /etc/group), then set the permissions with the commands "chgrp -R apache ./" and "chmod -R g+rw ./" below the right folder (under Fedora: /var/www/html and if necessary also below the yii folder).
If it shows any timezone related issues, it's necessary to set a timezone in php.ini
Posted 17 May 2013 - 03:15 AM
~$ /opt/lampp/ (its my directory)...
this is how i'm install it;
~$ sudo /opt/lampp/bin/php /opt/lampp/htdocs/yii/framework/yiic webapp /opt/lampp/htdocs/yourproject
~$ sudo /opt/lampp/bin/php
is php executable inside xampp, and
my directory of yii (use "sudo mv" to change folder yii from source),
is yiic command to make new project.. and last thing
is directory of xampp htdocs with name of myproject "yourproject"
maybe help for all of you,, and sory if my language was bad...
Posted 06 November 2014 - 11:36 AM
# cd /opt/lampp/bin/ # ./php /opt/lampp/htdocs/yii/framework/yicc webapp /opt/lampp/htdocs/myweb
Machine : Linux Mint Petra
Server : XAMPP for Linux 126.96.36.199
only a error -->yicc ==>yiic
cd /opt/lampp/bin/ ./php /opt/lampp/htdocs/yii/framework/yiic webapp /opt/lampp/htdocs/myweb