SimpleSEF 2.0 (SMF 1.1.x and SMF 2.0)

Started by SlammedDime, December 05, 2009, 10:08:40 PM

Previous topic - Next topic

hartiberlin

Hi Feline,
I am so happy, that you are are helping here with it to get it to work,
cause I was always too afraid to install PrettyURL and SimpleSEF seems
much easier to get it to work and seems to change nothing in the database.

I hope SlammedDime will release soon a new version with all the fixes,
so it runs now perfect with PortaMX.

Many thanks to all the developers who work so hard.

Regards, Stefan.

SlammedDime

Thx for the tips feline... I won't use them all, but they will come in handy in coding solutions.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

#142
Quote from: feline on December 17, 2009, 03:57:39 PM
Ok .. I have get it to work, with small changes.
1.. fixed shorturl like myurl/?querystring
2.. fixed dot in querystrings like myurl/index.php?dot.query
1) You shouldn't be using 'shorturls' like this in any of your files.  The urls should have index.php in them.  Lets suppose a user has a index.html and index.php file in his/her SMF Directory, with the index.html file being a simple 'under construction' page that the user forgot to remove when installing SMF.  If their server is configured to look for index.html files before index.php files in the 'Default Document' structure, the 'shorturl' will load up index.html instead of index.php.  I won't be including any type of support for this 'style' of url because it is incorrect.

2) Please read PHP: Predefined Variables.  PHP by it's nature does this replacement because to PHP, '.''s are invalid in a variable name when passed via POST or GET.  This is something you should address in PortaMX, it's not a bug in this mod.  Reason PHP does this is that if register_globals is turned on, a variable name with a . is not a valid variable name, as variable names can only contain letters, numbers and underscores (PHP: Basics).

ie:
This is okay in a php url: index.php?mycat=category.3
This is not: index.php?my.cat=category3

That said... I have addressed this issue with using ?theme= or ?language=, as well as duplicate keys in the url (this was originally done on purpose, but I've revised how they are 'encoded/decoded' on creation and parsing.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

130860 - I see you've uninstalled the mod for the time being.. Can you please reinstall it so I can take a look again?  I apologize for the delay, my free time during the day is limited due to being a 'semi-at-home' dad taking care of my 2 month old (I work nights).
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

mirahalo

oh, sorry, its just my users complains about it :P  I re-enable it ;)   and again I apologize to you, I know you're busy taking care of your baby, and I truly appreciate that you spend your time in my issue,  thanks again :)

Tanshaydar

I think this mod worths for waiting ;)

SlammedDime

130860 - I'm not quite sure what is causing your issue... I know it has something to do with the 301 redirect, but I don't know what exactly... I'll have to do some research into PHP as a cgi module in apache...
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

mirahalo

Quote from: Tanshaydar on December 18, 2009, 08:00:36 PM
I think this mod worths for waiting ;)

+1

;)  :)   

I  saw you fixed a lot of things and I appreciate that, all the ajax is working :)   thank you, I'll wait   ;D

SlammedDime

Quote from: 130860 on December 18, 2009, 08:55:53 PM
Quote from: Tanshaydar on December 18, 2009, 08:00:36 PM
I think this mod worths for waiting ;)

+1

;)  :)   

I  saw you fixed a lot of things and I appreciate that, all the ajax is working :)   thank you, I'll wait   ;D
I updated you to the latest version of the mod (the great thing about the mod, only gotta replace the Source file to upgrade)... so that should take care of most things for now... the ThankYou stuff still isn't working, and I got an error when trying to activate my account on your board (was able to do manually, just not through the email link)...
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

feline

Quote from: SlammedDime on December 18, 2009, 06:25:04 PM
1) You shouldn't be using 'shorturls' like this in any of your files.  The urls should have index.php in them.  Lets suppose a user has a index.html and index.php file in his/her SMF Directory, with the index.html file being a simple 'under construction' page that the user forgot to remove when installing SMF.  If their server is configured to look for index.html files before index.php files in the 'Default Document' structure, the 'shorturl' will load up index.html instead of index.php.  I won't be including any type of support for this 'style' of url because it is incorrect.
What may not be, can not be. Great logic. A good programmer will take account of the same.

