Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Mon, Sep 1, 2008 at 10:38 AM, Gav <[EMAIL PROTECTED]> wrote: > > > On Mon, Sep 1, 2008 at 10:10 AM, Gav <[EMAIL PROTECTED]> wrote: > >> >> >> On Mon, Sep 1, 2008 at 9:23 AM, Evert Lammerts <[EMAIL PROTECTED]>wrote: >> >>> I'm pretty sure I found the problem - I should've spotted it earlier. >>>

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Mon, Sep 1, 2008 at 10:10 AM, Gav <[EMAIL PROTECTED]> wrote: > > > On Mon, Sep 1, 2008 at 9:23 AM, Evert Lammerts <[EMAIL PROTECTED]>wrote: > >> I'm pretty sure I found the problem - I should've spotted it earlier. >> >> The function ProfileList::render gets a reference to the $db object by >>

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Mon, Sep 1, 2008 at 9:23 AM, Evert Lammerts <[EMAIL PROTECTED]>wrote: > I'm pretty sure I found the problem - I should've spotted it earlier. > > The function ProfileList::render gets a reference to the $db object by > its parameter &$db. While you loop over your results, you pass the > referen

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Evert Lammerts
I'm pretty sure I found the problem - I should've spotted it earlier. The function ProfileList::render gets a reference to the $db object by its parameter &$db. While you loop over your results, you pass the reference on to $this->des->load. I'm guessing that the definition of $this->des->load is

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Sun, Aug 31, 2008 at 10:45 PM, Gav <[EMAIL PROTECTED]> wrote: > > > On Sun, Aug 31, 2008 at 10:36 PM, Evert Lammerts <[EMAIL PROTECTED] > > wrote: > >> In PHP5 register_globals defaults to "off". You can either switch it >> back on through your php.ini and restart your webserver, or change all

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Sun, Aug 31, 2008 at 10:36 PM, Evert Lammerts <[EMAIL PROTECTED]>wrote: > In PHP5 register_globals defaults to "off". You can either switch it > back on through your php.ini and restart your webserver, or change all > PHP_SELF references to $_SERVER['PHP_SELF']. See if that fixes your > problem

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Evert Lammerts
In PHP5 register_globals defaults to "off". You can either switch it back on through your php.ini and restart your webserver, or change all PHP_SELF references to $_SERVER['PHP_SELF']. See if that fixes your problem. I hope you understood the SQL injection problem I pointed out. Anybody can drop y

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
Just copying the error messages here so I can revert my changes on the site. *Notice*: Undefined variable: PHP_SELF in * /var/virtual/web/w0019/html/profilemanager.php* on line *75* *Notice*: Undefined variable: PHP_SELF in * /var/virtual/web/w0019/html/profilemanager.php* on line *76 x 22 more

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Sun, Aug 31, 2008 at 9:27 PM, Evert Lammerts <[EMAIL PROTECTED]>wrote: > You don't need to print the query anymore - I already did that. You > need to change your code because right now it is open for SQL > injection attacks: I added some SQL to the url and generated an SQL > error (http://www.

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Evert Lammerts
You don't need to print the query anymore - I already did that. You need to change your code because right now it is open for SQL injection attacks: I added some SQL to the url and generated an SQL error (http://www.iwdp.co.uk/list.php?region=1&start=30,2). When you retrieve start, e.g. $_GET['star

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Evert Lammerts
The code you've sent seems to be fine, and if I check your website it does everything it should do in terms of filtering - if I select Tayside as a region I get a development company with the region set to Tayside. It seems to me that this means the problem is not in one of the subclasses of Profil

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
On Sun, Aug 31, 2008 at 8:09 PM, Evert Lammerts <[EMAIL PROTECTED]>wrote: > Can you send over the function ProfileList::render? And you should > make sure that whenever the render() function of one of ProfileList's > subclasses is called, the value of $count is 30... It seems the most > likely sou

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Evert Lammerts
Can you send over the function ProfileList::render? And you should make sure that whenever the render() function of one of ProfileList's subclasses is called, the value of $count is 30... It seems the most likely source of your problem to me. To check the value of $count you can do and echo $count;

Re: [PHP-DB] Problem after moving servers

2008-08-31 Thread Evert Lammerts
> $list->render( $db, $start, COUNT ); Send the code of this function and tell me the value of COUNT. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Problem after moving servers

2008-08-31 Thread Gav
Hi All, I moved a site across from one server to another, and now there is one thing no longer working properly that worked fine on the other. It may turn out to be a PHP4 to PHP5 problem, dont know as I cant access now what the other server had. Certain pages on the website were able to render a