Feature #535
closedDisplay Error Message from myamiweb/index.php if config.php is missing
Added by Amber Herold over 14 years ago. Updated over 14 years ago.
0%
Description
Would be nice to give feedback if user is trying to start myamiweb without a config file.
Updated by Eric Hou over 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
Updated by Amber Herold over 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?
Updated by Eric Hou over 14 years ago
- Assignee changed from Eric Hou to Amber Herold
Updated by Eric Hou over 14 years ago
fclose is not required in this case, but it is good to have.
Eric
Updated by Amber Herold over 14 years ago
- Status changed from In Code Review to In Test
Updated by Eric Hou over 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
Updated by Amber Herold over 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.
Updated by Eric Hou over 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
Updated by Amber Herold over 14 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.
Updated by Amber Herold over 14 years ago
- Assignee changed from Amber Herold to Eric Hou
Updated by Eric Hou over 14 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
Updated by Amber Herold over 14 years ago
- Status changed from In Test to Closed
Misread the test directions...it is all good in that case.