Project

General

Profile

Actions

Bug #478

closed

wizard need to print out the config file even though can not edit the web directory.

Added by Eric Hou over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
High
Assignee:
Amber Herold
Category:
Web interface
Target version:
Start date:
05/14/2010
Due date:
% Done:

100%

Estimated time:
Affected Version:
Show in known bugs:
Workaround:

Description

The wizard print out "can not copy file" error message now if apache user does not have privilege to write the web directory. We need better error message and also teach user how to generate the config.php by themself.

Actions #1

Updated by Eric Hou over 14 years ago

  • Status changed from Assigned to In Code Review

There is no way to solve the permission problem by using the web interface (Eric, Neil, Christopher) if Apache user does not own myamiweb folder. So for now:
1. If Apache user has the permission to edit the web directory. The wizard will generate the config file by itself.
2. If Apache user doesn't have the permission to edit the web directory. The wizard will print out the config file on the screen. And user needs to copy that and past to config.php under myamiweb directory.

Thanks.

r13926

Actions #2

Updated by Eric Hou over 14 years ago

By the way, to test this:
1. make sure the Apache user does not have the permission to edit your myamiweb folder. And run setup wizard.
Result: Wizard won't create config.php, but it will print it out on the screen.

2. make sure the Apache user do have the permission to edit your myamiweb folder. And run setup wizard.
Result: Wizard will create config.php file under myamiweb folder. User does not need to do anything.

Actions #3

Updated by Eric Hou over 14 years ago

  • Assignee changed from Eric Hou to Amber Herold

This is done for review.

Actions #4

Updated by Amber Herold over 14 years ago

  • Assignee changed from Amber Herold to Eric Hou

Eric, when you get a chance could you come by, I have questions about this section:

    $setupUtils = new SetupUtils();
    $fileContents = $setupUtils->editConfigFile(CONFIG_TEMPLATE, $_POST);

    $copyResult = $setupUtils->copyFiles(CONFIG_TEMPLATE, CONFIG_FILE);

    if($copyResult){
            $result = $setupUtils->arrayToFile(CONFIG_FILE, $fileContents);

        if($result)
            $fileContents = $setupUtils->fileToArray(CONFIG_FILE);
Actions #5

Updated by Amber Herold over 14 years ago

Added comments in r14019

Actions #6

Updated by Amber Herold over 14 years ago

  • Status changed from In Code Review to In Test
  • Assignee changed from Eric Hou to Amber Herold
Actions #7

Updated by Amber Herold over 14 years ago

  • Status changed from In Test to Closed
Actions

Also available in: Atom PDF