PDA

View Full Version : Weird problem with global.php on non-vB pages


mickmel
Tue 28th May '02, 9:23am
Here's the story: I include global.php on every page on my site. The reason is so I can determine how to display each page, based on who is viewing it. I've added new columns to the vB "user" table, and I can toggle things on and off for various users. One is for ads. If people pay me $20, they get the ads removed on every page on the site. Since I already call global, I can just look at that piece of info, see if it's a 1 or 0, and display (or not display) the ad. I also use it as a security measure for some of the protected areas of the site. I have another column in "user" that I can set to 1 or 0 which allows them to get in to certain areas of the site. Anyhow, all of that works wonderfully.

Here's the problem. I'll use our request list as an example. Using the list, people can request songs (guitar tabs, specifically) to be added to the site. I have a secure back area where I can view the request list, modify the entries, or delete them. The scripts back there are VERY simple and straightforward. Deleting the entries works fine. The problem is that when I modify an entry, I get a "page cannot be displayed" error about 25% of the time. Even when I get the error, though, the modification goes through successfully. I doubt it's a script error, because I have a lot of different scripts back there for various things, and on every one I only get the error when I'm modifying the database - not when I add to it, not when I delete from it, not when I read from it - only when I modify. Other users have reported this same problem.

I see three common things with each of these:
- The problem occurs randomly, and it has happened to various people.
- It's ONLY when I modify the database.
- It's ONLY when I submit a form to the page (the others are just plain text links to add/delete).

Sorry for the long post. ANY ideas?

Mickey

eva2000
Tue 28th May '02, 1:10pm
for hacking related questions you'd need to ask at http://vbulletin.org/

in order to use and post in certain forums at vBulletin.org you need to

1. register using the same username and email address you used at vBulletin.com's forums
2. activate and confirm your registration email
3. then enter your forum username at http://www.vbulletin.com/members/vbulletin.org.php to show that you're a licensed vB owner

mickmel
Wed 29th May '02, 7:00am
Ok, it's getting more weird. I pulled out the code that includes global, so it's just a short simple UPDATE statement, and I'm still having the problem. Sometimes it will work fine. Sometimes it will say "Page Cannot Be Displayed" but still make the change on the server. Lastly, sometimes it will say "Page Cannot Be Displayed", and it won't make the change on the server.

I realize this isn't a vB problem at all, but any clue what could be causing this? Eva?

DVD Plaza
Wed 29th May '02, 9:26pm
Do you perhaps mean "server not found"? That seems to be a fact of life on the Internet these days, once in a while you INSTANTLY get that error - as if the browser didn't even make an effort. A simple refresh fixes that.