-2

I am newbie in Php as this question has already been asked several times.... I have import php project in netbeans and db as well in sqlyog but when i am trying to run that app i am getting error in browser Here is the error : Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

Have changed these two lines of index.php **

<?php
// change the following paths if necessary
$yii=dirname('C://wamp/www/yii-1.1.8.r3324/framework/yii.php').'/../yii-1.1.8.r3324/framework/yii.php';
$config=dirname('C://wamp/www/examapp/protected/config/main.php').'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createWebApplication($config)->run();

as per my path i have added here is it right?

// change the following paths if necessary
$yii=dirname('C://wamp/www/yii-1.1.8.r3324/framework/yii.php').'/../yii-1.1.8.r3324/framework/yii.php';
$config=dirname('C://wamp/www/examapp/protected/config/main.php').'/protected/config/main.php';

Error Reporting:

File does not exist: C:/wamp/www/favicon.ico [Tue Feb 18 11:07:41 2014] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico [Tue Feb 18 11:09:44 2014] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/wamp [Tue Feb 18 11:09:52 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:10:04 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:15:48 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:15:50 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:16:47 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:16:48 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:16:51 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:18:50 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:20:03 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:23:26 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:24:32 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:26:41 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:27:26 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:27:27 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration [Tue Feb 18 11:31:20 2014] [alert] [client 127.0.0.1] C:/wamp/www/examapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

user3233280
  • 279
  • 2
  • 7
  • 21

1 Answers1

1

I guess you just need to specify absolute path for yii.php and main.php files.

So I think following lines should work fine.

$yii='C://wamp/www/yii-1.1.8.r3324/framework/yii.php';
$config='C://wamp/www/examapp/protected/config/main.php';

Also you can use dirname(__FILE__) to get the current directory and set the path to files relatively from that directory, which would be better solution.

Vivek Vaghela
  • 1,075
  • 9
  • 16
  • put this "error_reporting(E_ALL);" in first line after php tag, it will turn on error reporting – Vivek Vaghela Feb 18 '14 at 06:22
  • 1
    seems like your mod_rewrite module is not active or installed. Enable it from httpd.conf file in apache server by either adding "LoadModule rewrite_module modules/mod_rewrite.so" line or commenting out this line if it's already there. Do not forget to restart the server. – Vivek Vaghela Feb 18 '14 at 06:46
  • thanks a ton i have already done by visiting another website but anyways your answer is right – user3233280 Feb 18 '14 at 06:51