fixing an error - repost

Færdiggjort Opslået Dec 5, 2013 Betalt ved levering
Færdiggjort Betalt ved levering

Just checking to see if you're available for what should be? a quick fix I'm guessing with your experience.

I have some scripts that were running fine on a server, and then just stopped working.

"Fatal error: Call to a member function find() on a non-object in /home/..../public_html/pp/.....php on line 37"

The code on line 37 is:

foreach($html->find('img') as $element)

I had a coder look at it but he says he thinks it's the server. Hosting support says it's a code issue. It doesn't make sense that it was working fine, and then just started having errors, if no changes to the code or server were made. We didn't make any code changes, support said there were no server changes.

The last time I know it was working correctly was Monday 2:29 pm est.

We installed on another server, and it worked, then stopped for an hour maybe, then worked again and still is, but we have more scripts that won't fit on that server, so we need another one that the scripts work on.

We tried a 3rd server for the rest of the scripts, it worked when doing a couple manual tests, but then didn't work anymore and still won't, showing the error above. All 3 servers are from the same hosting company.

The scripts are ran by a cron job. They check a web page on another site for new files added, and send an alert email to us when a new one is found.

The scripts use proxies, but the proxies seem ok.

The 5 lines of code following line 37:

{

$image = 'https://...../...../'.$element->src;

$image1 = substr($image,70);

//echo $image1;

}

The top 5 lines of one of the scripts:

<?php

set_time_limit(0);

require ("[url removed, login to view]");

require '[url removed, login to view]';

require_once('[url removed, login to view]');

I don't know if the server logs could give some info on what happened, or what else.

Thanks

Fejlfinding

Projekt ID: #5200744

Om projektet

3 bud Remote projekt Aktiv Dec 7, 2013

Tildelt til:

arfharwinder

Hi, I can fix that fatal error within next few time for guarantee. For reference and skills, please check out my completed projects I can start right away. Thanks

$50 USD in 3 dage
(3 bedømmelser)
2.1

3 freelancere byder i gennemsnit $138 timen for dette job

cplaiasu

Hello, I think it's the site that you scrap for data modified, and for a reason, probably $html variable is empty and therefore, you can't use find function on it without causing an error. You can use echo $html wh Flere

$155 USD in 3 dage
(0 bedømmelser)
0.0
bdsoft2010

Expert web developer here working over 5 years in web development. I got your problem. You are using a script to scrape the third party site. the script is getting problem on it, It should be more optimized so that it Flere

$210 USD in 3 dage
(0 bedømmelser)
0.0