Getting Started with Zend Framework2 - zend-framework2

I m reading the tutorial of getting started with zend framework2, when I came to this :
I don't know how to excecute this :
here is the link of the page : http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html
How can I achieve this?

i have written a throughout article on how to install Zend Framework 2 on a windows environment. It is directed at Win7, but works very similar (if not identical) for XP, too.
Please read my Blog "Zend Framework 2 Installation on Xampp for Windows"

Well, the best way to get started with Zend Skeleton Application is:
$cd my/project/dir
$git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive
$cd ZendSkeletonApplication
In your project root you will find two files: composer.json and composer.phar. You can get more information about composer from the official Getting Started.
The composer.json file describes the project's dependencies:
{
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "~2.4"
}
}
In order to get the dependencies you need to execute from you project root:
$composer.phar self-update
$composer.phar update
Finally, you can start the internal PHP cli-server in the root directory:
$php -S 0.0.0.0:8080 -t public/ public/index.php
I hope this will help you to install and configure your app.

If you're using Windows, please check your php.exe directory. And execute it. Example:
C:\php\php.exe composer.phar self-update
If you're linux user, you already know the answer.

Zend Framework 2 has just been release and it is not a framework for newbies. There are a few different ways to install which you can find on http://framework.zend.com/downloads
or with XAMPP at Xampp In Windows
But I have the feeling that if you are having trouble at this point then ZF2 is not for you.

Per chance if you were on a Mac or Linux box, you would open the Terminal application. Navigate to the zend framework application (cd /path/to/app), and then run the commands.

Related

How to install Zendframework-2 in wampserver?

i already install git, and composer.exe now i try to install zendframework-2 but it not work please provide rightway for installing zend framework-2.
please provide me right tutorial or video for install proper.
It is possible to install ZF2 as a library but that's not what I recommend. I think it's best to install ZF2 in every project from composer.phar. This makes it easier to master the updates of applications in production.
For ZF2, install the skeleton application that allows you to set up your project. This installation sets up ZF2 complete.
Make sure your Windows path contains php.exe and composer.bat
paths ;
Run in console : php "path\to\composer.phar" create-project -sdev --repository-url="https://packages.zendframework.com" zendframework/skeleton-application "directory/of/your/project"
For ZF3, follow : https://framework.zend.com/downloads

Add GData to Zend Framework2

Okay, so this has proven to be more difficult than I expected and think it should be.
All I want to do is utilize the GData library for some youtube functionality in my site. However, I can't seem to figure out how to add everything in so Zend recognizes the classes.
I've downloaded the latest ZendGdata archive, and added the contents of \library into \vendor\Zend. Next step is to autoload all that into my application right? I've tried searching for how to do it, but nothing has helped. Now I look to you, stackoverflow. Please help me figure this madness out.
How about ditching manually installing vendors and using composer which will manage all the autoloading stuff for you?
Download composer.phar into your project's root directory and run init to create a basic configuration:
curl -s https://getcomposer.org/installer | php
php composer.phar init
Follow the prompts, when it comes to searching for required packages, select zendframework/zendgdata and use the version dev-master. (If you decided to use composer for all your dependencies which I recommend, you could also at this point add zendframework/zendframework: 2.*).
Once you've done that a composer.json file will have been created. Next install your dependencies:
php composer.phar install
Once that's all done, there should be a vendor/autoload.php file that you require from your entrypoint to have autoloading of your composer dependencies working.

How to install ZfcBase (Zend Framework 2) without Git?

I apologize if this is a trivial question.
The installation guide for ZfcBase only provides this much info;
"Simply clone this project into your ./vendor/ directory and enable it
in your ./config/application.config.php file."
I don't have git on my shared hosting solution, but I am using composer.
Could anyone give me a generic way in which I can install Zfc modules without git? (I'm new to Zend)
Edit: I'm guessing I can wget the zip to my /vendor folder and unzip it there? But this wouldn't be good, as I don't want to manually update it if a new version comes in.
If you're using composer, then add "zf-commons/zfc-base": "dev-master" to the require section of your composer.json. so that it looks something like:
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.*",
"zf-commons/zfc-base": "dev-master"
}
Now you run:
php composer.phar self-update
php composer.phar update
On the command line.
If you're doing shared hosting you should first consider developing on your own local computer.
Then, once you're satisfied, zip it all up and transfer it all to your server.
Developing ON the shared server is not a good idea because, as you can see, you won't have all the tools necessary to develop.
If 'zipping' it up all the time is difficult or tedious you can use a build tool for that. Phing or Ant will do.
If you're making small changes I don't see TOO much of a problem doing it on the shared server; but even then, it's still better to do it on your local machine so you can take advantage of an IDE, version control, quicker network, better tool set and probably some other things.

How to install ImageMagick on Windows 7 (2)

Hopefully, despite similar question titles, this isn't a duplicate issue.
I've installed ImageMagick-6.7.5-6-Q16-windows-dll.exe.
I have php_imagick_dyn-Q16.dll renamed to php_imagick.dll in PHP's ext directory.
I have extension=php_imagick.dll in my php.ini.
I try to run a basic test: php -r "var_dump(class_exists('Imagick'));".
I get this error:
PHP Startup: imagick: Unable to initialise module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options must match.
CLI has stopped working.
Windows can check online for a solution to the problem.
> Check online for a solution and close the program
> Close the program
What have I done wrong?
First install :
Link
Download :
http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/
Choose the TS one
Open your php.ini file
Add this line :
extension=php_imagick.dll
Restart your apache server
open php_info()
Now your imagick lib is ready to use.
This works for me.

is symfony system wide?

i have a directory with some .php files in it...do i need to install symfony in that directory so that i can run symfony commands from that directory?? i tried: pear channel-discover pear.symfony-project.com
and got:
Channel "pear.symfony-project.com" is already initialized
the i tried: pear install symfony/symfony
and got:
WARNING: configuration download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable. Change download_dir config variable to a writeable dir to avoid this warning
Cannot install, php_dir for channel "pear.symfony-project.com" is not writeable by the current user
how do i fix this please? must i run it as sudo??
thanks
If I remember well, Symfony is "system-wide" if installed through PEAR (like you are trying to do).
Now it is recommended by the manual to do a "standalone" install through SVN. See http://www.symfony-project.org/gentle-introduction/1_4/en/03-Running-Symfony
As well, the sandbox will bring a "standalone" installation of Symfony (you will have to be in the project root directory to be able to run the symfony commands)
EDIT
Example of quick install using SVN:
mkdir /path/to/symfony
cd /path/to/symfony
svn checkout http://svn.symfony-project.com/tags/RELEASE_1_4_0 .
but it should be better to follow the manual and configure the external SVN sources.
I run servers where I have applications that use different versions of symfony simultaneously. I found it much easier to deal with the SVN checkout than the PEAR insteall.
So what I've done is do an SVN checkout of each revision that I need
into it's own folder. In my case i check them out to
/usr/share/symfony/(version)
Then I configure the ProjectConfiguration.class.php to reference whatever version is needed, using the line:
require_once '/usr/share/symfony/1.x.x/lib/autoload/sfCoreAutoload.class.php';
If I need to switch to a different symfony version, I can just change that config.
That is, assuming all my code is compatible with that version

Resources