cdevroe / unmark

An open source to do app for bookmarks.
https://unmark.it
Other
1.6k stars 194 forks source link

setup ? #282

Closed ithakaa closed 2 years ago

ithakaa commented 3 years ago

i'm trying to setup unmark on ubuntu without docker, mysql db / apache is setup and woking but when i browse to http://myserverip/setup i'm getting a 404 I can't see any file or directory called setup in unmark what am i missing ?

Labo9 commented 3 years ago

Same kinf of error here, hosted on hostinger litespeed server, with SSL and subdomain, database properly configured. Thanks

cdevroe commented 3 years ago

@ithakaa @Labo9 The .htaccess file will send requests to particular controllers within the application. If the controller -> method is the same as the URL (e.g. /install/setup) then it just runs. But, if it differs, it needs to be in the routes file

All this is to say, be sure that rewrite URLs are working in your apache setup. /setup should run the install/setup controller method.

Labo9 commented 3 years ago

Thanks @cdevroe.

Fixed by adding this line to .htaccess : RewriteRule ^(.*)$ /index.php?/$1 [L]

Now, next error : The migration class "Migration_Create_nilai" is missing an "up" method.

Labo9 commented 3 years ago

Thanks @cdevroe.

Fixed by adding this line to .htaccess : RewriteRule ^(.*)$ /index.php?/$1 [L]

Now, next error : The migration class "Migration_Create_nilai" is missing an "up" method.

Fixed by downgrading PHP version from 8 to 7.4

Labo9 commented 3 years ago

Thanks @cdevroe.

Fixed by adding this line to .htaccess : RewriteRule ^(.*)$ /index.php?/$1 [L]

Better .htaccess (no more 404 on manifest.json) :

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L]

witecat commented 2 years ago

I'm also getting the 404 error on install. Installing on shared web server, I have not the luxury of using Docker. It may not be advisable, but in many situations Docker is not an option and actually makes things way more complicated than they need to be. Mor detailed instructions would help a lot

So, will I be ever able to install unmark? Please help!

@cdevroe says

The .htaccess file will send requests to particular controllers within the application. If the controller -> method is the same as the URL (e.g. /install/setup) then it just runs. But, if it differs, it needs to be in the routes file

But I do not understand whether I actually need to edit this file nor what do I need to change/add. My .htaccess seems in order.
Here is what it looks like

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
        RewriteCond %{REQUEST_URI} ^system.*
        RewriteRule ^(.*)$ /index.php?/$1 [L]

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
        RewriteCond %{REQUEST_URI} ^unmark.*
        RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?/$1 [L]
        RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin
        ErrorDocument 404 index.php
</IfModule>

Grateful for any help. Thank you

cdevroe commented 2 years ago

@witecat You should not need to edit the .htaccess file. But perhaps you can do what others on this thread have done.

I'm sorry you're having trouble. I have installed Unmark locally hundreds of times. Without a specific error from your log, I don't know what I would suggest.

I'm going to close this thread for now, as it doesn't point to any specific issue. If you do find a specific issue, please report it in a brand-new thread.