zendframe work with ubuntu 11 - zend-framework

I have download the zendframe work v 1.11.5 on ubuntu 11 (every thing else is installed) after putting the command zf create project /var/www/name it gives me a lot of warnings,so how to set up the zend frame work properly..
the warning:
Note: This command created a web project, for more information setting up your
VHOST, please see docs/README
PHP
Warning:
require_once(PHP/CodeCoverage/Filter.php):
failed to open stream: No such file or
directory in
/usr/share/php/PHPUnit/Autoload.php on
line 46 PHP Stack trace:

I know the solution,the problem is with phpUnit and pear ,if any one try to install phpUnit from the repository then he will got the warning above,so you need to install it by pear.
try in the terminal:
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
sudo pear install phpunit/PHPUnit
however you will another probelm after doing line 3 because you need to upgrade pear so do this before line 3:
sudo pear upgrade
then DO Step 3 again
sudo pear install phpunit/PHPUnit
of course you need also to set the path in php.ini try(locate php.ini)
then in the file file add these :
include_path=".:/usr/share/php:/usr/share/pear:/usr/share/php/PHPunit:/usr/share/php/PEAR"
notice the path to pear and PHPUnit, so if your path different you have to locate your path ;)
hope thats help :)

Go to the any web directory say, /var/www/html/test
Now call the zf.sh file in the bin folder of zend framework to create new project
In my case I extracted the zend framework in /var/ww/html/zend-framework
So I called the zf.sh file as follows
/var/www/html/zend-framework/bin/zf.sh create project zendtest
Now a project called called “ zendtest “ has been created in the current directory. This project will have four Sub folders.
Now we need to include the Libraries in the zend framework in our new project. To do that, just copy the folder called Zend from the library folder of our zend framework. (in my case I copied /var/ww/html/zend-framework/library/Zend ).
That’s all, we have created a sample project in Zend framework. We can test it using browsing the Public folder in the new project
http://localhost/ test/zendtest/public/

Related

How to install extensions in contao 4.4

I installed contao 4.4 in my localhost successfully.After successful installation I tried to install an extension via contao manager.Unfortunately it fails with console error.So I download zip file of extenson from codefog
and put it in the folder root/system/modules .But the extension is not found in backend.I think the extension is not installed successfully. How to make it works? Please help me.
This is how i install extensions in my contao 4 standard-edition. As commented, this only applies to the standard-edition, not the managed-edition. If you don't want to change to the standard-edition, you may better wait, until they fix the problem in the contao manager... Otherwise this is how it works:
Installing a Contao 4 bundle
Info: A bundle is the best thing you can find for extending contao.
It is the cleanest way of adding functionality to the contao cms.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require ... command for this extension
composer require madeyourday/contao-rocksolid-columns
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our bundle to the list of bundles, that contao should load: (the bundle name used in this line can be found in vendor/%developer%/%extension%/src/ and then there is a ...Bundle... php File there, that tells you the name of the bundle)
new MadeYourDay\RockSolidColumns\RockSolidColumnsBundle(),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 4 extension
Info: A contao 4 extension is defined by it's developer, it is actually still the same method of programming like in 3.5 but someone has tested it in contao 4 and approved of its functionality. This is the second best thing you can find for extending contao.
Find the module on https://packagist.org/
Get the "require ..." command from under the title
Connect to your hosting (or if local, open cmd or terminal)
Change to the root of your hosting
Execute the require command for this extension
composer require heimrichhannot/dlh_googlemaps
Add the module to AppKernel (File: app/AppKernel.php)
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('dlh_googlemaps', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Installing a Contao 3.5 extension
Info: A contao 3.5 extension is your last hope, it is the same code as in contao 3.5 may or may not work - you have to test it yourself.
Find the module on github (or some other repo)
Conntect to your hosting with ssh (or if local, just open cmd or terminal)
Change into "system/modules"
Download the repo (e.g. git clone https://github.com/ContaoBlackForest/contao-system-notification system-notification) - notice the added "system-notification" at the end, that should be the foldername, in which the extions has to be (you can find the folder in the composer.json file inside the extension under "Resources/contao")
Create syslinks (bin/console contao:symlinks)
Add the module to AppKernel (File: app/AppKernel.php)
This line should be added once, just after "use Symfony\Component\HttpKernel\Kernel;" (this only has to be added once and only if you are using contao 3.5 extensions)
use Contao\CoreBundle\HttpKernel\Bundle\ContaoModuleBundle;
In the "$bundles" array we can now add our extension to the list of extensions, that contao should load:
new ContaoModuleBundle('system-notification', $this->getRootDir()),
Open the installtool of contao (contao/install) and update the database
Your Question
To awnser your question, as the module you want to install, is a contao 4 extension, you could use the according instructions from above.
contao 4 extension - https://packagist.org/packages/codefog/contao-news_categories
You do not need to install this extension manually. Simply run
composer require codefog/contao-news_categories
in the root folder of your Contao installation. Depending on how you installed composer the command might be different.

Pack a Zend Framework app and deploy it on Zend Server

I created a small Zend Framework application from command prompt using Zend_Tool.
I deployed it in apache server htdocs folder and it is running fine.
Now I need to deploy it to Zend Server. For that i used a command zdpack pack appname.
While trying that i am getting lot of errors like
deployment.xml is missing
I created it in the app root folder.
Then i got
appnaama/data folder is missing error
I created a data folder.
Then
zend-scripts missing
error....
Please help me in deploying an applicaiton created from zf create project projname in Zend server and run it in the browser.
You need to come out of the directory when calling zdpack pack command. If you pack the file inside the project directory you get the "deployment.xml is missing" error.
Pass the following commands at the location where you are creating the
zpk file. For illustration, I will be doing it in the myapp folder of my desktop.
C:\Users\lura\Desktop\myapp> zdpack.exe create demoapp
Move into the directory using cd demoapp and list the directory. Copy your php codes into the data folder. The scripts folder and deployment.xml file can be left as it is. Next run the validate command when inside the directory.
C:\Users\lura\Desktop\myapp\demoapp> zdpack.exe validate --schema="C:\Program Files (x86)\Zend\ZendServer\share\deployment.xsd" deployment.xml
now you can move a folder back with the command cd .. and execute the following.
C:\Users\lura\Desktop\myapp>zdpack pack demoapp
That's it! The zpk file is created! A screenshot of my cmd.
This YouTube tutorial will help, if your still confused. To execute on Linux and for more info read this documentation from zend.
You are using zdpack command wrong!
Step 1: Open shell and ls or cd into the zend workspace.
Step 2: use "zdpack create <ProjectName>" command. It will create deployment.xml, data and script directories. Refresh project explorer you will see changes.
Step 3: Configure deployment.xml if needed.
Step 4: Use "zdpack pack <ProjectName>" command to create zpk file.
That's all.
I think you just pass incorrect path to the app.
Try following this scheme:
zdpack pack <path>/ProjectName
to generate required files.
Step 1: Create skeleton from the zend server zdpack command
#/usr/local/zend/bin/zdpack create <project-name>
It will create project skeleton.
Step 2: Configure deployment.xml if needed.After that check your Deployment.xml is valid.
# /usr/local/zend/bin/zdpack validate --schema="/usr/local/zend/share/deployment.xsd" deployment.xml
Step 3: Now create the zpk file for the aplication
# /usr/local/zend/bin/zdpack pack <project-name>

Zf Tool cannot find Zend Framework

Just started working with the Zend Framework Zf Tool and I've already come across a problem I've spent hours trying to figure out.
For some reason when I run the Zf show version command I get a ZF ERROR indicating it cant find the Zend Framework a to add it to my php.ini include_directory.
Here is my setup. I'm currently have WAMP installed on my local machine.
c:\wamp
I copied the zf.bat and zf.php files into the servers php directory. The path to the php directory has been added to the path environment variable. I'm pretty sure it works because I run the zf show version command in the console and get a ZF ERROR.
I keep my copy of the Zend Framework inside
c:\wamp\includes
So I added this to the php.ini include_path. include_path = ".;c:\wamp\includes"
I checked that this setting was set correctly by checking phpinfo() function. Which shows
include_path .;c:\wamp\includes .;c:\wamp\includes
So I think I have everything setup correctly. I can't work out what I'm missing.
I also tried setting the ZEND_TOOL_INCLUDE_PATH with no success.
Any help would be appreciated. PS I did check other posts here but none of the suggested
I have worked it out! Finally. The way I have my local wamp setup there is 2 php.ini files I have to edit.
The one that made the different is the php.ini inside the Apache2 directory.
Thanks everyone for their help. I appreciate it.
Well im not sure how you downloaded installed the framework but my guess is that you dont have enough of you include path based on the way Zend release packages are constructed. The Zend folder contained in the Zend Framework installation needs its parent folder to be on the include path so typically you would add something like:
c:\wamp\includes\ZF_BASE_DIR\library
This is because the zf package structure looks like:
ZendFramework-VERSION/
README.txt
INSTALL.txt
LICENSE.txt
bin/
library/
If you extracted ZF from the archive you will get a Zend-some_version folder, but the actual ZF is in
"include_path\Zend-some_version\library\Zend", so your include path should point include_path\Zend-some_version\library\
Just to add to what Tjorriemorrie said and to explain in detail how I got my installation on win 7 to work as simply as possible:
Download your preferred Zend package from "http://framework.zend.com/downloads/latest" to "C:\wamp\www\"
unzip your zip file so that you have the extracted Zend folder (with version name) under "C:\wamp\www\".
Rename your folder by removing the version so that you end up with "C:\wamp\www\ZendFramework"
Run a simple php file with phpinfo() in your browser. Note the entries for: "_SERVER["PATH"]" under PHP Variables
"Path" under Environment
"Loaded Configuration File" at the top
"include_path" under Core and
"extension_dir" under Core as well.
"_SERVER["PATH"]" and "Path" must be identical (no brainer)
There should be only one listing for your apache server and that should be the listing under "Loaded Configuration File" but without the "php.ini". So, if your "Loaded Configuration File" is "C:\wamp\bin\apache\apache2.2.22\bin\php.ini" you must have "C:\wamp\bin\apache\apache2.2.22\bin" in your path and that must be the ONLY reference to an apache server. If you have multiple references to apache servers Windows may pick the wrong one depending on your PATH order and use the wrong php.ini file.
Your "extension_dir" will tell you the version and location of php you are using. It is common to have different php folders lying around such as "C:\php", "C:\wamp\bin\php\php5.4.3", "C:\wamp\bin\php\php5.3....", etc. The extension directory will tell you which one of these php folders ZF will "reference" when it is looking for its library. For example, if your extension directory says "c:/wamp/bin/php/php5.4.3/ext/", you want to focus on "c:/wamp/bin/php/php5.4.3"
Go back to your PATH and a) add the string for this php version and b) remove all the other references to the other php folders
Now that you know your running and primary php and apache folders, shutdown (do not restart), shut down your computer and boot back up (restart does not always let the PATH completely reset.
Go to BOTH php.ini files at a) "C:\wamp\bin\apache\apache2.x.y\bin" and "C:\wamp\bin\php\php5.4.3" and find the include_path variable for Windows
Replace the default line, which looks like:
;include_path = ".;c:\php\includes;"
with
include_path = ".;c:\php\includes;C:\wamp\www\ZendFramework\library"
ON BOTH FILES just as Tjorriemorrie notes.
Restart All Services by clicking the wamp icon and selecting said option
At this point my zf tool was working. But, just to be safe, shut down and bootup
Smile and grab a beer!

