cydrobolt / polr

:aerial_tramway: A modern, powerful, and robust URL shortener
https://polrproject.org
GNU General Public License v2.0
4.95k stars 893 forks source link

Difficulty installing Polr in shared hosting environment - NotFoundHttpException in Application.php line 425: #620

Open CapBlackShot opened 2 years ago

CapBlackShot commented 2 years ago

Expected Behavior

Setup page should be displayed properly, and installing Polr should work.

Current Behavior

All sorts of errors are coming up. The setup page doesn't load properly. After hitting the button to set Polr, I'm redirected to an error page "Whoops, looks like something went wrong".

After debugging it, I get:

NotFoundHttpException in [Application.php line 425]():
in [Application.php line 425]()
at Application->abort('404', '', array()) in [helpers.php line 20]()
at abort('404') in [SetupController.php line 224]()
at SetupController::finishSetup(object(Request))
at call_user_func_array(array(object(SetupController), 'finishSetup'), array(object(Request))) in [Container.php line 507]()
at Container->call(array(object(SetupController), 'finishSetup'), array()) in [Application.php line 1411]()
at Application->callControllerCallable(array(object(SetupController), 'finishSetup'), array()) in [Application.php line 1375]()
at Application->callLumenController(object(SetupController), 'finishSetup', array(true, array('as' => 'setup_finish', 'uses' => 'App\Http\Controllers\SetupController@finishSetup'), array())) in [Application.php line 1347]()
at Application->callControllerAction(array(true, array('as' => 'setup_finish', 'uses' => 'App\Http\Controllers\SetupController@finishSetup'), array())) in [Application.php line 1315]()
at Application->callActionOnArrayBasedRoute(array(true, array('as' => 'setup_finish', 'uses' => 'App\Http\Controllers\SetupController@finishSetup'), array())) in [Application.php line 1300]()
at Application->handleFoundRoute(array(true, array('as' => 'setup_finish', 'uses' => 'App\Http\Controllers\SetupController@finishSetup'), array())) in [Application.php line 1215]()
at Application->Laravel\Lumen\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in [Pipeline.php line 139]()
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in [VerifyCsrfToken.php line 43]()
at VerifyCsrfToken->handle(object(Request), object(Closure)) in [VerifyCsrfToken.php line 20]()
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in [Pipeline.php line 124]()
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in [ShareErrorsFromSession.php line 49]()
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in [Pipeline.php line 124]()
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in [StartSession.php line 62]()
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in [Pipeline.php line 124]()
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in [EncryptCookies.php line 59]()
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in [Pipeline.php line 124]()
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in [Pipeline.php line 102]()
at Pipeline->then(object(Closure)) in [Application.php line 1451]()
at Application->sendThroughPipeline(array('Illuminate\Cookie\Middleware\EncryptCookies', 'Illuminate\Session\Middleware\StartSession', 'Illuminate\View\Middleware\ShareErrorsFromSession', 'App\Http\Middleware\VerifyCsrfToken'), object(Closure)) in [Application.php line 1221]()
at Application->dispatch(null) in [Application.php line 1161]()
at Application->run() in [index.php line 28]() 

Possible Solution

N/A

Steps to Reproduce (for bugs)

  1. Follow the user guide installation for shared hosting environments
  2. Try to install Polr by going to its /setup folder.
  3. Context

    It won't even let me install or use Polr.

Your Environment

Hostinger - Shared Hosting Plan PHP 7.4

Screenshots:

chrome_rlwHzKNjZI

chrome_773xIaP4De

chrome_MdAf2VeMHy

chrome_Y76wkkmoDp

cydrobolt commented 2 years ago

The issue might be related to your shared hosting set up, but it's hard to know for sure without being able to see the error output when you finish setting up. What's shown in your browser console on the initial set up page? Looks like CSS styles aren't being loaded in.

CapBlackShot commented 2 years ago

The issue might be related to your shared hosting set up, but it's hard to know for sure without being able to see the error output when you finish setting up. What's shown in your browser console on the initial set up page? Looks like CSS styles aren't being loaded in.

@cydrobolt the second image is really what I see when I finish setting up. The next debug page is the debug version of the "Whoops, looks like something went wrong". I have tried installing it on my localhost (using xampp, PHP 7.4). Same output and same results. Would you like me to record a video trying to set it up?

Do you think I should mark/unmark any PHP extensions, according to the screenshot I posted?

Thanks for getting back to this issue, by the way!

bmsmadu commented 2 years ago

Dear Friend,

We are also facing same issue, we found the solution and sharing you to overcome your issue.

First thing this error meagerly user table creation error, so we have solution for creation user table.

Follow below steps and resolve tour issue.

  1. Download polr.zip file and rename to polr.sql
  2. create polr databse in MySql server, and set user permissions
  3. restore polr.sql file in to same database
  4. Rename .env.example to .env run your URL.
  5. update DB name, username, password, etcc..
  6. finally you will get already installed, ignore this error
  7. just run your url,
  8. website is ready, asking for your name and password. username: admin, password: password enjoy....

Share me your feedback.. Thanks.

CapBlackShot commented 2 years ago

Dear Friend,

We are also facing same issue, we found the solution and sharing you to overcome your issue.

First thing this error meagerly user table creation error, so we have solution for creation user table.

Follow below steps and resolve tour issue.

  1. Download polr.zip file and rename to polr.sql
  2. create polr databse in MySql server, and set user permissions
  3. restore polr.sql file in to same database
  4. Rename .env.example to .env run your URL.
  5. update DB name, username, password, etcc..
  6. finally you will get already installed, ignore this error
  7. just run your url,
  8. website is ready, asking for your name and password. username: admin, password: password enjoy....

Share me your feedback.. Thanks.

Hello,

I'll be back home in a few days. I'll let you know how it goes. Thank you! =)

CapBlackShot commented 2 years ago

Dear Friend,

We are also facing same issue, we found the solution and sharing you to overcome your issue.

First thing this error meagerly user table creation error, so we have solution for creation user table.

Follow below steps and resolve tour issue.

  1. Download polr.zip file and rename to polr.sql
  2. create polr databse in MySql server, and set user permissions
  3. restore polr.sql file in to same database
  4. Rename .env.example to .env run your URL.
  5. update DB name, username, password, etcc..
  6. finally you will get already installed, ignore this error
  7. just run your url,
  8. website is ready, asking for your name and password. username: admin, password: password enjoy....

Share me your feedback.. Thanks.

@bmsmadu same errors and issues, unfortunately.

What PHP version are you using? Are you running it under SQLite or MYSQL? Also, may I ask what your .htaccess file looks like?