Quote from: SlammedDime
2) Please read PHP: Predefined Variables.  PHP by it's nature does this replacement because to PHP, '.''s are invalid in a variable name when passed via POST or GET.  This is something you should address in PortaMX, it's not a bug in this mod.  Reason PHP does this is that if register_globals is turned on, a variable name with a . is not a valid variable name, as variable names can only contain letters, numbers and underscores (PHP: Basics).
Oh .. You want to seriously explain to me how to work with php?
Have you studied computer science? How many years of practical experience do you have?
For your information, first of all it's a completely legitimate url. And how is processed, selects the program code. You can use GET, POST, REQUEST, but there are other possibilities.

Quote from: SlammedDime
ie:
This is okay in a php url: index.php?mycat=category.3
This is not: index.php?my.cat=category3
Again, just for you;
We make no allocation in this style, we use index.php?my.cat

From what you give here for the best, we see that you are not willing to adapt your software accordingly.
We have to push our user tries to reach an agreement, but this is probably a failure.

Feline,
CO PortaMx corp.

Arantor

Quote from: feline on December 19, 2009, 08:39:12 AMWhat may not be, can not be. Great logic. A good programmer will take account of the same.

No, it's acceptance of a reality that we as engineers dislike but have to accept. Plenty of hosts do not have their servers configured the way you seem to think all servers are.

QuoteOh .. You want to seriously explain to me how to work with php?
Have you studied computer science? How many years of practical experience do you have?
For your information, first of all it's a completely legitimate url. And how is processed, selects the program code. You can use GET, POST, REQUEST, but there are other possibilities.

Legitimate URL on its own, yes. Legitimate PHP variable, NO, entirely as stated. PHP does build some variables on some configurations where register_globals is on. This is enabled on way way way too many hosts still, and this script will fail on those poorly configured hosts.

I guess it's not really an issue for you because PortaMX doesn't seem to care whether it's enabled or not. But there are strong reasons to take it into account. Like security, memory usage, performance.

Computer science is irrelevant here, btw.

(One question, I have only a basic formal education in CompSci, no commercial experience, but would you tell me I don't know what I'm talking about?)

feline

Quote from: The Grinch on December 19, 2009, 08:59:18 AM
No, it's acceptance of a reality that we as engineers dislike but have to accept. Plenty of hosts do not have their servers configured the way you seem to think all servers are.
It is in the hand of the user, whether he works with or without the index.php. So why WE should require him what he should do or not do. It is a curiosity about whether a developer that takes into account or not. WE do it, and give the user the right to decide.

Quote from: The Grinch
Legitimate URL on its own, yes. Legitimate PHP variable, NO, entirely as stated.
Interesting. If it is because, as you claim, why then works with SMF? SMF has there a mistake? Or is it just like that, the SMF ignore it?

Quote from: The Grinch
(One question, I have only a basic formal education in CompSci, no commercial experience, but would you tell me I don't know what I'm talking about?)
I don't know...

Fel

Arantor

QuoteIt is in the hand of the user, whether he works with or without the index.php. So why WE should require him what he should do or not do. It is a curiosity about whether a developer that takes into account or not. WE do it, and give the user the right to decide.

Not entirely, no. It's also down to server configuration too. This is part of the reason $scripturl forces index.php to be in there every single time.

QuoteInteresting. If it is because, as you claim, why then works with SMF? SMF has there a mistake? Or is it just like that, the SMF ignore it?

SMF doesn't use register_globals. Properly configured servers don't either. I also think SMF attempts to turn it off but I could be wrong on that.

Quote
Quote from: The Grinch
(One question, I have only a basic formal education in CompSci, no commercial experience, but would you tell me I don't know what I'm talking about?)
I don't know...

Fel

You asked SlammedDime that question. For my part, I don't have that experience, yet I take precisely the same position as SlammedDime, so the question can be directed just as equally at me.

feline

We've said what there is to say. We have identified mistakes and tried to offer solutions.
If the developer has no interest in this application to solve the problems the shown, any further discussion is unnecessary and a waste of time.

Fel

SlammedDime

