turbo124 / Plane2Ninja

Export data from Invoice Plane to Invoice Ninja
MIT License
14 stars 10 forks source link

Download data resolving wrong address - http://localhost/crunch/clients #5

Closed turketo closed 7 years ago

turketo commented 7 years ago

Hey Team,

I have been enjoying the challenge of migrating my invoices from fusion > invoiceplane > invoiceninja

Following the instructions and issue trail, I have cloned locally, installed dependencies via composer (typing composer install after changing to correct director) edited the .env file supplied to connect to my IP database, then generate an artisan key.

I was excited to see the download data button, but then stopped dead by it resolving the address: http://localhost/crunch/clients. I've updated IP, tested the connection to the database and deleted and gone through the install three times now. What should I be looking at next?

Here's my .env file

APP_NAME=Laravel APP_ENV=local APP_KEY=base64:long-ass-key APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://localhost

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=db_invoiceplane DB_USERNAME=un_invoiceplane DB_PASSWORD=securedpassword

BROADCAST_DRIVER=log CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379

MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null

PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET=

turbo124 commented 7 years ago

@turketo this sounds like an issue with your virtual host setup.

Are you using apache or nginx? are you rewriting the URLs correctly?

turketo commented 7 years ago

@turbo124 I am running XAMPP on windows, so Apache.

I reviewed, made the amendments and had forgotten to restart my apache service. All humming along wonderfully.

You sir, are a gentleman and a scholar. If you have a site I can donate at, I'd love to cover you for a cup of coffee.

turbo124 commented 7 years ago

Thanks for letting me know!

kintaro1981 commented 7 years ago

Same problem here but on nginx, I installed plane2ninja in a subdirectory

I brutally solved editing index.blade.php pointing to the subdirectory... now I have an sql error (I'm going to open a different issue)

turbo124 commented 7 years ago

@kintaro1981 how are you rewriting in NGINX?

kintaro1981 commented 7 years ago

@turbo124 my configuration for plane2ninja is:

server {
    server_name domain.com www.domain.com;
    listen xxx.xxx.xxx.xxx;
    root /home/domain/public_html;
    index index.html index.htm index.php;
    access_log /var/log/virtualmin/domain.com_access_log;
    error_log /var/log/virtualmin/domain.com_error_log;

    fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    fastcgi_param SERVER_SOFTWARE nginx;
    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;
    fastcgi_param SCRIPT_FILENAME /home/domain/public_html$fastcgi_script_name;
    fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    fastcgi_param REQUEST_URI $request_uri;
    fastcgi_param DOCUMENT_URI $document_uri;
    fastcgi_param DOCUMENT_ROOT /home/domain/public_html;
    fastcgi_param SERVER_PROTOCOL $server_protocol;
    fastcgi_param REMOTE_ADDR $remote_addr;
    fastcgi_param REMOTE_PORT $remote_port;
    fastcgi_param SERVER_ADDR $server_addr;
    fastcgi_param SERVER_PORT $server_port;
    fastcgi_param SERVER_NAME $server_name;
    fastcgi_param HTTPS $https;
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass localhost:8000;
    }

    location /invoiceplane {
        index index.php;
            try_files $uri $uri/ /invoiceplane/index.php?q=$uri;
    }

    location /invoiceninja {
        index index.html index.htm index.php;
        try_files $uri $uri/ /invoiceninja/public/index.php?$query_string;
    }
    #plane2ninja
    location /plane2ninja {
        index index.html index.htm index.php;
        try_files $uri $uri/ /plane2ninja/public/index.php?$query_string;
    }

    listen xxx.xxx.xxx.xxx:443 ssl;
    ssl_certificate /home/domain/ssl.cert;
    ssl_certificate_key /home/domain/ssl.key;
    fastcgi_read_timeout 30;
}