link issues
Hi,
I can't run that system properly. Could you write some short tutorial how to run it properly, please?
I discovered that the index.php file contains the wrong patch to autoloader.php file:
Line 2 contain require_once('vendor/autoload.php'); but I think that should be require_once('php/autoloader.php');. Am I correct?
After that change, the search engine is working and shows results, but when I click on any link I'm getting blank (error 500).
Good catch. That gets me to the same place.
I changed the vendor/autoload.php to php/autoloader.php in read.php as well. After doing that, I get this error:
2021-04-11 15:16:55.109605 [NOTICE] [2264587] [redacted] [STDERR] PHP Fatal error: Uncaught Error: Class 'andreskrey\Readability\Configuration' not found in /home/redacted/public_html/read.php:31 Stack trace: #0 {main} thrown in /home/redacted/public_html/read.php on line 31
I assume that we may need to import something from here: https://github.com/andreskrey/readability.php
I've never used php or the composer mentioned there before, so I'll leave that to the experts.
You should not have to change the autoloader call. What you are probably missing is that the Readability class has to be added. To do this, use composer. For details on how to do this, see https://getcomposer.org/download/ .
Then, you can simply clone this repository (or download it as ZIP and unzip it), and use a shell to do the following:
cd <directory where you installed frogfind>
composer install
This should download the necessary dependencies and get FrogFind to work.
@Shuswap and @INDIGI-CO-UK can you confirm my solution solves your issue?
@Shuswap and @INDIGI-CO-UK can you confirm my solution solves your issue?
Yes. It works. Thank you.
Here's a summary of the install and usage on a Debian 10 system with apache2 and php7.3 installed:
From within the /var/www/html directory, where I put the FrogFind files, I ran the commands on the composer website to install composer.
Then I had to install php7.3-xml php7.3-mbstring
From inside the same directory, I had to execute the following commands:
php composer.phar update php composer.phar install
The commands wouldn't work as a regular user and I couldn't su as www-data. I'll have to figure that out later. It's a test system, with no incoming ports accessible from the internet, so I ran the commands as root and then executed the following command from within /var/www/html (I just wanted to see if the setup would work):
chown -R www-data:www-data *
I think anyone reading this and intending to open incoming ports and expose their server to the internet should figure out how to execute the composer commands as a regular user.
afaik FrogFind (so, the web server process, usually run by www-data on Debian) only does read access to your /var/www/html subdirectory, so you could simply have it owned by your own user, e.g.:
chown -R myuser:myuser /var/www/html
Then you can simply edit, modify and update the code itself (including composer install etc.) without having to issue the commands as another user.
I thought I would add that if you have free web hosting that does not allow you to install composer, you can set everything up on a machine that you fully control and then .zip the directories and transfer them over to your free web hosting.
I thought I would add that if you have free web hosting that does not allow you to install composer, you can set everything up on a machine that you fully control and then .zip the directories and transfer them over to your free web hosting.
It could work, whatever the machine on which the installation was made?
It works for me. I set it up on a server with Debian 10, apache2, and php7.3. Then I transferred it to my x10hosting account.
It seems like what composer is doing is downloading all the files associated with readability and adding them into a vendor directory. It must also update the two composer files in the main directory.
So if you do this, you might want to leave the original installation set up and run a composer update occasionally to get any updates/security fixes. Then you would need to transfer over the composer files and the vendor directory again. That's what I'm going to do.
Indeed, the only thing that composer does is defined in https://github.com/ActionRetro/FrogFind/blob/main/composer.json#L3 , which simply means to fetch https://packagist.org/packages/andreskrey/readability.php, place it into the vendor directory and set the autoloading.