#154
Quote from: feline on December 19, 2009, 08:39:12 AM
What may not be, can not be. Great logic. A good programmer will take account of the same.
This has nothing to do with programming... and aside from that SMF uses index.php, not myfantasticforum.php, or iwin.php or even youlose.php... index.php, thus any mods should be made accordingly and should use the smf $scripturl variable, which properly outputs index.php.  If a user decides to change index.php to myindex.php, they would also have to do so in the $scripturl variable which will not break any mods.  If I changed it to myindex.php on my SMF install, your short url scheme would fail and I would get a 404 error because myindex.php is not a 'Default Document' as far as The Webserver is concerned.


Quote from: feline on December 19, 2009, 08:39:12 AM
Oh .. You want to seriously explain to me how to work with php?
Have you studied computer science? How many years of practical experience do you have?
For your information, first of all it's a completely legitimate url. And how is processed, selects the program code. You can use GET, POST, REQUEST, but there are other possibilities.
You really want to know my qualifications?  First of all, I never said it wasn't a legitimate url.  I fully agree that it is, and even RFC1738 says it is.  However as far as PHP is concerned, using . in a variable name (and per your example my.cat IS turned into a variable once it reaches server side), it is NOT valid.  You're absolutely right, it is how it is processed, and like I said, if a server as Register Globals turned on, this would cause a PHP issue.  Now while Register Globals is bad, some stupid hosts still have it enabled for whatever reason, so until PHP 6 is standard and . are allowed in variable names, this is not a bug in this mod and PHP is working exactly like it should.


Quote from: feline on December 19, 2009, 08:39:12 AM
Quote from: SlammedDime
ie:
This is okay in a php url: index.php?mycat=category.3
This is not: index.php?my.cat=category3
Again, just for you;
We make no allocation in this style, we use index.php?my.cat
If you don't understand that index.php?my.cat is the same thing as index.php?my.cat=foobar when checking for $_GET['my.cat'], then you really do need to go learn PHP again.


Quote from: feline on December 19, 2009, 08:39:12 AM
From what you give here for the best, we see that you are not willing to adapt your software accordingly.
We have to push our user tries to reach an agreement, but this is probably a failure.

Feline,
CO PortaMx corp.
I've adapted my software and corrected a bug that you've found... the issues above are not bugs in my code, they are issues with yours, as these issues would only ever occur with PortaMX or a mod that incorrectly handles urls... sorry, these issues are yours to fix.

Oh, and for my qualifications, I infact do have a Bachelors Degree in Computer Science and I can assure you that Computer Science has NOTHING to do with these issues.  I've also been programming in PHP for over 7 years, along with many other languages.  I've been in web design for over 8 years, I've run all sorts of web server types from Apache, to IIS, to Lighttpd to Litespeed.  I've designed and built multiple websites and components for those sites including Java Applets and Flash Applications.  Shall I go further?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

feline

Quote from: SlammedDime on December 19, 2009, 04:07:59 PM
First of all, I never said it wasn't a legitimate url.  I fully agree that it is, and even RFC1738 says it is.
If a legal url not handled properly in PHP, then it's the responsibility of the developer to ensure that it still works correctly. That's all I'll say on this topic.

Deaks

thats bs you said alot on the topic, SD is simply proving how littrle you know ...
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

mirahalo

Quote from: SlammedDime on December 19, 2009, 01:33:39 AM
I updated you to the latest version of the mod (the great thing about the mod, only gotta replace the Source file to upgrade)... so that should take care of most things for now... the ThankYou stuff still isn't working, and I got an error when trying to activate my account on your board (was able to do manually, just not through the email link)...

@SlammedDime     thanks fot letting me now about  the activate account thing, I will changed to register immediately (my forum is very small, so thats ok)   and the thank you mod is no that necessary for me,  I will uninstall it and wait for you ;)   thanks again :)

hartiberlin

#158
Hi guys and gals,
please calm down...
It is almost chirstmas and we really need a solution,
so SimpleSEF will work flawlessly with PortaMX.

Please just try to make it work and please don´t get heated up about
who has more programming experience.

I think you all are just great and it would be nice,
if you all could work together just to make
SMF and its MODs a very nice compatible platform.

Many thanks again to all of you and have a nice christmas.

feline

Whether or not Christmas is ...
The developer of this modification is riding to talk about without worrying about basic things. We can not change that, and so that the whole is finished.

Fel

Advertisement: