I have been trying to integrate zend framework with xampp. But unable to achieve anything.
E:\Program Files\XAMPP\xampp\php\PEAR
Delete my zend library from the above path
Currently zend framework is available in
G:\ZendFramework-1.11.11\ZendFramework-1.11.11
I also tried to add the zend library from
G:\ZendFramework-1.11.11\ZendFramework-1.11.11\library
to
E:\Program Files\XAMPP\xampp\htdocs\testproject\library
But, still whenever i just try to open my page by this URL
http://localhost:85/testproject/public/
I got an output of welcome to zendframework
But, whenever I just try to open any page where i used zend library like ZEND_FORM then I get an exception
Fatal error: Class 'Zend_Form' not found in E:\Program Files\XAMPP\xampp\htdocs\testproject\public\Guestbook.php on line 15
I have also updated my php.ini file and reverted my include_path to this
include_path = ".;E:\Program Files\XAMPP\xampp\php\PEAR;G:\ZendFramework-1.11.11\ZendFramework-1.11.11\library\"
Urgent help will be highly appreciated
My OS is windows 7.
When i entered a command php -v then it returned me
PHP 5.3.0 (cli) (built: Jul 2 2009 21:08:11)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
and zf show version returned me
zf show version
Zend Framework Version: 1.11.11
Version of xampp is 1.7.2
Appache version is :
Apache/2.2.12 (Win32) DAV/2 mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
Index.php File
<?php
// Set the initial include_path. You may need to change this to ensure that
// Zend Framework is in the include_path; additionally, for performance
// reasons, it's best to move this to your web server configuration or php.ini
// for production.
set_include_path(implode(PATH_SEPARATOR, array(
realpath(dirname(__FILE__) . '/../library'),
get_include_path(),
)));
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap();
$application->run();
enter code here
.htaccess File
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
maybe this can help, i am using EasyPhp(instead of XAMPP) and zend's auto generated .htaccess and i have this in apache
NameVirtualHost 127.0.0.1:80
<VirtualHost abc:80>
DocumentRoot "C:/www/www/abc/public"
ServerName .local
SetEnv APPLICATION_ENV development
<Directory "C:/www/www/abc/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
and this is what the directory look like
Directory di c:\www\www\abc
[.] [..] .buildpath .project
[.settings] .zfproject.xml [application] [cache]
[data] [docs] [library] [public]
[scripts] [tests]
Directory di c:\www\www\abc\library
[.] [..] [abc] [tcpdf] [Zend] [ZendX]