Project

General

Profile

Actions

Feature #535

closed

Display Error Message from myamiweb/index.php if config.php is missing

Added by Amber Herold almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
High
Assignee:
Amber Herold
Category:
-
Target version:
Start date:
05/21/2010
Due date:
% Done:

0%

Estimated time:

Description

Would be nice to give feedback if user is trying to start myamiweb without a config file.


Related issues 1 (0 open1 closed)

Related to Appion - Bug #984: Check for config.php in leginon.inc uses hardcoded Base URLClosedAmber Herold11/01/2010

Actions
Actions #1

Updated by Amber Herold almost 14 years ago

  • Priority changed from Normal to High
Actions #2

Updated by Eric Hou almost 14 years ago

  • Assignee set to Eric Hou
Actions #3

Updated by Eric Hou almost 14 years ago

  • Status changed from New to Assigned
Actions #4

Updated by Eric Hou almost 14 years ago

  • Status changed from Assigned to In Code Review
  • Assignee changed from Eric Hou to Amber Herold

I added the checking in leginon.inc. If the config.php file is not there, the page will redirect to setup wizard.

Thanks.

To test:
delete your config.php file, and go to the myamiweb index page, you should see the setup wizard index page.

Thanks.

Eric

Actions #5

Updated by Amber Herold almost 14 years ago

  • Assignee changed from Amber Herold to Eric Hou

Eric, it look like you only call fclose if the file was NOT successfully opened. Do you need to put an fclose outside the if clause for the case that the file is actually open?

Actions #6

Updated by Eric Hou almost 14 years ago

  • Assignee changed from Eric Hou to Amber Herold
Actions #7

Updated by Eric Hou almost 14 years ago

fclose is not required in this case, but it is good to have.

Eric

Actions #8

Updated by Amber Herold almost 14 years ago

  • Status changed from In Code Review to In Test
Actions #9

Updated by Eric Hou almost 14 years ago

  • Status changed from In Test to In Code Review

revision 14623 won't work in processing pages. I just rewrote a better way to check config.php file.

Thanks.

Eric

Actions #10

Updated by Amber Herold almost 14 years ago

  • Status changed from In Code Review to In Test

looks good.
I try to avoid assignment operators in conditionals because it is error prone, but it looks pretty clean here.

Actions #11

Updated by Eric Hou almost 14 years ago

Just add some code to fixed the problem. The old code forget to remember the original path location. The while loop will loop through the parents folder. But after the while statement, we need to put the path back to the original.

Thanks.

Eric

To test:
Not only the web tool, please also test processing (appion), and setup wizard. And also any other tools which are sub-folder under myamiweb.

Thanks.

Eric

Actions #12

Updated by Amber Herold over 13 years ago

This worked for myamiweb, 2wayviewer.php, /3wviewer.php, LOI, RCT, template.php, admin.php but NOT for:

http://fly/myamiweb/processing/index.php?expId=7946
http://fly/myamiweb/processing
http://fly/myamiweb/tomo/
http://fly/myamiweb/project/project.php

Dual viewer (dualview.php) displays two config pages side by side.

Actions #13

Updated by Amber Herold over 13 years ago

  • Assignee changed from Amber Herold to Eric Hou
Actions #14

Updated by Eric Hou over 13 years ago

  • Assignee changed from Eric Hou to Amber Herold

This only can work on myamiweb homepage. We don't want to redirect to setup wizard for all other page. The purpose of it is for installer won't forget to create the config.php file for new installation.

Thanks.

Eric

Actions #15

Updated by Amber Herold over 13 years ago

  • Status changed from In Test to Closed

Misread the test directions...it is all good in that case.

Actions

Also available in: Atom PDF