For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > December 2006 > Help in understanding php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help in understanding php
undbund

2006-12-26, 3:59 am

Hi i have encountered a strange problem to which i am not able to
figure out!.

I have two separate databases, 1st stores user details, 2nd stores
messages, they are on different ip address and both servers are
synchronized by load balancer. The php script works fine except for
this unique situation where the script is not able to display username
and email address in textboxes, but it does display user number and
associated message.

My question is why is php refusing to display user name and email when
it is stored successfully in the database and yet it displays user
number from 1st database and message from 2nd database.

I have tested the script with other username and email and it works
fine! But it doesn't work with this particular user!

Are there any bugs in PHP in which this situation can occur or is it
something else?

All your help is appreciated.

Thanks
undbund

Geoff Berrow

2006-12-26, 8:00 am

Message-ID: <1167127141.157365.49220@42g2000cwt.googlegroups.com> from
undbund contained the following:

>My question is why is php refusing to display user name and email when
>it is stored successfully in the database and yet it displays user
>number from 1st database and message from 2nd database.
>
>I have tested the script with other username and email and it works
>fine! But it doesn't work with this particular user!
>
>Are there any bugs in PHP in which this situation can occur or is it
>something else?


Leaving aside the question of why you are using two databases, instead
of two tables this sounds like either a coding or html problem.

Either way, unless you have a good reason, I'd consider putting related
data in the same database.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
undbund

2006-12-26, 8:00 am

Hey thanks for your reply, what do you thinks could go wrong in terms
of coding or html, as I have mentioned, this is the only bit of data
that is giving problems, the script works flawlessly with 99.99% of the
data in the database. I have examined the data in the databases, they
are just like any other bits of data. No fancy characters, etc!!

Thanks
undbund

Geoff Berrow wrote:
> Message-ID: <1167127141.157365.49220@42g2000cwt.googlegroups.com> from
> undbund contained the following:
>
>
> Leaving aside the question of why you are using two databases, instead
> of two tables this sounds like either a coding or html problem.
>
> Either way, unless you have a good reason, I'd consider putting related
> data in the same database.
>
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/


IchBin

2006-12-26, 7:01 pm

undbund wrote:
> Hey thanks for your reply, what do you thinks could go wrong in terms
> of coding or html, as I have mentioned, this is the only bit of data
> that is giving problems, the script works flawlessly with 99.99% of the
> data in the database. I have examined the data in the databases, they
> are just like any other bits of data. No fancy characters, etc!!
>
> Thanks
> undbund
>
> Geoff Berrow wrote:
>


Well then at this point I would use a debugger to track the problem
down. I use Xdebug and tswebeditor to step thru the code line by line in
problem blocks of code. Not sure if you are using a debugger. You could
look at a free one here: http://tswebeditor.at.tf

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA
________________________________________
______________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
undbund

2006-12-26, 7:01 pm

Hey thanks for all your help and contributions. I have found out that
there was a problem with the load balancer, it was not synchronizing
the databases properply.

Thanks for all your help
undbund

IchBin wrote:
> undbund wrote:
>
> Well then at this point I would use a debugger to track the problem
> down. I use Xdebug and tswebeditor to step thru the code line by line in
> problem blocks of code. Not sure if you are using a debugger. You could
> look at a free one here: http://tswebeditor.at.tf
>
> --
> Thanks in Advance... http://ichbin.9999mb.com
> IchBin, Pocono Lake, Pa, USA
> ________________________________________
______________________________
> 'If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor, Regular Guy (1952-)


Gordon Burditt

2006-12-27, 3:59 am

>>My question is why is php refusing to display user name and email when[color=darkred]

Does your code depend on PHP sessions or cookies? You said you've
got two servers on two different IP addresses. Cookies set by one
IP may not be sent back to the other IP, depending on domain and
browser settings. If this is the problem, it's not a PHP bug, it's
a browser security feature.

Or maybe I'm completely off base here. You didn't show any code.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com