PHP Classes

doesn't work

Recommend this page to a friend!

      Web Page Size Calculator  >  All threads  >  doesn't work  >  (Un) Subscribe thread alerts  
Subject:doesn't work
Summary:I didn't succeed while testing this class
Messages:8
Author:Morfix
Date:2005-04-05 21:39:55
Update:2008-07-31 07:19:45
 

  1. doesn't work   Reply   Report abuse  
Picture of Morfix Morfix - 2005-04-05 21:39:55
I have PHP 5.03 and when I would test this class it returns following:
array_unshift(): The first argument should be an array. What I'am doing bad?

It's a pity, this class seems to be a usefull class.
Thanx Jan

  2. Re: doesn't work   Reply   Report abuse  
Picture of Huda M Elmatsani Huda M Elmatsani - 2005-04-06 09:37:20 - In reply to message 1 from Morfix
i fixed this problem, please use the latest. thanks.

hme :)

  3. Re: doesn't work   Reply   Report abuse  
Picture of Piero Salandin Piero Salandin - 2005-04-07 09:06:13 - In reply to message 2 from Huda M Elmatsani
I use PHP 4.2.2 and it still does not work. PHP 5 is needed?
This is what I get when I try on www.php.net:

Notice: Undefined variable: arr_CSSlink in /home/http/phptest/classi/webpagesize/class.webpagesize.php on line 343

Notice: Undefined property: totalsize in /home/http/phptest/classi/webpagesize/class.webpagesize.php on line 142

Thenks and Best Regards
Piero Salandin

  4. Re: doesn't work   Reply   Report abuse  
Picture of bernard p. bernard p. - 2005-05-03 09:31:11 - In reply to message 1 from Morfix
hi,

i am using php 4.3 and i get the same message.

Warning: array_unshift(): The first argument should be an array in /home/sitecrit/public_html/cron/class.webpagesize.php on line 111

  5. Re: doesn't work   Reply   Report abuse  
Picture of fatfreddy fatfreddy - 2006-05-19 09:35:05 - In reply to message 1 from Morfix
Same problem as morfix:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/htdocs/web0/html/mo/includes/class.webpagesize.php on line 274

Warning: Variable passed to each() is not an array or object in [...]class.webpagesize.php on line 203

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in [...]class.webpagesize.php on line 343

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in [...]class.webpagesize.php on line 274

Warning: array_merge() [function.array-merge]: Argument #6 is not an array in [...]class.webpagesize.php on line 274

Warning: Variable passed to each() is not an array or object in [...]class.webpagesize.php on line 203

Warning: array_unshift() [function.array-unshift]: The first argument should be an array in [...]class.webpagesize.php on line 111


Any Idea?

Frank

  6. Re: doesn't work   Reply   Report abuse  
Picture of steve steve - 2006-06-09 14:36:07 - In reply to message 5 from fatfreddy
has anyone gotten this working?
i'm getting the following errors:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\inetpub\webs\falcon\class.webpagesize.php on line 274

Warning: Variable passed to each() is not an array or object in C:\inetpub\webs\falcon\class.webpagesize.php on line 203

Warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\inetpub\webs\falcon\class.webpagesize.php on line 111

thanks!
steve

  7. Re: doesn't work   Reply   Report abuse  
Picture of Leslie Ding Leslie Ding - 2007-09-19 08:27:14 - In reply to message 6 from steve
I've tried to debug this script and the best I could do was to comment out line 264

$arr_src2 = $this->searchSourcesOnCSS($content);

this solves the problem, and the script started to work.

I'm not sure what the author had planned with that function... from what i can tell it doesn't really do anything....

anyway, the end result is good enough for me. i just need an estimate of the page size. next i need to figure out how long it actually takes to load the page.

  8. Re: doesn't work   Reply   Report abuse  
Picture of saravanan saravanan - 2008-07-31 07:19:45 - In reply to message 2 from Huda M Elmatsani
Hi,

i got below error.

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\projects\test\webpagesize\class.webpagesize.php on line 274

Warning: Variable passed to each() is not an array or object in C:\projects\test\webpagesize\class.webpagesize.php on line 203

Warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\projects\test\webpagesize\class.webpagesize.php on line 111

Plz give any idea....