Browse Source

Change index.php location in setup.py

Natchanon Tatsaneepong 12 years ago
parent
commit
e85df007f9
3 changed files with 7 additions and 7 deletions
  1. 1 1
      php-yii2/README.md
  2. 4 4
      php-yii2/app/index.php
  3. 2 2
      php-yii2/setup.py

+ 1 - 1
php-yii2/README.md

@@ -14,7 +14,7 @@ Uses the Yii2 Fluent Query Builder.
 * [DB test controller](app/controllers/SiteController.php)
 
 ### Template Test
-Uses Yii2s template engine 'blade'
+Uses Php template
 
 * [Template test controller](application/controllers/Bench.php)
 

+ 4 - 4
php-yii2/app/index.php

@@ -1,10 +1,10 @@
 <?php
 
 // comment out the following two lines when deployed to production
-defined('YII_DEBUG') or define('YII_DEBUG', false);
-defined('YII_ENV') or define('YII_ENV', 'prod');
-error_reporting(E_ALL);
-ini_set('display_errors','on');
+//defined('YII_DEBUG') or define('YII_DEBUG', false);
+//defined('YII_ENV') or define('YII_ENV', 'prod');
+//error_reporting(E_ALL);
+//ini_set('display_errors','on');
 
 require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
 

+ 2 - 2
php-yii2/setup.py

@@ -7,13 +7,13 @@ from os.path import expanduser
 home = expanduser("~")
 
 def start(args, logfile, errfile):
-  setup_util.replace_text("php-yii2/index.php", "localhost", ""+ args.database_host +"")
+  setup_util.replace_text("php-yii2/app/index.php", "localhost", ""+ args.database_host +"")
   setup_util.replace_text("php-yii2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
 
   try:
     if os.name == 'nt':
       subprocess.check_call('icacls "C:\\FrameworkBenchmarks\\php-yii2" /grant "IIS_IUSRS:(OI)(CI)F"', shell=True, stderr=errfile, stdout=logfile)
-      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-yii2\\public"', shell=True, stderr=errfile, stdout=logfile)
+      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:"C:\\FrameworkBenchmarks\\php-yii2\\app"', shell=True, stderr=errfile, stdout=logfile)
       return 0
     subprocess.check_call("sudo chown -R www-data:www-data php-yii2", shell=True, stderr=errfile, stdout=logfile)
     subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-yii2/deploy/php-fpm.pid", shell=True, stderr=errfile, stdout=logfile)