Guys, can you help me get my PHP environment running?

Source: Internet
Author: User
Tags webhost zend framework
Younger brother now with Zend Studio for Eclipse-6.1.2 tool Development Zend Framework PHP application, can give a detailed step no, now run PHP program alone is no problem, environment all OK, mainly now I want to use Zend Framewo RK Framework to develop applications, the environment has not done well, do not know how to get ... I hope the hero pointed out.


Reply to discussion (solution)

It is recommended that you review the configuration-related manuals for the Zend Framework framework and do not have a significant relationship with development tools.

See if there are Zend Framework plug-ins, I have not used Zend tools for a long time. You want his frame code hints?

Zend Studio for Eclipse-6.1.2 tool comes with Zend framework plug, require, code hints are OK, you call the Zend framework class will prompt the error,

My Test code:

        Require_once ' zend/config.php '; require_once ' zend/db.php '; require_once ' zend/date.php ';//Database configuration information $configarray = Array (    ' webhost ' = ' www.example.com ',    ' database ' = = Array (        ' adapter ' = ' pdo_mysql ',//Note, Your PHP needs to support this extension, or it can be replaced with other types of extension        ' params ' = Array (            ' host '     = = ' localhost ',            ' username ' = ' root ',            ' password ' = ' admin ',            ' dbname ' = ' krhm '))    ;//Configure the Information object $config = new Zend_config ($ Configarray);//Print one of the property values echo $config->webhost;//read configuration information, establish a database link $DB = zend_db::factory ($config->database);// Set the Data Link language//$db->query (' Set NAMES GBK ');//Query database save content $sql = "SELECT * from Kr_sys_user"; $result = $db->query ($sql); /Use the Pdostatement object $result to place all result data in an array $rows = $result->fetchall ();p rint_r ($rows);

Error message:
Warning:require_once (zend/config.php) [Function.require-once]: failed to open stream:no such file or directory in E:\web \haihalie\index.php on line 4

Fatal error:require_once () [function.require]: Failed opening required ' zend/config.php ' (include_path= '); C:\php5\pear ') in E:\web\haihalie\index.php on line 4


I think it is necessary to configure the php.ini file inside the include_path, so find this parameter, my Zend Framework frame address to add in, configured as follows: include_path = ".;D: \ Program Files\zend\zend Studio for Eclipse-

6.1.2\plugins\org.zend.php.framework.resource_6.1.2.v20090318-1524\resources

\zendframework_1.7\frameworklib "

The following error will occur.
Fatal error:uncaught exception ' zend_db_adapter_exception ' with message ' The PDO extension are required for this Adapter But the extension isn't loaded ' in D:\Program files\zend\zend Studio for ECLIPSE-6.1.2\PLUGINS\ORG.ZEND.PHP.FRAMEWORK.R esource_6.1.2.v20090318-1524\resources\zendframework_1.7\frameworklib\zend\db\adapter\pdo\abstract.php:107 Stack Trace: #0 D:\Program files\zend\zend Studio for eclipse-6.1.2\plugins\org.zend.php.framework.resource_6.1.2. v20090318-1524\resources\zendframework_1.7\frameworklib\zend\db\adapter\abstract.php (417): Zend_Db_Adapter_Pdo_ Abstract->_connect () #1 D:\Program files\zend\zend Studio for eclipse-6.1.2\plugins\ Org.zend.php.framework.resource_6.1.2.v20090318-1524\resources\zendframework_1.7\frameworklib\zend\db\adapter\ pdo\abstract.php: Zend_db_adapter_abstract->query (' select * from K ... ', Array) #2 E:\web\haihalie\index.php ( PNS): Zend_db_adapter_pdo_abstract->query (' select * from K ... ') #3 {main} thrown in D:\Program files\zend\zend Studio for Eclipse-6.1.2\plugins\org.zend.php.framework.resource_6.1.2.v20090318-1524\resources\ zendframework_1.7\frameworklib\zend\db\adapter\pdo\abstract.php on line 107

It is not clear, I hope the hero pointing twos.

PDO extension not installed. Install the PHP PDO.

Not related to the framework, development tools, PDO extension is not open, to php.ini to open pod-related extensions, restart Apache or nginx ...

Not related to the framework, development tools, PDO extension is not open, to php.ini to open pod-related extensions, restart Apache or nginx ...
PDO, not pod.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.