Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Need Help With Php/mysql And Web Servers Such As Asta's.
Chesso
post Jul 28 2006, 12:22 PM
Post #1


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833
myCENTs:89.25



Within my site I have built my own basic forum using PHP/Mysql, I always test locally now both using EasyPHP and WAMP5 which both give me no problems what so ever.

But when I tryed to run the exact same code on Asta's hosting services (and possible another I used to use) when creating a new thread or adding a reply to an existing one it *sometimes* adds an additional thread/reply as a Guest (someone not signed in) with an empty message.

This would lead me to believe that somehow the page is being refreshed and the variables sent to the database update php file are obviously not filled in unless sent from the proper page.

But why does this behaviour happen only on using web services from others and works perfect for me using a completely different version of mysql/php and the same version on my machine?

This post has been edited by Chesso: Jul 28 2006, 12:23 PM
Go to the top of the page
 
+Quote Post
Hercco
post Jul 28 2006, 04:38 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



Sounds quite strange...

It must have something to do with the refresh... But what sounds so weird is that the new post is not with same username. How do you fetch the username/ID? Do you use sessions or cookies or what?

And is the entire thread/reply created with one execution of a PHP file or do you create a say a thread entry to the table first and then add the contents to another table?

Go to the top of the page
 
+Quote Post
Chesso
post Jul 28 2006, 10:21 PM
Post #3


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833
myCENTs:89.25



I use sessions. The code should only ever execute once except if a user by mistake refreshed the page one or more times.

I have a temporary or permanent fix now that should have been obvious to me long ago but well it's fixed. I send a few values such as message content and username, I basically just check to see if the message content is null.

Users shouldn't be trying to post blank messages and such and it should mean that the data for that particular instance was not sent from the right page properly.

I also managed to fix alot of other small bugs that I have been meaning to get out of the way, I just needed some time to focus on the affected code and it didn't take too long at all after that to figure out something to fix it up.

This post has been edited by Chesso: Jul 28 2006, 10:23 PM
Go to the top of the page
 
+Quote Post
vhortex
post Jul 29 2006, 03:53 AM
Post #4


Guilty Until Proven Innocent
Group Icon

Group: Members
Posts: 372
Joined: 13-April 05
Member No.: 3,937



did you check if your script uses session cookies?
if configured wrongly.. it can sometimes cause weird behavior..

Go to the top of the page
 
+Quote Post
Chesso
post Jul 29 2006, 04:00 AM
Post #5


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833
myCENTs:89.25



I use the standard session method, it's server side sessions as far as I know and not client.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. MySQL - Trouble With Bulk Insert Statements(3)
  2. MySQL Realtime Replication(4)
  3. Counter Strike Servers(18)
  4. Recover Tables From A MySQL .frm File(8)
  5. Need Help With A PHP - MySQL Registration Script(13)
  6. [PHP + MySQL] Encrypting Data(11)
  7. MySQL For EasyPHP Users(5)
  8. MySQL Output Database Question(18)
  9. Important: Basics Of Using PHP And MySQL(10)
  10. CuteNews: PHP-based Blog System - No MySQL(11)
  11. MySQL, Multiple Tables(24)
  12. PHP & MySQL: Displaying Content From A Given ID(6)
  13. Navcat For MySQL(9)
  14. Qupis : Free Cpanel Web Hosting (one Line Text Ad At Bottom)(10)
  15. Ajax + Php + Sql = Simply Superb! ( With Visitor Tracking )(11)
  1. Php Tutorial: Making A Shoutbox(12)
  2. Login System Using A Mysql Db(5)
  3. Mysql Database Entry By Excel Sheets(2)
  4. Can You Link Game Maker With Mysql/php(0)
  5. Mysql On Computer(9)
  6. How To: Display A Members/user List.(3)
  7. Any Website Provide Free Host Mysql Host?(4)
  8. Mysql Multiple Tables(1)
  9. What You Need Before You Can Create A Text-based Game..(7)
  10. Mysql Overhead(3)
  11. Which Language Is Easy And Secure Today For Web Development(2)
  12. Login System(6)
  13. Small Issues About Mysql Connector/j 5.1(2)


 



- Lo-Fi Version Time is now: 4th December 2008 - 11:23 PM