Yii Framework Forum: Install Yii on XAMPP on Linux - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Install Yii on XAMPP on Linux Rate Topic: -----

#1 User is offline   hex 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 28-April 09

Posted 29 April 2009 - 09:42 AM

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?
0

#2 User is offline   ricardograna 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 376
  • Joined: 31-March 09
  • Location:Manaus/AM - Brazil

Posted 29 April 2009 - 03:07 PM

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
0

#3 User is offline   champico 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 20-September 10

Posted 20 September 2010 - 11:27 AM

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 ?
0

#4 User is offline   champico 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 20-September 10

Posted 20 September 2010 - 12:39 PM

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 !
0

#5 User is offline   silewi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 25-October 10
  • Location:London, United Kingdom

Posted 27 October 2010 - 04:39 AM

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
0

#6 User is offline   xavixjf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-July 11

Posted 07 July 2011 - 02:57 PM

"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.
0

#7 User is offline   Lanesa 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 04-December 10
  • Location:Lake Worth Florida

Posted 26 September 2011 - 01:17 PM

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
0

#8 User is offline   leventis 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 12-May 11

Posted 04 October 2011 - 05:31 PM

This might be old but someone could get some help

chmod -R 0755 /opt/lampp/htdocs

From theindexer.wordpress.com

Quote

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.
0

#9 User is offline   k42ban 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 04-October 11

Posted 05 October 2011 - 04:53 AM

Really useful, thanks.
0

#10 User is offline   leventis 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 14
  • Joined: 12-May 11

Posted 05 October 2011 - 06:36 PM

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.
0

#11 User is offline   Lanesa 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 04-December 10
  • Location:Lake Worth Florida

Posted 05 October 2011 - 08:21 PM

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!!!!!!!!!!!
0

#12 User is offline   wolfi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 04-October 11

Posted 08 October 2011 - 05:40 AM

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
0

#13 User is offline   mckain 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 24-October 11
  • Location:Localhost

Posted 28 October 2011 - 12:23 PM

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!
0

#14 User is offline   ALS 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 28-September 12

Posted 17 May 2013 - 03:15 AM

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...
1

#15 User is offline   Aril Apria Susanto 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-April 14

Posted 01 April 2014 - 05:58 PM

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users