Failure To Edit Location Field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DVD Plaza
    Senior Member
    • Sep 2000
    • 697
    • 3.0.1

    Failure To Edit Location Field

    I usually quite often edit out smart-alec remarks people shove into their location field (probably because it is visible in the forums so they're showing off). That said I'm having a problem with ONE member's account:
    Database error in vBulletin Control Panel 2.2.4:

    Invalid SQL: SELECT userid
    FROM user
    WHERE username='***USERNAME***'
    AND userid <>
    mysql error: You have an error in your SQL syntax near '' at line 4

    mysql error number: 1064

    Date: Saturday 23rd of March 2002 09:51:50 AM
    Script: http://www.dvdplaza.com.au/forums/forums/admin/user.php
    Referer: http://www.dvdplaza.com.au/forums/ad...it&userid=3684
    What's interesting is that not only does the SQL above not show a userid value, but the control panel form is showing "Edit User - ***USERNAME*** (userid: )" . Yet if you look at the URL above, a userid WAS passed through properly?

    Any thoughts? I've tested a heap of other accounts and am not having any problems with them.
    Last edited by DVD Plaza; Tue 23 Apr '02, 3:32pm.
  • DVD Plaza
    Senior Member
    • Sep 2000
    • 697
    • 3.0.1

    #2
    Please ignore - turns out PHP 4.2 was causing the problem, reverting to PHP 4.1.2 resolved it.

    Comment

    • DVD Plaza
      Senior Member
      • Sep 2000
      • 697
      • 3.0.1

      #3
      Err... this issue is outstanding. With the PHP 4.2 beta versions I found vBulletin screwed up in a number of ways - such as editing SOME accounts, occasional database errors, and most obvious of all if you try listing all your templates vBulletin simply goes ape sh#t.

      Well PHP 4.2 is now out of beta and vBulletin still has exactly the same problems with it - so is PHP 4.2 still faulty, is vBulletin doing something not quite right (that happened to work in the past), or has PHP 4.2 changed a few things that vBulletin now needs to compensate for???

      Comment

      • Freddie Bingham
        Former vBulletin Developer
        • May 2000
        • 14057
        • 1.1.x

        #4
        Make sure register_globals is enabled.. I will try to get 4.2.0 installed soon but remember that we released v2.2.5 before php 4.2.0 was declared stable so we can't certify that it will work with it.
        Last edited by Freddie Bingham; Mon 22 Apr '02, 8:41pm.

        Comment

        • DVD Plaza
          Senior Member
          • Sep 2000
          • 697
          • 3.0.1

          #5
          You mean to make sure that it's turned on, and that you can't certify it works?

          Yep to all vBulletin 99% works perfectly for me under PHP 4.2, just has the occasional screwup when writing to the database (which during my testing a while back eventually resulted in a corrupted database which for some reason was quite stubborn to repair) and viewing the templates list totally screws up. Other than that it works fine.

          Comment

          • Freddie Bingham
            Former vBulletin Developer
            • May 2000
            • 14057
            • 1.1.x

            #6
            Isn't that what I said?

            What does "occasioncal screwup when writing to the database" mean exactly?

            Comment

            • DVD Plaza
              Senior Member
              • Sep 2000
              • 697
              • 3.0.1

              #7
              Originally posted by freddie
              Isn't that what I said?
              Not originally, you've edited your post to correct the gramar errors - hehehe

              Originally posted by freddie
              What does "occasioncal screwup when writing to the database" mean exactly?
              If you refer to my original post in this thread, you'll notice I was having trouble editing one member's location field in their profile. I could happily edit anyone else's location field, yet for that one member I was getting that error - that's what first sparked my suspicion there was a problem. I have no idea why it went wrong, but the good news it's consistent - whatever weird mysql results PHP 4.2 causes it will ALWAYS cause them... for example trying to edit the location field for that one member, trying to list the templates, etc.

              Simply putting PHP 4.1 back on resolves the problem, putting PHP 4.2 back on immediately brings back the problem. So by occasionally screwing up when writing to the database I mean just that - for some reason SOME, and we're talking like 1% of operations, either cause an error or return wierd results...

              So this could mean it will be rather trivial to fix, or it could be a pure nightmare?!?!? The wierdness of it is what made me initially write it off as a PHP 4.2 beta quirk.

              Hope this helps Freddie - if you need me to do anything just say the word

              Comment

              • JamesUS
                Senior Member
                • Aug 2000
                • 4622

                #8
                Is register_globals turned on in your php.ini file? If not, try turning it on and see if it solves the problems.

                PHP 4.2 comes with a few default settings that vB needs to compensate for - these changes have been included in vB 3 but they are major so it's not an easy fix. The best solution is simply to turn on register_globals.

                Comment

                • DVD Plaza
                  Senior Member
                  • Sep 2000
                  • 697
                  • 3.0.1

                  #9
                  That's three times I've answered that today now!

                  register_globals is ON

                  Comment

                  • DVD Plaza
                    Senior Member
                    • Sep 2000
                    • 697
                    • 3.0.1

                    #10
                    Just to clarify, it's mySQL related stuff that is failing with vBulletin under PHP 4.2, register globals is ON!

                    Comment

                    • Marshalus
                      Senior Member
                      • Jan 2002
                      • 100

                      #11
                      Same problem here.
                      Last edited by Marshalus; Tue 30 Apr '02, 6:43pm.

                      Comment

                      • Freddie Bingham
                        Former vBulletin Developer
                        • May 2000
                        • 14057
                        • 1.1.x

                        #12
                        Well post everything that is happening in detail so I can get more information.

                        It seems like we have something working fine for userid 457 but not for userid 987 (example).

                        Comment

                        • DVD Plaza
                          Senior Member
                          • Sep 2000
                          • 697
                          • 3.0.1

                          #13
                          Originally posted by freddie
                          Well post everything that is happening in detail so I can get more information.

                          It seems like we have something working fine for userid 457 but not for userid 987 (example).
                          That is the full detail though, something fails for one user but works for others. I noticed the errors I got are exactly the same as what someone posted in another PHP4.2 thread though.

                          Only other matter, which can be reproduced 100% of the time, is to simply go to Templates/Edit Templates/Show All - you'll skip a few heart beats from what you see!!!

                          At least for me, the forums still 99% work so am happy to quickly switch to PHP4.2 to quickly conduct any tests you need me to - just let me know what.

                          Comment

                          • Freddie Bingham
                            Former vBulletin Developer
                            • May 2000
                            • 14057
                            • 1.1.x

                            #14
                            Well when you refer to "something fails", is this only happening when you edit profiles or do you get problems in other areas?

                            I need details from Marshalus, "same problem here" doesn't help me out all that much. Same problem, as in trying to edit a user, or same problem as in "yeah it just doesn't work right".

                            Comment

                            • DVD Plaza
                              Senior Member
                              • Sep 2000
                              • 697
                              • 3.0.1

                              #15
                              Hard to say - I reckon I would have been running with PHP 4.2 for about a week before I noticed problems, so it "generally" didn't affect usage. It was only when I had a problem editing a profile, as per the original post, that I began to notice there were small problems - and when I realised what was happening with the templates well that made it VERY clear there was a problem. To memory those are the only issues I experienced, everything else worked perfectly fine - hence why we went a week with PHP 4.2 (rc2 I think) before I realised anything was wrong.

                              At that point I reverted back to PHP4.1.x and all was well again - but that said, a few days later one of my databases became corrupted (which I've never had before, especially given every single night my system self optimises/repairs/etc the databases before commencing backups) - so considering the database related issues under PHP 4.2 it was my guess this had caused the damage.

                              Hell of a horrible situation to narrow down aye! I'd say the template one would be the best one to fight, as that's a very clear and instantly reproducable fault to find - and might provide pointers for what is going wrong elsewhere. But the profile problems, god knows - that one is obviously going to vary between everyone

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...