trouble configuring zend framework with netbeans 6.9!

i am new to zend framework. i am trying to create a zend framework project in netbeans 6.9. but the ide shows some error, i couldn't understand. the following are the screenshots that could illustrate my problem.
the following are the error message shown in the ide log:
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup". This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.
Example you would run:
$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
Your are encourged to read more in the link that follows.
Zend_Tool & CLI Setup Information
(available via the command line "zf --info")
* Home directory found in environment variable HOMEPATH with value \Documents and Settings\oandz
* Storage directory assumed in home directory at location \Documents and Settings\oandz/.zf/
* Storage directory does not exist at \Documents and Settings\oandz/.zf/
* Config file assumed in home directory at location \Documents and Settings\oandz/.zf.ini
* Config file does not exist at \Documents and Settings\oandz/.zf.ini
To change the setup of this tool, run: "zf --setup"
can any one give the procedure to set-up zend framework and to configure it with netbeans 6.9 starting from scratch.
thanks in advance.
It looks like the cli Zend_Tool isn't being called. I'm not a windows man so the best I can provide is a link Using the CLI Tool there's a section on setting up in Windows.
The images are quite small so I'm guessing a bit but it looks like you pointed netbeans at the zf.bat file, are the permissions correct?
i resolved the problem. the problem is with zend framework 1.10.x itself. i just downloaded the latest version of the zend frame work and it just worked fine.

Error when register provider Zend in Netbeans 6.9

I install :
netbeans 6.9 on 'C:\Program
Files\NetBeans 6.9'
xampp 1.7.2 on D:\xampp
i have upgrade zend through pear
I follow the screencast and when clicking the Register Provider button. But I get message like this:
on create config tab
Successfully written Zend Tool config.
It is located at: \Documents and Settings\Permana/.zf.ini
on enable.config.provider NetbeansCommandsProvider
User has no config file.
An Error Has Occurred
Client has no persistent configuration.
Zend Framework Command Line Console Tool v1.10.7
Details for action "Enable" and provider "Config"
zf enable config.manifest class-name
zf enable config.provider class-name
And of course because of this error I cannot create zend project using netbeans. Did anyone know what is the problem?
Windows XP:
Make sure the environment variable ZF_HOME is set.
I found the soltution to this problem. Just delete the /home/username/.zf.ini and go to netbeans and register zendframework provider again. This will generate zf.ini file in your home directory with new path.
Yesterday I had the same problema. I wrote a post in my blog:
http://otroblogmas.com/error-zend-tool-netbeanscommandsprovider-php/
I found two solutions: either modify the file zf.ini in your profile, or copy the file NetBeansCommandsProvider.php in a path of include_path.
Ubuntu 10.10, NetBeans 6.9.1, Zend Framework 1.11
Reconfigurar
Edit PHP.ini
include_path = ".:/opt/lampp/etc/library" ; Files "/opt/lampp/etc/library/Zend"
gedit /etc/profile
export PATH=$PATH:/opt/lampp/bin # Includer zf.php and zf.sh
export PATH=$PATH:/opt/lampp/etc/library
Remove zf.ini and register NetBeans provider again (from Tools > Options > PHP > Zend).
The above answers are correct, however in my case there was no zf.ini file under my user directory (using Windows 7). In that case you need to run two commands:
zf --setup storage-directory
zf --setup config-file
That will create your zf.ini file and the storage directory under your user directory. Source: here