Installing Zend framework with WAMP server

2020-02-08 04:48发布

I'm trying to install Zend framework on a WAMP server but it is not working properly.

I downloaded the Zend framework and created the folder in C:\wamp\library\Zend, and then in php.inc I have something like this:

; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes:C:\wamp\library"

Now when I try to run the sample blogger.php it is giving me the following error:

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\PHPSample\Blogger.php on line 37

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:\php5\pear') in C:\wamp\www\PHPSample\Blogger.php on line 37

Can anyone help me please?

4条回答
smile是对你的礼貌
2楼-- · 2020-02-08 05:13

On Windows your php.ini should have a section like this:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"  
; Windows: "\path1;\path2"

The key is to a) remove the semi-colon at the beginning of the line, and b) add what you need to the path. NOTE: on Windows, paths must be separated by semi-colons, whereas on UNIX they are separated by full colons; Also, Dot means "current directory", so only include it if you want to.

Make sure it looks like this:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

include_path = ".;c:\php\includes;c:\wamp\library"
查看更多
不美不萌又怎样
3楼-- · 2020-02-08 05:14

Zend Installation:- Download Zend Framework

  • Go to Wamp/bin/php/ Create a folder Namely:- Zend_Framework

  • Copy All the Files and Folder of Downloaded Zend Framework.

  • Go to php.ini and find include_path Here you find:- include_path="c:\php\includes" and replace the text between "" from your directory C:\wamp\bin\php\zend_framework\library and Save File.

  • Now Go to Computer Property and Advanced System Setting and Advanced and Environment Variable and select path from system variables and click on Edit and add ; and paste your directory path hare C:\wamp\bin\php\zend_framework\bin

  • Open Command Prompt and go to the www directory inside wamp and then type zf create project Zendy

  • Now go to httpd.conf file and type there <virtualHost></virtualHost> Tags.

<virtualHost 127.0.0.1> DocumentRoot "C:\www\Zendy\public" ServerName Zendy <Directory "C:\www\Zendy\public"> AllowOverride AuthConfig FileInfo Indexes Limit Options order Deny,Allow Allow from all </Directory> </virtualHost>

  • Save and Quit and go to windows -> System32 -> drivers-> etc-> hosts and Add here your project 127.0.0.1 localhost Zendy

  • Save and Quit and Restart Apache

  • Also set rewrite module via removing ; from php.ini file

查看更多
Fickle 薄情
4楼-- · 2020-02-08 05:14

i had made this cast explaining how to setup Many ZF Application with Wamp full functional please check it out and let me know if you had any problem so i can help :

Getting Started with the Zend Framework and WAMP Server

查看更多
神经病院院长
5楼-- · 2020-02-08 05:24

that should work if:

you unpacked contents of the library folder in archive that contains Zend framework in

C:\wamp\library folder. othervise you need to do that ( put the contents of the library folder in archive in path you specified in php.ini

查看更多
登录 后发表回答