Counting problem with Query

Counting problem with Query

am 12.09.2007 07:36:43 von Cindy Chambers

Here's the problem:

I have meeting minutes that need to be paged through via my website. I have
created a developer server on my local machine and when I run the PHP code
against the MySQL table that I imported from my ISP's website everything
works fine. However, when I upload the PHP pages to the ISP's server
everything connects but it doesn't page through anymore. It just sits on
the latest created page. I click the previous button and it shows it
reading but nothing happens.

So I know the code works from my local test so why does it not work when I
put it live? All this code worked prior to my ISP upgrading their MySQL and
phpMyAdmin software. Any ideas how to get everybody to talk again?

Here are some stats:

My ISP:
localhost
a.. Server version: 4.1.22-standard
b.. Protocol version: 10
c.. Server: Localhost via UNIX socket
d.. MySQL charset: UTF-8 Unicode (utf8)
e..
MySQL connection collation: utf8_unicode_ci

phpMyAdmin - 2.10.0.2
a.. MySQL client version: 4.1.22
b.. Used PHP extensions: mysql




My Developer Server:



Apache2Triad which includes Apache server, MySQL and PHP and is Windows
based.



Updates and versions for this Triad include:



fixed mod_perl 2.0.1 bug *
added apache SSL restart
optimised access.cgi to deal with huge logs
updated Apache to 2.2.0
updated OpenSSL to 0.9.8a
updated PHP to 5.1.2
updated Zend Optimizer to 2.6.2
updated Xdebug to 2.0.0 beta5
updated DBG to 2.18.5
updated SlimFTPd to 3.18
updated Xmail to 1.22
updated PostgreSQL to 8.1.2
updated pgAdmin to 1.4.1
updated phpPgAdmin to 4.0.1
updated MySQL to 5.0.18
updated MyODBC to 5.0.0
added MySQL Administrator 1.1.8
added MySQL Query Browser 1.1.20
updated PHPmyadmin to 2.7.0 pl2
updated UebiMiau to 2.7.9
updated AWStats to 6.5
security fix for CVE-2006-0144
added Apache2Triad Manager
reverted apache MaxRequestsPerChild to 0
INCLUDES filter removed issue adressed
added fix for VC80.CRT runtime libraries
updated mod_perl to 2.0.3
updated mod_ssl to 2.2.0
disabled mod_python 3.2.7 **

Re: Counting problem with Query

am 12.09.2007 10:32:17 von Captain Paralytic

On 12 Sep, 06:36, "Cindy Chambers" wrote:
> Here's the problem:
>
> I have meeting minutes that need to be paged through via my website. I have
> created a developer server on my local machine and when I run the PHP code
> against the MySQL table that I imported from my ISP's website everything
> works fine. However, when I upload the PHP pages to the ISP's server
> everything connects but it doesn't page through anymore. It just sits on
> the latest created page. I click the previous button and it shows it
> reading but nothing happens.
>
> So I know the code works from my local test so why does it not work when I
> put it live? All this code worked prior to my ISP upgrading their MySQL and
> phpMyAdmin software. Any ideas how to get everybody to talk again?
>
> Here are some stats:
>
> My ISP:
> localhost
> a.. Server version: 4.1.22-standard
> b.. Protocol version: 10
> c.. Server: Localhost via UNIX socket
> d.. MySQL charset: UTF-8 Unicode (utf8)
> e..
> MySQL connection collation: utf8_unicode_ci
>
> phpMyAdmin - 2.10.0.2
> a.. MySQL client version: 4.1.22
> b.. Used PHP extensions: mysql
>
> My Developer Server:
>
> Apache2Triad which includes Apache server, MySQL and PHP and is Windows
> based.
>
> Updates and versions for this Triad include:
>
> fixed mod_perl 2.0.1 bug *
> added apache SSL restart
> optimised access.cgi to deal with huge logs
> updated Apache to 2.2.0
> updated OpenSSL to 0.9.8a
> updated PHP to 5.1.2
> updated Zend Optimizer to 2.6.2
> updated Xdebug to 2.0.0 beta5
> updated DBG to 2.18.5
> updated SlimFTPd to 3.18
> updated Xmail to 1.22
> updated PostgreSQL to 8.1.2
> updated pgAdmin to 1.4.1
> updated phpPgAdmin to 4.0.1
> updated MySQL to 5.0.18
> updated MyODBC to 5.0.0
> added MySQL Administrator 1.1.8
> added MySQL Query Browser 1.1.20
> updated PHPmyadmin to 2.7.0 pl2
> updated UebiMiau to 2.7.9
> updated AWStats to 6.5
> security fix for CVE-2006-0144
> added Apache2Triad Manager
> reverted apache MaxRequestsPerChild to 0
> INCLUDES filter removed issue adressed
> added fix for VC80.CRT runtime libraries
> updated mod_perl to 2.0.3
> updated mod_ssl to 2.2.0
> disabled mod_python 3.2.7 **

