-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index updates via scheduler fail (wrong PHP version) #112
Comments
Same here. |
Grav CLI tries to determine correct PHP version automatically. What does "/usr/bin/env php" return? |
That seems to be the difference in behavior of this plugin. The other plugins don't depend on this. Maybe it's best to keep things consistent? I now see the error I asked the admin of the system to install I'll report back once I know more. |
It's just coincidence because this plugin specifically uses Grav CLI, nothing wrong with that. Other plugins probably execute direct Grav APIs. If /usr/bin/env fails then you should see failing main "bin/grav" too. As to why it worked before for you, plugin was fixed to run again couple of months ago, because it was completely broken in 1.6 and 1.7 and you probably never saw that in the GUI. |
I specifically provide the PHP version for I use this, then it works fine for all plugins, except the Let's see if the |
On a Plesk system this is not convenient. I just talked to the admin. He removed the Would it be possible to use the Grav APIs? Because a good fix is not possible. If a symlink was created for |
This is EXACTLY what env was designed for and why it should be used. You don't need to create a symlink to the correct PHP version, env should find it according to your PATH environment. As far as I remember Plesk uses different users for different vhosts. If env cannot find correct PHP version then your PATH for that particular user is misconfigured. I'm running Grav with TNTSearch under Virtualmin with similar setup. It works correctly.
There is no point of changing how plugin works because as I said, other plugins and Grav itself uses the same CLI functionality. If you think Grav is not compatible with Plesk you should rise the ticket on main Grav repository, but again, your issue should be easy fixable by an admin. |
The only plugin that has issues is |
I'm not the plugin author, so it's not up to me. I just wanted to help. All I can do is just repeat myself, that if you see this issue, there will be other issues, like for example "bin/grav backup" failing. Every code which depends on the Grav CLI and is executed automatically WILL fail. The issue is in the environment, and should be fixed there. |
Backups work fine as well via the scheduler. It's only
|
Will someone please have a look at this? On a Plesk instance this is broken, only for the TNT Search plugin. |
Hi,
Thanks for the amazing work on Grav! It really empowers my website design and experience. I ran into a problem with the TNT Search scheduler. I'm running Grav on Plesk. Which so far works excellent. In Plesk I can select different versions of software for each website, such as PHP 7.4 by selecting it in the menu for my Grav website. This then points it to
/opt/plesk/php/7.4/
. This path is respected by Grav. Except for scheduling TNT Search re-indexes.I'm using Grav v1.6.31 and TNT Search v3.3.0.
Manual indexes work fine. Other schedulers work fine too (mail queue, auto cache purges, auto backup, etc.). But the scheduled re-index fails because it seems to use the system installed PHP version, which is PHP 5.4.6.
I've taken a look, but at first glance I don't see much difference with other scheduled plugins.
When I run it via the CLI with the right PHP version, it works fine:
The text was updated successfully, but these errors were encountered: