Comments (11)
Same here. .bashrc
and .bash_profile
are set so that php -v
brings the PHP version 7.4. But the bin/grav scheduler -r
with a following bin/grav scheduler -d
shows, that it tries to use PHP version 5.4.
But it seems less a plugin problem but more of a server configuration issue.
from grav-plugin-tntsearch.
Grav CLI tries to determine correct PHP version automatically. What does "/usr/bin/env php" return?
from grav-plugin-tntsearch.
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 /usr/bin/env: php: No such file or directory
in the scheduler overview. This wasn't the case before. I guess Grav 1.7 changed this? Because the error used to be as I described it in the first post.
I asked the admin of the system to install coreutils
, because env
is missing. Hopefully that fixes it. But I personally think it would be best to stick to a certain standard that doesn't require extra system packages. And since the other plugins run fine in the scheduler, there seems to be better ways to do this.
I'll report back once I know more.
from grav-plugin-tntsearch.
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.
from grav-plugin-tntsearch.
I specifically provide the PHP version for /bin/grav
, otherwise an error indeed returns about a wrong PHP version. Now it indeed also returns the env
error. So this has become more clear with Grav 1.7. Hopefully env
will be able to point to the PHP version set as default by Plesk.
I use this, then it works fine for all plugins, except the tntsearch
.
/opt/plesk/php/7.4/bin/php ~/www.zeitgeistbeweging.nl/bin/grav scheduler -d
Let's see if the coreutils
package fixes everything :)
from grav-plugin-tntsearch.
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.
On a Plesk system this is not convenient. I just talked to the admin. He removed the /usr/bin/php
binary because Plesk uses /opt/plesk/php/7.4/bin/php
. With Plesk you can select a different PHP version per vhost. So I can also on the fly switch to PHP 8. This is then picked up by Grav without issues. This also works fine for all plugins, but tntsearch
does not work in such a setup when using the scheduler. When running the tntsearch
index from the GUI, it works fine.
Would it be possible to use the Grav APIs? Because a good fix is not possible. If a symlink was created for /usr/bin/php
to /opt/plesk/php/7.4/bin/php
, then that has to be manually maintained. It also should be a sensible default for all the other users on the system. Plesk doesn't work like that.
from grav-plugin-tntsearch.
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.On a Plesk system this is not convenient. I just talked to the admin. He removed the
/usr/bin/php
binary because Plesk uses/opt/plesk/php/7.4/bin/php
. With Plesk you can select a different PHP version per vhost. So I can also on the fly switch to PHP 8.
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.
This is then picked up by Grav without issues. This also works fine for all plugins, but
tntsearch
does not work in such a setup when using the scheduler. When running thetntsearch
index from the GUI, it works fine.Would it be possible to use the Grav APIs? Because a good fix is not possible. If a symlink was created for
/usr/bin/php
to/opt/plesk/php/7.4/bin/php
, then that has to be manually maintained. It also should be a sensible default for all the other users on the system. Plesk doesn't work like that.
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.
from grav-plugin-tntsearch.
The only plugin that has issues is tntsearch
. Everything else works fine. So the issue I'm having is not really with Plex. Because Grav works fine. It's only tntsearch
that runs into this problem. So I'll repeat my kind and respectful request to make use of the Grav API instead of what is used now. In my opinion that would be the most easy and productive way forward. But I'll leave that up to you. I hope you change your mind.
from grav-plugin-tntsearch.
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.
from grav-plugin-tntsearch.
Backups work fine as well via the scheduler. It's only tntsearch
that causes this issue.
$ /opt/plesk/php/7.4/bin/php ~/www.zeitgeistbeweging.nl/bin/grav scheduler -d
Job Details
===========
┌─────────────────────┬──────────────────┬──────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Job ID │ Last Run │ Next Run │ Errors │
├─────────────────────┼──────────────────┼──────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ tntsearch-index │ 2021-01-29 05:01 │ 2021-01-30 05:01 │ /usr/bin/env: php: No such file or directory │
│ email-flushqueue │ 2021-01-29 06:37 │ 2021-01-29 06:38 │ None │
│ git-sync │ 2021-01-28 23:00 │ 2021-01-29 12:00 │ None │
│ default-site-backup │ 2021-01-29 01:00 │ 2021-01-30 01:00 │ None │
│ cache-clear │ 2021-01-29 03:00 │ 2021-01-30 03:00 │ None │
└─────────────────────┴──────────────────┴──────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
from grav-plugin-tntsearch.
Will someone please have a look at this? On a Plesk instance this is broken, only for the TNT Search plugin.
from grav-plugin-tntsearch.
Related Issues (20)
- No french translation HOT 1
- Warning: Please use `require("history").createBrowserHistory` instead of `require("history/createBrowserHistory")`. HOT 1
- Indexing Modular and Custom Field Content with Flex Pages HOT 7
- Ignore accents HOT 1
- Query parameter "q" does not work HOT 5
- Customize TNTSearchQuery error : Argument 1 passed … must be an instance of Grav\Theme\Event HOT 1
- Indexing succeeds, searching give no results HOT 14
- Irregular results HOT 21
- Multisite setup. How to run the indexing ? HOT 5
- Modular Pages Being Skipped Despite Existing TNTSearch Template
- With update to Grav 1.7.22, TNTSearch now appears to fail when you type in an entire word/string HOT 6
- Incomplete Results for Strings that Include Numbers HOT 9
- Indexing flex objects HOT 5
- non-english characters HOT 1
- Bump to vendor's v2.9 at least to get the french stemmer and more HOT 3
- CLI indexing freezes
- Admin panel/blueprint breaks indexer HOT 3
- Search can't find text having soft hyphens and/or ligature control characters HOT 2
- Creation of dynamic property is deprecated since PHP 8.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grav-plugin-tntsearch.