Do not multi-post. Cross-post if you must but don't multi post
It wastes people's time.
http://www.blakjak.demon.co.uk/mul_crss.htm

Re: Counting problem with Query

am 12.09.2007 20:16:18 von unknown

Post removed (X-No-Archive: yes)

Re: Counting problem with Query

am 12.09.2007 21:43:49 von Cindy Chambers

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.

Thanks,

cc

"Tom" wrote in message news:fc9adi01p9q@drn.newsguy.com...
> On Wed, 12 Sep 2007 00:36:43 -0500, Cindy Chambers wrote...
>>
>>Here's the problem:
>>
>>I have meeting minutes that need to be paged through via my website. I
>>have
>>created a developer server on my local machine and when I run the PHP code
>>against the MySQL table that I imported from my ISP's website everything
>>works fine. However, when I upload the PHP pages to the ISP's server
>>everything connects but it doesn't page through anymore. It just sits on
>>the latest created page. I click the previous button and it shows it
>>reading but nothing happens.
>>
>>So I know the code works from my local test so why does it not work when I
>>put it live? All this code worked prior to my ISP upgrading their MySQL
>>and
>>phpMyAdmin software. Any ideas how to get everybody to talk again?
>>
>>Here are some stats:
>>
>>My ISP:
>>localhost
>> a.. Server version: 4.1.22-standard
>> b.. Protocol version: 10
>> c.. Server: Localhost via UNIX socket
>> d.. MySQL charset: UTF-8 Unicode (utf8)
>> e..
>>MySQL connection collation: utf8_unicode_ci
>>
>>phpMyAdmin - 2.10.0.2
>> a.. MySQL client version: 4.1.22
>> b.. Used PHP extensions: mysql
>>
>>
>>
>>
>>My Developer Server:
>>
>>
>>
>>Apache2Triad which includes Apache server, MySQL and PHP and is Windows
>>based.
>>
>>
>>
>>Updates and versions for this Triad include:
>>
>>
>>
>>fixed mod_perl 2.0.1 bug *
>>added apache SSL restart
>>optimised access.cgi to deal with huge logs
>>updated Apache to 2.2.0
>>updated OpenSSL to 0.9.8a
>>updated PHP to 5.1.2
>>updated Zend Optimizer to 2.6.2
>>updated Xdebug to 2.0.0 beta5
>>updated DBG to 2.18.5
>>updated SlimFTPd to 3.18
>>updated Xmail to 1.22
>>updated PostgreSQL to 8.1.2
>>updated pgAdmin to 1.4.1
>>updated phpPgAdmin to 4.0.1
>>updated MySQL to 5.0.18
>>updated MyODBC to 5.0.0
>>added MySQL Administrator 1.1.8
>>added MySQL Query Browser 1.1.20
>>updated PHPmyadmin to 2.7.0 pl2
>>updated UebiMiau to 2.7.9
>>updated AWStats to 6.5
>>security fix for CVE-2006-0144
>>added Apache2Triad Manager
>>reverted apache MaxRequestsPerChild to 0
>>INCLUDES filter removed issue adressed
>>added fix for VC80.CRT runtime libraries
>>updated mod_perl to 2.0.3
>>updated mod_ssl to 2.2.0
>>disabled mod_python 3.2.7 **
>>
>>
>
> I'm not sure what you mean by not "doesn't page through anymore" anymore.
> If you
> were getting links to step through blocks of your results, I'd probably
> start at
> your SQL query on your web sites MySQL and step through the process. Maybe
> using
> mysql_error to see if that has any feedback, or if you have shell access
> to
> MySQL, try running the commands from there.
>
> Tom
> --
> NewsGuy Takes Usenet Cellular!
> Download newsgroup MP3's to your Cell or PDA
> Free Trial - http://newsguy.com/cellphone.htm
>

Re: Counting problem with Query

am 13.09.2007 08:58:16 von David Quinton

On Wed, 12 Sep 2007 14:43:49 -0500, "Cindy Chambers"
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.

If the version of / config of PHP on the server has changed, then I
think it's possible that your script is relying on a $_GET value being
passed bewteen pages.

Maybe your home version has register_globals on; your server doesn't?
Check with phpinfo().

If that's the case, then it's probably safer to put:

foreach ($_GET as $key => $val) {
$key=$val;
}

at the top of the script rather than turning on register_globals for
the whole server.

(all this is from memory and untested - fingers crossed...)
--
Locate your Mobile phone:
Great gifts:

Re: Counting problem with Query

am 13.09.2007 12:50:59 von kenoli

On Sep 12, 12:43 pm, "Cindy Chambers"
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