hex
(Hexaust)
April 29, 2009, 2:42pm
1
I cannot create an application on linux
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?
rickgrana
(Ricardo Grana)
April 29, 2009, 8:07pm
2
you have to add the php.exe path in your PATH environment variable.
I dont use Linux, so I dont remember the exact command to do that
champico
(Fokeme)
September 20, 2010, 4:27pm
3
Hi people I’m new to the forum, I have the same problem as hex, I can’t start a new application using the Yiic tool.
I’m using Xampp on linux ubuntu, any idea ?
champico
(Fokeme)
September 20, 2010, 5:39pm
4
I just found a solution to my problem by installing PHP5 on my server
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 !
silewi
(Simon)
October 27, 2010, 9:39am
5
Hex, you probably worked it out by now but for benefit newbies who have similar problems
page 6 and 7 of this guide on this thread explains what you need to do.
actual pdf
xavixjf
(Vjfs18)
July 7, 2011, 7:57pm
6
"webroot" is the folder where your application is going to be installed and "Yiiroot" is the folder you unzipped the Yii framewoork
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
then write:
cd /opt/lampp/htdocs
next write:
/opt/lampp/htdocs/yiif/framework/yiic webapp yii
That worked for me.
YesItIs
(Lanesastubbs)
September 26, 2011, 6:17pm
7
I’m having the same issue. I’m running xampp and need some help getting the yiic command line tool to generate the app. Here’s the error messages I’m getting.
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
leventis
(Leventis123)
October 4, 2011, 10:31pm
8
This might be old but someone could get some help
chmod -R 0755 /opt/lampp/htdocs
From theindexer.wordpress.com
If you have not yet put the bin folder “/opt/lammp/bin” in your path, run at the command prompt
$ 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
export PATH=/opt/lampp/bin:$PATH
For mint and later versions of ubuntu it might be a better idea to add it under
/etc/bash.bashrc
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:
www.apachefriends.org
I hope it was helpful.
leventis
(Leventis123)
October 5, 2011, 11:36pm
10
I am glad it is helpful.
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.
YesItIs
(Lanesastubbs)
October 6, 2011, 1:21am
11
Thank you so much!!!!!!!!!!!! I ended up having to install a VM in VirtualBox and setting up LAMP to use it but now I’m going to set it up on my default system. Thanks!!!!!!!!!!!
wolfi
(W Pirker)
October 8, 2011, 10:40am
12
I also use Linux as default. Most bigger Linux distros use own Apache server packages. For example under Fedora one could use this guide: forums.fedoraforum DOT org/showthread.php?t=94257 (interesting steps: HTTPD (PHP enabled) and MySQL)
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
mckain
(Mckain Default)
October 28, 2011, 5:23pm
13
I use Linux and I do not use Xammp or whatever (no offenses), you should use APACHE and PHP running right away! in your Linux box! It’s better in that way!
als
(Achmadluckysetiaji)
May 17, 2013, 8:15am
14
i just wondering some nice path to install yii-1.1.13 with xampp on ubuntu 12.XX. You must try install it from xampp directory, if default directory like this:
~$ /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
where:
~$ sudo /opt/lampp/bin/php
is php executable inside xampp, and
/opt/lampp/htdocs/yii/framework/yiic
my directory of yii (use "sudo mv" to change folder yii from source),
webapp
is yiic command to make new project… and last thing
/opt/lampp/htdocs/yourprojec
is directory of xampp htdocs with name of myproject "yourproject"
maybe help for all of you, and sory if my language was bad…
awriel
(Awriel)
April 1, 2014, 10:58pm
15
Maybe can be alternavite too :
# cd /opt/lampp/bin/
# ./php /opt/lampp/htdocs/yii/framework/yicc webapp /opt/lampp/htdocs/myweb
Machine : Linux Mint Petra
Server : XAMPP for Linux 1.8.3.1
Maybe can be alternavite too :
# cd /opt/lampp/bin/
# ./php /opt/lampp/htdocs/yii/framework/yicc webapp /opt/lampp/htdocs/myweb
Machine : Linux Mint Petra
Server : XAMPP for Linux 1.8.3.1
only a error -->yicc ==>yiic
cd /opt/lampp/bin/
./php /opt/lampp/htdocs/yii/framework/yiic webapp /opt/lampp/htdocs/myweb