Zend framework in Xampp

2019-03-01 08:02发布

I recently downloaded the full package version(recommended) of ZendFramework(2.0.5).And tried and failed to install in xampp(version 1.7.4) also my php version is 5.3.5 .

I have done almost everything that is said to do like-

1.find php.ini and add path

include_path = ".;C:\xampp\php\Zend\library\zend\;C:\xampp\php\PEAR;"

2.Extract the downloaded Zend Framework folder and copy to your PHP include path.

I have also checked the folder(xampp,php,Zend) permissions too.I have checked and rechecked my tries multiple times but that error is not solved.

Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true. Make sure you include Zend Framework in your include_path which currently contains: .;C:\xampp\php\Zend\library\zend\;C:\xampp\php\PEAR;

It has already taken mine whole day to check other forums,get ideas but none of then works.Please help .Thanks

2条回答
The star\"
2楼-- · 2019-03-01 08:24

Hi there finally after doing every possible tries,my error was gone. I don't know other cases but in my case i have done a series of mistake.So as i corrected them the error was gone.Here is what i did

1.In ZendFramework-2.0.5 the loader.php was missing.So following error occured

Exception thrown trying to access Zend/Loader.php using 'use_include_path' = true. Make sure you include Zend Framework in your include_path which currently contains: .;C:\xampp\php\Zend\library\zend\;C:\xampp\php\PEAR;

For this i downloaded the ZendFramework-1.12.0(only in my case).And Loader.php was there

2.No two mistake of mine was i fractured the path from half. i.e.If my folder structure was like ZendFramework-1.12.0/library/Zend/..I add the half path to php.ini file

include_path = ".;C:\xampp\php\PEAR\;C:\xampp\php\Zend;"

which was a mistake so i, gave the path before the library folder

include_path = ".;C:\xampp\php\PEAR\;C:\xampp\php\Zend\library;"

and placed the folders according to path.

3.And what about environmental variables i read about? They are not neccessary while installing the ZendFramework for the first time.After it i am not in that condn to say whether it should be added or not environmantal variables

C:\xampp\php

So,after doing above mentioned corrections and checking through the installation checker the error was gone.

And remember to restart(start and stop) the apache server after a tiny change in php.ini file. thanks to markus-tharkun and Seth Battin a lot.You saved me.

查看更多
Deceive 欺骗
3楼-- · 2019-03-01 08:46
  1. Your path should probably be C:\xampp\zend\library\Zend.

  2. You shoulnd't take the framework to the global include path but have it as a dependency in your project, soon you'll have two projects with two different versions of ZF and then the global option creates troubles

查看更多
登录 后发表回答