Interesting ODBC problem – PHP

  php

Q(Question):

I have just converted a guestbook to use an Access database rather than
MySQL (don’t ask…) via odbc and have come across an unusual problem.

There is an admin screen which simply accesses all records and displays
them. All worked fine on my machine. But on my friend’s machine the
code times out.

Now I was under the impression that all processing would be complete
/before/ any html was sent out. Surely the processing cannot be
dependent on the speed of the connection!

If I use up my bandwidth by downloading an mp3 or something I can
recreate the error.

Has anyone else come across anything like this?

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/

A(Answer):

I noticed that Message-ID: <8p********************************@4ax.com>
from Geoff Berrow contained the following:

Now I was under the impression that all processing would be complete
/before/ any html was sent out. Surely the processing cannot be
dependent on the speed of the connection!

OK, not as interesting as I thought. Does /anyone/ have any idea what’s
going on?

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/

A(Answer):

"Geoff Berrow" <bl******@ckdog.co.uk> wrote in message
news:8p********************************@4ax.com…

I have just converted a guestbook to use an Access database rather than
MySQL (don’t ask…) via odbc and have come across an unusual problem.

<snip>

No, I’m gonna hafta ask…

Garp

A(Answer):

"Geoff Berrow" <bl******@ckdog.co.uk> wrote in message
news:he********************************@4ax.com…

I noticed that Message-ID: <8p********************************@4ax.com>
from Geoff Berrow contained the following:

Now I was under the impression that all processing would be complete
/before/ any html was sent out. Surely the processing cannot be
dependent on the speed of the connection!

OK, not as interesting as I thought. Does /anyone/ have any idea what’s
going on?

It’s not uninteresting, there’s just not enough to go on. I’ve not tried
Access through PHP (after years of hell doing it through C++), but I imagine
the problems are the same.

Timeouts are a pain to track down (no error=no help), but first, is it
working outside of PHP? Outside the web server?

Garp

A(Answer):

I noticed that Message-ID:
<d5*********************@news-text.cableinet.net> from Garp contained
the following:

It’s not uninteresting, there’s just not enough to go on. I’ve not tried
Access through PHP (after years of hell doing it through C++), but I imagine
the problems are the same.

Timeouts are a pain to track down (no error=no help), but first, is it
working outside of PHP? Outside the web server?

Not sure what you mean. I’ve simply created an Access database and
uploaded it to the server. The ISP has a utility to create a DSN which
I then use PHP to connect to via ODBC.

It works fine on my dial up connection. But my friend has a very slow
connection and it times out. And it’s only 50 text records. What I
can’t understand it why it is dependent on the connection speed at all.


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/

A(Answer):

I noticed that Message-ID:
<82*********************@news-text.cableinet.net> from Garp contained
the following:

I have just converted a guestbook to use an Access database rather than
MySQL (don’t ask…) via odbc and have come across an unusual problem.

<snip>

No, I’m gonna hafta ask…

OK. My friend has a reseller account with an ISP called Fasthosts.
They have a choice of servers on which he can host as many sites as he
likes for a flat fee. He can host on Linux at no extra cost, but
Windows servers cost an extra GBP 10. However, there is no extra cost
for Access databases. On the other hand, if he chooses Linux it costs
GBP 50 to add a MySQL 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/

A(Answer):

"Geoff Berrow" <bl******@ckdog.co.uk> wrote in message
news:tk********************************@4ax.com…

I noticed that Message-ID:
<82*********************@news-text.cableinet.net> from Garp contained
the following:

I have just converted a guestbook to use an Access database rather than
MySQL (don’t ask…) via odbc and have come across an unusual problem.

<snip>

No, I’m gonna hafta ask…

OK. My friend has a reseller account with an ISP called Fasthosts.
They have a choice of servers on which he can host as many sites as he
likes for a flat fee. He can host on Linux at no extra cost, but
Windows servers cost an extra GBP 10. However, there is no extra cost
for Access databases. On the other hand, if he chooses Linux it costs
GBP 50 to add a MySQL database.

That’s one screwed-up pricing model. Everyone knows Access is a resource
hog – on my machines it’s frequently responsible for 100% CPU load. 8)

Garp

LEAVE A COMMENT