I am trying to create a basic web app in zend Framework 1 and in around the web I mostly saw the tutorial for installation of ZF2 or latest.
I have followed the instruction from Zend quickstart and I have downloaded the .tar.gz and extracted to my localhost and when I run the app appending /public or /public/index.php it shows the error like below.
Please let me know if I am going in a wrong way or probably instruction to start in a correct way.
You forgot to add library into your project, Please check the Zend/ folder under library/ folder.
First make sure that you have zend framework install, if not install by typing
sudo apt-get install zend-framework
Then go to your project folder
cd /path/to/your/project
Then go to library folder of the project cd /path/to/your/project/library
Then run the command ln -s /usr/share/php/libzend-framework-php/Zend
Restart your server service apache2 restart
and thats it.
Related
I am running windows 10 with the ubuntu subsystem installed as my localhost. I have composer installed on that and when I try to install the yii2 basic application it goes through the process correctly but when i open the yii2 basic application in my browser I get:
Failed to change permissions for directory "/mnt/c/Users/andre/zype/staff-tools/web/assets/89851207": chmod(): Operation not permitted
If I then change permissions on the yii2 installation file structure with
sudo chown -R www-data:www-data .
the application loads but the web/assets folders are missing so my application has no styling. I am unsure if this is a composer issue or a yii2 issue but it looks like permissions to me.
Try changing the permission of 'assets' folder most likely to 777 (all users can access this file)
your-project/web/assets
Well this solution works for Linux users. Will require to check for windows
Follow Steps
Step 1- Install Composer (I installed it through bash)
Step 2- Now in cmd use following command
composer create-project --prefer-dist yiisoft/yii2-app-basic yii2-basic-check
Output (Last Lines)-
chmod('runtime', 0777)...done.
chmod('web/assets', 0777)...done.
chmod('yii', 0755)...done.
Step 3 - Open "http://localhost/yii2-basic-check/web/" URL in browser.
It worked fine for me
Important: Windows Subsystem for Linux has many serious problems with file permission. So, I advise not to install Linux programs and it's files in Windows drives i.e. DRVFS (/mnt/c). Also as PHP frameworks need many files, it will be better if you install distributions in another internal NTFS drives other that C:\ drive.
Steps: Place/clone the required project files/repositories in current user's home folder e.g. /root, /home, /home/user. Do not place the files in C:\ drive aka. /mnt/c otherwise WSL will not follow their permissions correctly. Here is an example of the installation procedure from YiiFramework: The Definitive Guide to Yii 2.0.
Install required packages: sudo apt-get install php php-cli php-common php-mbstring php-xml php-zip zip unzip
Go to user folder: cd ~
Download composer: curl -sS https://getcomposer.org/installer | php
Install yii2-basic: ~/composer.phar create-project --prefer-dist yiisoft/yii2-app-basic basic
Go to project folder: cd ~/basic
Run PHP server: php yii serve
Open server in browser at localhost:8080 (default port 8080).
I'm using the official docker images for apache and php : https://hub.docker.com/_/php/ (the 5.6-apache tag)
I'm launching the container like this :
docker run -d -p 80:80 --name apache-php56 -v "/home/myUser/www":/var/www/html php:5.6-apache
Of course, I have all my code in "/home/myUser/www"
When I am in a directory with an index, it seems like apache is displaying the page pretty well. However if I am in a directory without index, apache tells me that I don't have permission to access.
I would like apache to show me the "classical" view when there is no index with the "Name Last modified Size Description" and I can navigate through until I find an index.
I'm pretty sure this is a simple config in the default apache2.conf that forbid me but I have no idea which.
Thanks by advance.
I had the same problem with my symfony project while using docker. The problem was that the .htaccess file was missing in the web folder.
You can create one by your self or you can install symfony/apache-pack with composer if you use symfony.
An example .htaccess can be found in the symfony documentation for web server
PHP API using: https://github.com/sandeepshetty/shopify_api
I have PHP 5.3.27 installed
I installed Composer (by going to
the website and using their install.exe)
It mentions that
"This will download shopify_api into the
vendor/sandeepshetty/shopify_api directory."
But I do not see the folders or files anywhere on the computer.
The plugin author is saying that if you download Composer with the instructions he provided (via Terminal), then Composer will autoload those files for you. Unfortunately, though easier, simply going to the source URL for the Composer tool won't do that for you.
First, make sure you have created the composer.json file and stored it in your project directory. Then, log into your server or system via the command line (Terminal for Mac OS, Putty for Windows). Cd into your project directory, and install by entering these commands:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install
I have a Macbook pro with Lion(10.7.4). I am new in this environment. I was trying to install Zend Framework and zend command line Tool in my mac. I already installed XAMPP ...
i follow the structure that i read from a book ....
{
Here are examples of commands you can use to perform these tasks:
shell> cd ZendFramework-XX
shell> mv library/* /usr/local/lib/php/
shell> mv bin/* /usr/local/bin/
shell> chmod +x /usr/local/bin/zf.sh
shell> ln -s /usr/local/bin/zf.sh /usr/local/bin/zf
}
But it does not work for me, I don't know why.
When I run zf - help in a terminal I got a error that tell me the include_path in not define.
How can I fix that or how can I install and run zend framWord correctly.
If you are starting a new project, I recommend using Zend Framework 2 not 1.
Here are 2 useful links from the ZF2 quick start guide that will help:
ZF2 skeleton applicatoin
ZF2 tool
Try that & let us know how you get on...
I Want to install the propel in my windows local server,I was looking at the guide but am not sure how to run their commands.any one can explain me how should i proceed with that?
Their instructions boil down to:
Go to whatever the owner project is and create a folder called vendor. Or go to some other folder if your project doesn't use that convention.
Put the source code in that folder.
TA-DA! Propel is installed. ;-)
If you'd like to use Propel's command line tools, it will take a bit more work.
If you're using WAMP you might be able to find pear by running <drive>:\wamp\bin\php\php<version>\go-pear.bat, but that isn't always consistent.
XAMPP has pear available by default at <drive>:\xampp\php\pear.bat
Once you've found pear, then either cd to the directory or call path\to\pear.bat channel-discover pear.phing.info (replace channel... with all of the other pear commands)
For your purposes this line: ln -s vendor/propel/generator/bin/propel-gen propel-gen should be "Make a Windows shortcut to vendor/propel/generator/bin/propel-gen called propel-gen and place it in your project folder"