I have downloaded the file from Git
https://github.com/zendframework/ZendSkeletonApplication/archive/master.zip
and then unzip the file to the working directory.
i have got the error like 'Unable to load ZF2 ...'
i have downloaded the library files and pasted in vendor folder and also created the Envorinmental variable. but still the same issue.
I have come across many such issues in this forum, but no once has said about running/installing Zend OFFLINE.
Can you guys, please give an idea how to install in both windows and ubuntu
Downloading a full copy of Zend Framework 2 separately and extracting it into vendor/ZF2/library should do it. (To see if it worked see if you ended up with a file at vendor/ZF2/library/Zend/Loader/AutoloaderFactory.php.)
If not you'll need to debug a little in init_autoloader.php to see what's going on.
Doing it 'live' with Composer will make your life easier in the long run though.
Related
Looking for brilliant mind to help me fix my problem. I have inherited a Laravel v5.3 project, and the project should be able to pass CV's from html to .pdf. They have been using spatie/browsershot for that task. But for some reason the package won't write the damn file.
I have been looking at the html passed to the function, and it all checks out. So I went to the guide on Github and put this line of code into the codefile as the only one left in the function.
Browsershot::html('<h1>Hello world!!</h1>')->save('example.pdf');
No matter what I do, I get this error message:
Spatie \ Browsershot \ Exceptions \ CouldNotTakeBrowsershot
For some reason Chrome did not write a file at `example.pdf`.
I have also tried giving an absolute path for Browsershot to save the file at. But no matter. I have looked up many different guides the past two weeks, but nothing seems to work atm. Puppeteer is also installed locally.
I'm running a Windows 10 machine btw, with latest updates, if that matters.
I had the same issue in a PHP project. Installing the puppeteer package worked for me.
npm install puppeteer
I have not every used, or even installed the Zend Framework.
I have inherited a website built in the ZF and only have FTP access to the deployed version that is live.
Is it possible to simply download the files that are live and run then locally within XAMPP, as i have tried this but ther server has lots of short cut director mappings and no ZEND?
I am assuming not, so can i install Zend and then download the site to my local machine for it then to work?
Any assistance on this would be helpful as have no idea about it, whether i need source files or not.
Thanks
Shaun
once you have the project downloaded in xampp. make sure you have composer installed and configured.
delete the vendor folder inside your project then run
composer install
under the root of your application.
I'm trying to install Zend on my ubuntu 14.04 + Nginx.
1) I have downloaded zend via composer
composer require zendframework/zendframework 2.5.0
2) Tell php location of zendframework via include_path. Something like that
include_path = ".:/usr/share/php:/home/dmitriy/zend/vendor/zendframework"
Folder looks like:
Zendframework folder
At this step, I thought that everything is almost done, and i need to download skeleton application to launch index.php.
3) I downloaded zip form Zend Github Repository. Extracted it.
Created nginx entry point to /public/index.php.
What I get at finish:
Page w/o images,css, etc.
Console:Console with wrong paths
Links are not reachable...
Can someone tell me:
1) Is step No:2 required?
2) Why links are broken?
3) Zend(1.11) library have another structure, maybe it is problem here and I have download wrong files?
Or give me links for ubuntu+nginx guide, i could not find.
Thank you.
You seem to be trying to install ZF2 rather than ZF1, so you can drop all the old bad practices such as modifying the include path to include a library.
Please have a look at the official tutorials to get started: https://docs.zendframework.com/tutorials/
Short version: you can download a "skeleton" rather than the librar(y|ies). A skeleton is a fully configured Zend Framework MVC project, you can then tweak it to suit your needs.
On another note, most php projects do not use the include path to autoload libraries for a few years now, and use Composer and the PSR-0 and PSR-4 recommandations. As you only seem to get started, I'd recommand you read a bit on PSRs, and then follow a ZF3 or Zend Expressive tutorial to get started, and not bother learning a legacy framework (even though ZF2 and ZF3 are really similar).
SOS! SOS!
After a good day of work and testing out everything, I committed my work. Except, this time, instead of
git commit -u
I used
git commit -A
because I was fed up of the untracked files alert I was getting about some of the zend files like doctrine, composer etc. And boom! the project has stopped loading.
I tried going back in my log, hoping that a previous commit should work, but nothing is working.
My question is:
1. How to remove the zend files from the commit
2. How to clean this mess?
Please help!
The world is beautiful again.
Sharing the stack of mistakes I did, so that it may help someone someday:
Committed zend framework files with the project files. Specially the vendor ones. NEVER do that. .gitignore them
After committing, when I moved to a previous branch, the project started throwing 500, because it was not able to find all the zend files. (git was trying to reset the files to the previous stage and I presume there was a mismatch in the zend framework files)
I added another blunder to this sequence by doing a php composer.phar install in the zend folder, expecting that the missing files will be regenerated.
Solution:
1. Did a soft reset: git reset --soft HEAD~3 to go back to a stable commit
2. Removed all zend files
3. Recommitted the desired files
4. This is when I started getting badmethodcall from zend/navigation/navigation. This was because composer install, loaded zendframework folder in the vendor folder in addition to ZF2 folder. There should be only one shared library folder in the vendor folder. Now, why was zendframework taking precedence over ZF2 with regard to rendering the menu - I have no clue. But I deleted the zendframework, and butterflies started singing.
Thanks to anyone who tried to help me.
I am currently trying to install Omnipay into my Codeigniter project. I am stuck on windows because I do not have ssh access to the box where this needs to run on. So far I have gotten a new directory in the project root that is named "vendor" and it contains a lot of empty directories referring to Symfony (for what reason is beyond me).
Then I get a runtime exception that I need to enable the openssl extension in my php to download the necessary files and this is where I am stuck at. I don't run WAMP on my computer and I just use the php.exe I downloaded to work with netbeans.
Isn't there an easier way to get omnipay to run? Like just download the files from somewhere and plug them into my project like normal? It seems to be an aweful lot of headache to get a simple library to run in my CI project.
Please forgive my ignorance towards composer but I currently see no benefit of using it for this particular project.
You can "just download" the files here: https://github.com/omnipay/common/archive/master.zip
The problem is, Omnipay depends on Guzzle (an HTTP library), and Guzzle depends on some Symfony components. So you will spend the rest of the day downloading dependencies and making sure you have all the necessary files. That is the problem Composer solves for you.
I don't have any experience running Composer on Windows, but I would start here:
http://getcomposer.org/doc/00-intro.md#installation-windows
Using the Installer
This is the easiest way to get Composer set up on your machine.
Download and run Composer-Setup.exe, it will install the latest
Composer version and set up your PATH so that you can just call
composer from any directory in your command line.
Once you have Composer installed, you should simply be able to make a file named composer.json in your project root, with the following contents:
{
"require": {
"omnipay/omnipay": "~2.0"
}
}
Then use the Command Prompt and cd to your project's directory, and run composer update to download the Omnipay files and all their dependencies.