Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Maybe path weirdness with Txp/php/linux
I’ve been using the php line $command = parse( 'cgi-bin/<txp:yield />' ) ;
to kick off C code that takes in user form inputs and then outputs calculation results. Been working great for 10+ years now. Today, I duplicated a working article and got the error output from php:
<!-- error output:
sh: cgi-bin/mtf: No such file or directory
-->
<!-- return value: 127 -->
The original article still works fine. mtf
is <txp:yield />
and exists in cgi-bin. The only way I can think of to get this error is if, for some reason, the execution path has been changed. Anyone have a clue? Should the path be specified in a more “absolute” way?
Edit: The article in question has “Draft” status, and I am running by hitting the “Draft” link in the admin panel. Does this preview mode do something odd with paths?
Last edited by skewray (2024-10-30 19:35:54)
Offline
Re: Maybe path weirdness with Txp/php/linux
For posterity: The preview links in Txp set the current working directory to /textpattern/
, so creating a soft link from /textpattern/cgi-bin
to ../cgi-bin
fixes the issue.
Offline
Re: Maybe path weirdness with Txp/php/linux
For the record: in txp 4.9 article preview happens on the public side, so no fix will be needed any more.
Offline
Re: Maybe path weirdness with Txp/php/linux
That’s definitely motivation to upgrade early. It appears that posterity won’t care all that much.
Last edited by skewray (2024-10-31 23:16:02)
Offline