Coder Social home page Coder Social logo

Invalid routing pattern: GET / about selfoss HOT 25 CLOSED

fossar avatar fossar commented on May 26, 2024
Invalid routing pattern: GET /

from selfoss.

Comments (25)

SSilence avatar SSilence commented on May 26, 2024

Hm, a strange behaviour.

Have you set the base url in config.ini?
Have you set the RewriteBase in the .htaccess?

Best regards
Tobi

from selfoss.

Creat1veM1nd avatar Creat1veM1nd commented on May 26, 2024

Yes, I set both and also tried different vways.

The URL to my selfoss installation is:

http:///misc/selfoss

So I tried /misc/selfoss and misc/selfoss
I also tried both variations with an / at the end.

No luck. Still the same message.

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Which webserver do you use? The three /// seems to be wrong.

from selfoss.

Creat1veM1nd avatar Creat1veM1nd commented on May 26, 2024

Seems my post was formatted wrong. It should have been

http://myserver.tld/misc/selfoss

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Which webserver environment do you use?

from selfoss.

Creat1veM1nd avatar Creat1veM1nd commented on May 26, 2024

PHP 5.3.13 (CGI / FastCGI)
Apache

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Are you using VirtualHost config? I have no idea what the reason could be. What does the apache access/error log say?

from selfoss.

cgutteridge avatar cgutteridge commented on May 26, 2024

It may be the PCRE version. https://groups.google.com/forum/?fromgroups=#!topic/f3-framework/7tfAuEPh_wY

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Hm, that could be the reason. WHich PCRE version do you use? Its listed in the phpinfo output.

I use the 8.12. Regarding the thread cgutteridge have posted you need at least version 8.

from selfoss.

cgutteridge avatar cgutteridge commented on May 26, 2024

My version is 6.6 and doesn't work with the latest version of F3 which is vexing because up until now it was a pretty low stress tool. This additional requirement is not achievable as we've 100+ sites on that server so shifting versions on a library isn't a minor risk.

from selfoss.

Creat1veM1nd avatar Creat1veM1nd commented on May 26, 2024

My pcre is 6.6. Since it is a managed server, I am not able to update it by myself.

error.log says the same as I posted in my first post. sadly no further info.

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

In this case selfoss depends on the fat free php framework and how they use the php libraries. I can understand the update problem.

I have updated the fat free php framework to the newest Version 3.0.5. Please check whether the newest version solves the problem. Just upload the files from selfoss/libs/f3.

from selfoss.

Creat1veM1nd avatar Creat1veM1nd commented on May 26, 2024

I uploaded the framework. Sadly the error is still there:

Internal Server Error

Invalid routing pattern: GET /

from selfoss.

jwbargsten avatar jwbargsten commented on May 26, 2024

I would make sure that your redirection is working correctly.

Make a small test with a simple .htaccess:

RewriteEngine On
RewriteBase /misc/selfoss

RewriteRule (.*)in(.*) welcome.html

create a welcome.html and add a string, e.g.

test

If you open http://myserver.tld/misc/selfoss/index.html you should see the text of welcome.html.
If not, probably one option in the apache config is wrong. Could be AllowOverride None which should be AllowOverride All.

from selfoss.

Creat1veM1nd avatar Creat1veM1nd commented on May 26, 2024

I did as you suggested. All worked. I opened index.html and got the "test" of welcome.html.

Seems as if redirection is working correctly.

from selfoss.

jwbargsten avatar jwbargsten commented on May 26, 2024

Hmm, it was worth a try.

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Sadly I can not change this behavior. Hope fatfree will update their lib and support this pcre version in the future.

from selfoss.

cyberscribe avatar cyberscribe commented on May 26, 2024

I had this identical problem, and was able to get f3 to work just fine with PCRE 6.x by making a simple change to the codebase. In lib/base.php, for every instance of preg_match, [preg_replace, and preg_split] I simply replaced the pattern for a horizontal space ( \h ) with the pattern for a general space ( \s ). So far, everything works great, and all my routes are routing once again.

EDIT: also need to address preg_replace and preg_split--bascially all instances of \h to become \s

from selfoss.

MaikL avatar MaikL commented on May 26, 2024

@cyberscribe It would be very nice, if you colud attach a pull request or let us otherwise know, which changes you made to the code.
I tried to replace \h by \s but that didnt work, as expected. At first, everything seems to work, but as soon, as I added the first rss feed, I got the following errror:

