You are here: Re: Counting problem with Query « PHP SQL « IT news, forums, messages
Re: Counting problem with Query

Posted by Kenoli on 09/13/07 10:50

On Sep 12, 12:43 pm, "Cindy Chambers" <cchambers...@comcast.net>
wrote:
> Thanks Tom. What I mean by not paging through is when I hit the "previous"
> button image on the php page the next database entry does not read and then
> display. It just stays on the same entry all the time. When I do this on
> my home server it reads fine. I'm just trying to figure out what may be
> switched on or off or changed in the new version of the software my asp has
> installed. I have contacted them and they keep saying it's a php problem
> but yet if works when I test it.
>
> Because of this I am guessing that there is something different in the new
> software that keeps the php code from interacting with their MySQL. I just
> can't figure out what it is.

What is the code that is invoked by your "next" and "previous"
buttons? As I understand it, your script retrieves info from the
database and displays it on the page. This means your server is
interpreting your php and accessing your mysql. The next thing that
happens is the script invoked by your next and previous buttons. I
would look at this code carefully. It is something about this that is
not working or not interacting with the server the way you want it to.

I have had similar problems and, since the only thing that has changed
is the server it is logical to assume the problem is with the server
and not in the code. I have even gotten quite impatient with server
tech support folks telling me it is my code only to find that it is a
problem with the code that just wasn't showing up on my server for
some reason.

There are a number of things that could be at issue in the code from
different versions of php, to settings in the php configurations file
(like the register globals issue someone else mentioned), to different
usernames on each database to different paths paths to scripts, or
something else. It is easier to fix your code than to try to get the
server to adapt to your code.

My experience is that most things are solved by looking at the
script. Check out each step, test it if possible, make sure it is
written to the version of php and configuration settings on the
server, that sort of thing. Don't forget about included files, the
issue could be in a called function or script. When moving between
servers, it is easy to miss changing some path to an include file.
I've gotten balled up here. If an include path is wrong, often a
script just won't proceed past the failed include. For instance, your
scripts might be in different folders on the local server from the
remote server. This can make your include paths wrong or create a bad
link and cause a script to fail. There could be a scope issue with
some variable, problem with a session variable not passed correctly, a
column name or key in some table that are different on the two
machines. These are all things related to the code that could screw
up with a server change, even if both servers are correctly configured
and correctly versioned and even if the code works on one of the
servers and not the other. There is always something.

Make sure your error settings on the remote server are set to take
advantage of whatever php might be able to tell you. If you get an
error you don't understand, google it. Error messages aren't always
self evident. Someone somewhere has already had your problem and
google is the best way to find that person.

At any rate, these are things that have worked for me.

Good luck,

--Kenoli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация