zero-perfoliate
zero-perfoliate

Author Topic: Do you see anything suspicious in this line?  (Read 256 times)

Offline Whitefire

  • New PHP Members
  • Posts: 2
  • Karma: +0/-0
Do you see anything suspicious in this line?
« on: December 29, 2010, 09:52:40 AM »
Hi
I am not a php coder but a lot of my website has been written in php by a guy I have no contact with for several years now. recently I was forced to change a server and I keep getting an error now.

Do you see anything suspicious in the coding of this line:

$zapytanie_paginacja = str_replace('*', 'count(*) as ilosc', $zapytanie);

I keep getting "supplied argument is not a valid MySQL result resource..." blah blah - in this line.

I tried to change it into:

$zapytanie_paginacja = str_replace('*', 'count(*) as ilosc', $zapytanie) or die("Pagination problem. Died." . mysql_error());

And, well, as a result I get "Pagination problem. Died." But I have no idea what to do with it next.

My former server (where it worked) :
php 5.2.14
mysql 5.0.91
apache 2.2.16

My present server (where it doesn't work):
mysql 5.0.91
as to php I can't find it atm but im positive it is 5.something.

Offline Whitefire

  • New PHP Members
  • Posts: 2
  • Karma: +0/-0
Re: Do you see anything suspicious in this line?
« Reply #1 on: December 29, 2010, 11:30:05 AM »
Ok void this topic please the hosting administration just helped me, the problem was that the global variables were turned off and the script relied on it (or some such explanation, not an expert, remember :)

Have a happy New Year.

 

zero-perfoliate