Skip to main content
Topic: Install directory (Read 4147 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Install directory

Not completely setup with my development environment - I still can't seem to get PHPUnit to work with PhpStorm - but I did get Elkarte installed.

After installation I automatically get redirected to /install/install.php. Not sure how I can keep the install directory so I can work on it but still test Elkarte. I don't think there is a way to do this without copying the files which is a huge pain for developers.

Instead of requiring me to delete the directory, I think we should put a setting in Settings.php $ignore_install_dir. If it is set, it will ignore the install directory warnings.

Of course, this means that we need to move the install check further down because we need to load Settings.php. So this proposal is kind of long but before I submit a PR I want to get your opinion.

  • Check if there is an /install directory
  • Check if there is a Settings.php
    a) If it's not there, redirect to install
    b) if it is, continue
  • Require Settings.php
  • Check if (empty($ignore_install_dir)
    a) if it's true, continue
    b) if it's not, redirect to install

Even this method seems hacky to me but it's the best solution I can come up with right now.

Re: Install directory

Reply #1

btw, how do we not have a button to create a sub list? The editor is really missing the ability to indent.

Re: Install directory

Reply #2

Use the debug variable? If true ignore install, otherwise no?
Bugs creator.
Features destroyer.
Template killer.

Re: Install directory

Reply #3

I was thinking that but I want to be able to test a page with and without debugging on. Also, this would only be for developers, not admins trying to debug their site or mod developers.


Re: Install directory

Reply #5

You can use the Vagrant setup I provided to avoid needing to mess about with the install directory.

Re: Install directory

Reply #6

I wouldn't be able to edit things and then click refresh to see them changed. I'd have to do another step which defeats the purpose.

This makes it much easier for developers to develop. Anything we can do to make development faster/better we should do.

On another note, I just found a whole couple of undefined indices on my install :)

Re: Install directory

Reply #7

Ugh, it removed the sample Settings file and I committed that change >:(

Okay, in install.php > action_checkFilesExist() instead of renaming the files, it should make a copy of the files. Is there any issue with that? If it's an issue with permissions, we can try to copy it and if that doesn't work rename it.

Re: Install directory

Reply #8

If I remember correctly, yes, I did a rename to avoid altogether issues with creating new files.
No strong opinions on how to deal with it.

Bugs creator.
Features destroyer.
Template killer.

Re: Install directory

Reply #9

I'm not a Git expert so I need to figure out how best to change this back. A revert will result in another commit which will be ugly.

Re: Install directory

Reply #10

Revert it an force update your branch

Re: Install directory

Reply #11

If you don't want to have the commit, you could do a rebase -i, remove the commit and then a push -f
Bugs creator.
Features destroyer.
Template killer.

Re: Install directory

Reply #12

Yeah, someone else said to rebase but I don't really understand how to do it.

Re: Install directory

Reply #13

You can also start a new branch from 1.1 and then cherry pick the (2) commits from your other branch and submit that as a new PR and cancel the current ... git be wild !

A good right-click tool is tortoisegit, easier than learning the CLI.  PHPStorm also has a history view, so if you open the file you accidentally chanced, you can get the last history, save and re-commit it (undoing the changes) .. extra commit in the PR but should work as well.

Re: Install directory

Reply #14

You can see rebase as an automated cherry-picking: you go back of a certain amount of commits (e.g. HEAD~6 six commits) and you do what you want with them, including removing, merging, splitting, reorder, etc.
Bugs creator.
Features destroyer.
Template killer.