polr icon indicating copy to clipboard operation
polr copied to clipboard

Cannot get this to work at all

Open alroberts opened this issue 4 years ago • 4 comments

Expected Behavior

Following instructions both on the GitHub page and also the documentation on https://docs.polrproject.org/en/latest/user-guide/installation/ failed to work for me.

Current Behavior

At present, simply extracting and unzipping contents (with updated document root etc, as guided), simply shows a white page. I've dumped a basic HTML file in there to test that the document root is working, and I am able to navigate to that file just fine and it shows in the browser, but /setup or simply the domain will just show a white page.

I've also ran the composer installations etc, as per the user guide, and still the same issue. When running through the composer install, the following warnings are shown:

Package jeremeamia/superclosure is abandoned, you should avoid using it. Use opis/closure instead. Package mtdowling/cron-expression is abandoned, you should avoid using it. Use dragonmantank/cron-expression instead. Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files Class PHPExcel_Power_Best_Fit located in ./vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.php does not comply with psr-0 autoloading standard. Skipping. Class PHPExcel_Exponential_Best_Fit located in ./vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php does not comply with psr-0 autoloading standard. Skipping. Class PHPExcel_Best_Fit located in ./vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php does not comply with psr-0 autoloading standard. Skipping. Class PHPExcel_Logarithmic_Best_Fit located in ./vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php does not comply with psr-0 autoloading standard. Skipping. Class PHPExcel_Linear_Best_Fit located in ./vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php does not comply with psr-0 autoloading standard. Skipping. Class PHPExcel_Polynomial_Best_Fit located in ./vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php does not comply with psr-0 autoloading standard. Skipping. Carbon 1 is deprecated, see how to migrate to Carbon 2.

Checking the Apache Error log provides the following error:

[Sun Jan 03 01:25:38.045536 2021] [php7:error] [pid 2495] [client 109.103.199.70:56252] PHP Fatal error: Uncaught InvalidArgumentException: Dotenv: Environment file .env not found or not readable. Create file with your environment settings at /sites/clujxyz_com/bootstrap/../.env in /sites/clujxyz_com/vendor/vlucas/phpdotenv/src/Dotenv.php:33\nStack trace:\n#0 /sites/clujxyz_com/bootstrap/app.php(5): Dotenv::load()\n#1 /sites/clujxyz_com/public/index.php(14): require('/sites/...')\n#2 {main}\n thrown in /sites/clujxyz_com/vendor/vlucas/phpdotenv/src/Dotenv.php on line 33, referer: https://clujxyz.com/setup

Your Environment

  • Latest version on GitHub (Stable 2.2.0):
  • Environment name and version (e.g. Firefox 84.0.1, PHP PHP 7.4.3, Modules listed below):
  • [PHP Modules] calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv igbinary imagick imap intl ionCube Loader json ldap libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_dblib pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar posix readline redis Reflection session shmop SimpleXML sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib
  • Instance link: https://clujxyz.com

Apache Config file: <VirtualHost *:80> DocumentRoot /sites/clujxyz_com/public ServerName clujxyz.com ServerAlias www.clujxyz.com <Directory /sites/clujxyz_com/public/> Options -Indexes +FollowSymLinks AllowOverride All Require all granted DirectoryIndex index.html index.htm index.php </Directory> </VirtualHost>

alroberts avatar Jan 02 '21 23:01 alroberts

Same results with composer installation. I somehow managed to get the setup screen by using php5.6 instead of php8, but it constantly fails to do anything, from registration to login. All the account and login system is broken and every time I try something it pop up "Something went wrong" in web browser.

I'm using latest Gitub version, running Ubuntu 20 and Nginx.

sofiadparamo avatar Jan 24 '21 02:01 sofiadparamo

PHP Fatal error: Uncaught InvalidArgumentException: Dotenv: Environment file .env not found or not readable.

You forgot to run cp .env.example .env. Once copied, you'll need to fill out the appropriate details in the newly copied environment file (.env). Any file that starts with . will be hidden when you run ls, but you can use ls -a to see those types of hidden files.

I somehow managed to get the setup screen by using php5.6 instead of php8, but it constantly fails to do anything, from registration to login.

PHP 7.4 seems to be the best version to use. PHP 8 is very new and isn't supported by many libraries yet. When you get a "Something went wrong", the log file storage/logs/lumen.log would be updated. I'm going to take a wild guess that it has something to do with you not defining your application key. If you have APP_KEY= in your .env file, you can use php artisan key:generate --force to generate a new application key.

mattmalec avatar Jan 26 '21 02:01 mattmalec

I think you have to copy the file, Then run the chown & chmod commands. Possibly out of order in the docs? If you reverse them you'll end up with the .env file owned by su not www-data.

samuelhop avatar Feb 11 '21 05:02 samuelhop

I think you have to copy the file, Then run the chown & chmod commands. Possibly out of order in the docs? If you reverse them you'll end up with the .env file owned by su not www-data...

...I was able to get a working installation searching the web for "Install Polr on [Operating system]" Use one of those type of guides, because if you chown before you copy the .env.setup file www-data won't be able to write the database config to .env and you'll end up with that nasty error dump and basically may as well start over from the top. (unless you forced www-data into shell and are running the commands under it, which iirc is bad practice and should be avoided.) As an end user I appreciate the complexity of writing installation docs... Have a plan?

samuelhop avatar Feb 12 '21 18:02 samuelhop