I have tried for a number of hours to install invoiceninja on a localhost with MAMP (Mac Apache MySQL PHP)
I have created a database etc. But when I go to install my installs it shows the directory of all the files… I am unable to get to the setup screen. I tried the bitnami version of invoiceninja not long ago and for some reason it is no longer supported there.
I would really like to try the software in a localhost environment. I have googled and there are no tutorials on how to install it on localhost… just ubuntu that I can find.
As mentioned in the second posting, I did click on the “public” folder – I had seen this as a step when reading through the forum. Unfortunately I get the following message in my browser:
As mentioned in the second posting, I did click on the “public” folder – I had seen this as a step when reading through the forum. Unfortunately I get the following message in my browser:
Here are the steps in point form I have taken to get here:
I went into PHP My Admin and created a database to be used with invoiceninja
Downloaded ninja-v2.6.7.zip from www.invoiceninja.com (not the github repository)
Unzipped the contents and placed in the root of the hosting folder (I also created a folder called ninja and put the files in there, but it shouldn’t matter)
I then went to the dashboard of MAMP and clicked on “websites” (websites being hosted my MAMP) – I get the root directory showing files and directories… I then clicked on the public directory
As mentioned in my last post, I was already in the process of writing the steps I took.
I have not been able to get to the page where I can enter the database name, its user and the users database for that database.
I use MAMP a lot of times for local testing of SAAS apps and this is the first time I have lost the battle so far. Not trying to create enemies here, but I just installed and configured invoiceplane without incident. So, I like to think I am of above average ability dealing with stuff like this. But, I digress.
I await a suggestion and really hope I can get invoice Ninja working in a local host environment.
There is no “.env” file inside any of the directories, there is however a “env.php” if you drill down past the “vendor” directory. It however has nothing in it referencing “APP_KEY”
The runtime utilized by the Env class can be customized via environment
variables. If the JP_PHP_COMPILE environment variable is specified, then the
CompilerRuntime will be utilized. If set to “on”, JMESPath expressions will
be cached to the system’s temp directory. Set the environment variable to
a string to cache expressions to a specific directory.
*/
final class Env
{
const COMPILE_DIR = ‘JP_PHP_COMPILE’;
/**
Returns data from the input array that matches a JMESPath expression.
@param string $expression JMESPath expression to evaluate
@param mixed $data JSON-like data to search
@return mixed|null Returns the matching data or null
*/
public static function search($expression, $data)
{
static $runtime;
if (!$runtime) {
$runtime = Env::createRuntime();
}
return $runtime($expression, $data);
}
/**
Creates a JMESPath runtime based on environment variables and extensions
available on a system.
@return callable
*/
public static function createRuntime()
{
switch ($compileDir = getenv(self::COMPILE_DIR)) {
case false: return new AstRuntime();
case ‘on’: return new CompilerRuntime();
default: return new CompilerRuntime($compileDir);
}
}
/**
Delete all previously compiled JMESPath files from the JP_COMPILE_DIR
directory or sys_get_temp_dir().
@return int Returns the number of deleted files. /
public static function cleanCompileDir()
{
$total = 0;
$compileDir = getenv(self::COMPILE_DIR) ?: sys_get_temp_dir();
foreach (glob("{$compileDir}/jmespath_.php") as $file) {
$total++;
unlink($file);
}
I have set the hide hidden files on my Mac and checked again, there is no file named “.env” so, I took it upon myself to find which files did contain “APP_KEY” here are the results:
Feel free to provide me a key inside “quotes” and I will insert it into line 85. This is not a production environment, so hacking isn’t going to be an issue. It’s only a test environment.