简体   繁体   中英

Zend 2 does not work with netbeans

I want to build a small php web application using Zend 2 framework. I am totally new to this framework and I encounter some configuration problems.

I am using windows 7, netbeans 7.4 and WAMP server.
I have downloaded the zend skeleton application and link it with netbeans via Tools -> Options -> Php -> Zend 2 tab. I have also downloaded the msi for composer and install it. I then link it the composer.phar file with netbeans via Tools -> Options -> Composer tab. I have also configure the PHP interpreter found in Tools-> Options-> General to the php.exe file.

After doing all of these, I managed to create a new PHP project using Zend 2 framework. I have also added the library folder of Zend 2 framework package in the include_path folder of this project in case it is needed.

If I browse to http://localhost/MyProjectName I can see the directory of my project. But if I go to http://localhost/MyProjectName/public/index.php I get the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log.

The apache error log gives the following error:

C:/wamp/www/MyProjectName/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

What am I doing wrong? Am I missing something? Isn't public/index.php the main point of the application? Please help! Thanks in advance!

Make sure you enable mod_rewrite for apache.

Do this by left clicking the wamp icon -> apache -> apache modules -> rewrite_module.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM