Previous Thread
Next Thread
Print Thread
Hop To
Enable Spider Friendly Urls Issues #260920 01/15/2018 11:32 AM
Joined: Aug 2006
Posts: 95
Geoff Offline OP
Journeyman
OP Offline
Journeyman
Joined: Aug 2006
Posts: 95
When I enable, we get an error message, “Sorry, you are not logged in or do not have permissions to do that.”

Logged in and seemed to work but then took me back to login screen with same error message.

Completely locked out as keeps giving same error message every time. Tried different steps and still same error message. Could not log back in on phone. I had the settings pulled up on computer and was able to change back without spider friendly urls. Saved for some reason as thought would say not logged in.

From php.ini:

Quote
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting
; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://php.net/cgi.fix-pathinfo
cgi.fix_pathinfo=1


This was same issue I have had in past and why never enabled this feature. Any ideas?

NOTE: I have had these issues before adding the following custom code to our htaccess file.

Quote
# WP REWRITE LOOP START
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# RewriteRule for Custom 3rd Party Apps outside of WP
RewriteRule ^forums/ - [L]



Also should note the attached image indicates the Keep me Logged In button does not show when error msg thrown. This applies also when spider friendly url turned off error message too

Attached Files 0E1E6A11-0016-4CC9-B1CE-3E4ECE6982E3.png
Last edited by Geoff; 01/15/2018 1:53 PM. Reason: htaccess custom code

I am a Superstar! Testing signature here
Re: Enable Spider Friendly Urls Issues [Re: Geoff] #260921 01/15/2018 2:00 PM
Joined: Apr 2004
Posts: 1,549
isaac Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,549
As per the documentation you quoted, and the url you've included in your quote:

correct your php.ini from:
cgi.fix_pathinfo=1

to:
cgi.fix_pathinfo=0

or just comment it out all together, as:
;cgi.fix_pathinfo=1


If you have a recent version of PHP-FPM (~5.3.9+?), then you need to do nothing, as the safe behaviour below is already the default.

Further reading at:
https://serverfault.com/questions/6...info-really-dangerous-with-nginx-php-fpm
and
https://en.wikipedia.org/wiki/Common_Gateway_Interface


Current developer of UBB.threads PHP Forum Software // 7.7.3 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Enable Spider Friendly Urls Issues [Re: isaac] #260929 01/15/2018 3:48 PM
Joined: Aug 2006
Posts: 95
Geoff Offline OP
Journeyman
OP Offline
Journeyman
Joined: Aug 2006
Posts: 95
Awesome. Thank you!

PHP 5.6


I am a Superstar! Testing signature here
Re: Enable Spider Friendly Urls Issues [Re: Geoff] #262439 03/01/2019 8:36 PM
Joined: Mar 2008
Posts: 326
DLWebmaestro Offline
Enthusiast
Offline
Enthusiast
Joined: Mar 2008
Posts: 326
I'm sorry that I'm not sorry for resurrecting an old thread. ;-) My post intends to address a few things in this one, so I felt it was pertinent.

I recently started tinkering with nginx on my home computer; had been using Apache for eons. I cannot, for the life of me, get these "friendly" URLs working correctly. I have 'kinda' gotten them working by using:

Code
location / {
            try_files $uri $uri/ /index.php?$args; 
}


But this just returns the same portal page, even if I click on the User List link. Without the above snippet, I get the nginx "No input file specified" when trying to use spider links. I'm running PHP 7.3.0 and nginx 1.15.9. I have tried setting cgi.fix_pathinfo to equal 0, to equal 1, and to just commenting it out, all to no avail. (Yes, I restart everything after making the changes.) I've come across multiple examples of people using 'rewrite' to make the links work on their particular website for whatever scripts they're using, but 'rewrite' looks like Greek to me. Here is the gist of the location section of my nginx.conf file:

Code
        location ~ \.php$ {
            include        fastcgi_params;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

#This displays the website, but only the portal page, regardless of which link I click.
location / {
            try_files $uri $uri/ /index.php?$args; 
}


Thank you in advance!

P.S. -- I tried replacing the 'index.php' in the 'try_files' section with 'ubbthreads,php' and that still did not work.

Last edited by DLWebmaestro; 03/01/2019 8:38 PM.
Re: Enable Spider Friendly Urls Issues [Re: Geoff] #262446 03/03/2019 3:40 PM
Joined: Dec 2003
Posts: 5,998
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,998
Using a home computer has it's own issues.
I have used xampp and wamp but never nginx.
But here is what it does for me.
You can't use a alias domain name if accessed outside of the pc local lan..
Thats what spider frendly urls attempts to do.(create a url from outside of your lan)
So it goes outside of your network and looks for it.
Even if you use a virtual path.once you click on the first link it is broken.
Unless you have registered a name with dns pointers to your pc.
Your site will use your public ip ,whatever that is unless you have a registered name with that ip.
And a home computer usually has a dynamic ip.
Also:
Note: The PATH_INFO environmental variable must be available for this feature to function properly.

So say you have a pc at local lan 192.168.0.20 you need to find your public ip like at "find my ip".
It will be unlike the ip range of your router
Use that as a port forward. in the cable modem.
Then you need to change the paths in ubb to match that IP..
as well as the alias url
So it will endup as http://##.##.##.###/forums/?????/html

I hope that was clear as mud.

Maybe somebody can explain it better than I can.

Last edited by Ruben; 03/03/2019 3:59 PM. Reason: Added Comment.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Enable Spider Friendly Urls Issues [Re: DLWebmaestro] #262453 03/04/2019 4:05 AM
Joined: Jul 2006
Posts: 105
Philipp Offline
Member
Offline
Member
Joined: Jul 2006
Posts: 105
Originally Posted by DLWebmaestro
I'm sorry that I'm not sorry for resurrecting an old thread. ;-) My post intends to address a few things in this one, so I felt it was pertinent.

I recently started tinkering with nginx on my home computer; had been using Apache for eons. I cannot, for the life of me, get these "friendly" URLs working correctly.

I think this is what you are looking for:
https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/

Re: Enable Spider Friendly Urls Issues [Re: Geoff] #262553 03/19/2019 4:28 PM
Joined: Mar 2008
Posts: 326
DLWebmaestro Offline
Enthusiast
Offline
Enthusiast
Joined: Mar 2008
Posts: 326
I have a domain pointing to my local machine, so that's not the issue. And my config files look just like those examples.
This is getting to be not worth the hassle. Is anyone running nginx able to use spider friendly, or do I just throw in the towel and try another board software?

Last edited by DLWebmaestro; 03/19/2019 4:31 PM.
Re: Enable Spider Friendly Urls Issues [Re: Geoff] #262555 03/19/2019 4:36 PM
Joined: Jun 2006
Posts: 15,852
Gizmo Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,852
As the developers of UBB.threads, we assume that you have a working web server, capable of hosting PHP scripts with the path_info variable readily available to the system; the configuration of your web server to get to that point is outside of the scope of support for these user to user forums. Any support provided by the userbase is at their discretion and is not provided by the vendor.

I can say that the Smarty templating engine is quite fickle when it comes to permissions; I'd use the permission checker in the CP to check your files, and manually ensure your sessions/ and templates/compile/ folders are chmodded 777 (full read/write).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Mobile app?
by Baldeagle - 12/06/2019 9:32 PM
How do you change Text Line spacing?
by jorb - 11/23/2019 12:14 AM
What happened to FAQ or Forum Help
by Ruben - 11/20/2019 11:58 AM
Search feature encountering an Error message
by jorb - 11/20/2019 12:06 AM
UBB Dev
by JAISP - 11/03/2019 11:01 AM
Who's Online Now
0 registered members (), 86 guests, and 378 spiders.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191023)