internal Server Error

preg_match_all() [function.preg-match-all]: Compilation failed: unrecognized character after (?< at offset 3

from selfoss.

cyberscribe avatar cyberscribe commented on May 26, 2024

Hi,

Attached is a patch. Hope it helps. Worked for me.

Best,
Robert

On 6 September 2013 10:21, MaikL [email protected] wrote:

@cyberscribe https://github.com/cyberscribe It would be very nice, if
you colud attach a pull request or let us otherwise know, which changes you
made to the code.
I tried to replace \h by \s but that didnt work, as expected. At first,
everything seems to work, but as soon, as I added the first rss feed, I got
the following errror:

internal Server Error

preg_match_all() [function.preg-match-all]: Compilation failed:
unrecognized character after (?< at offset 3


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-23928383
.

from selfoss.

cyberscribe avatar cyberscribe commented on May 26, 2024
124c124
<         return preg_split('/\[\h*[\'"]?(.+?)[\'"]?\h*\]|(->)|\./',
---
>       return preg_split('/\[\s*[\'"]?(.+?)[\'"]?\s*\]|(->)|\./',
758,759c758,759
<                     '(.+?)\h*=\h*'.
<                     '((?:\\\\\h*\r?\n|.+?)*)'.
---
>                   '(.+?)\s*=\s*'.
>                   '((?:\\\\\s*\r?\n|.+?)*)'.
767c767
<                                 '/(?<!\\\\)"|\\\\\h*\r?\n/','',$match[2]));
---
>                               '/(?<!\\\\)"|\\\\\s*\r?\n/','',$match[2]));
925,926c925,926
<         preg_match('/([\|\w]+)\h+([^\h]+)'.
<             '(?:\h+\[('.implode('|',$types).')\])?/',$pattern,$parts);
---
>       preg_match('/([\|\w]+)\s+([^\s]+)'.
>           '(?:\s+\[('.implode('|',$types).')\])?/',$pattern,$parts);
967,968c967,968
<         preg_match('/([\|\w]+)\h+([^\h]+)'.
<             '(?:\h+\[('.implode('|',$types).')\])?/',$pattern,$parts);
---
>       preg_match('/([\|\w]+)\s+([^\s]+)'.
>           '(?:\s+\[('.implode('|',$types).')\])?/',$pattern,$parts);
970c970
<             user_error(sprintf(self::E_Pattern,$pattern));
---
>           user_error(sprintf(self::E_Pattern,$pattern ));
1181c1181
<             preg_match('/(.+)\h*(->|::)\h*(.+)/s',$func,$parts)) {
---
>           preg_match('/(.+)\s*(->|::)\s*(.+)/s',$func,$parts)) {
1253,1254c1253,1254
<             '(.+?)\h*=\h*'.
<             '((?:\\\\\h*\r?\n|.+?)*)'.
---
>           '(.+?)\s*=\s*'.
>           '((?:\\\\\s*\r?\n|.+?)*)'.
1278c1278
<                             return preg_replace('/\\\\\h*\r?\n/','',$val);
---
>                           return preg_replace('/\\\\\s*\r?\n/','',$val);
1786c1786
<             if (empty($this->ref) && !preg_match('/^folder\h*=/',$dsn))
---
>           if (empty($this->ref) && !preg_match('/^folder\s*=/',$dsn))
1793c1793
<             if (preg_match('/^folder\h*=\h*(.+)/',$dsn,$parts) &&
---
>           if (preg_match('/^folder\s*=\s*(.+)/',$dsn,$parts) &&

from selfoss.

mrfrasier avatar mrfrasier commented on May 26, 2024

Thank you @cyberscribe , I wasted all morning trying to get PCRE updated, and this fixed it no problem.

from selfoss.

cyberscribe avatar cyberscribe commented on May 26, 2024

Glad it helped @mrfrasier !

from selfoss.

jtojnar avatar jtojnar commented on May 26, 2024

The issue re-appeared for me after upgrade to PHP 7.1.11, opened an issue upstream f3-factory/fatfree-core#231

from selfoss.

jtojnar avatar jtojnar commented on May 26, 2024

Apparently it is caused by cross-contamination by PCRE symbols from Apache.

from selfoss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.