Skip to main content

Updaten datafeeds werkt niet in PHP 7

More
7 years 8 months ago #4135 by redactie
mysqli should be used by default mysql is present for older systems.

Please check the error log if the server for the actual trigger of the 500 error.


I did not have time to fire up my test system will try asap

Please Log in to join the conversation.

More
7 years 8 months ago #4136 by redactie
Hi Folks,

I just re-tested the latest version of the component using php7 ( centos 6.7 and jooma 3.6 rc, don't think those are relevant )

I can't reproduce the 500 error.

The feedcron should switch to mysqli by default. If mysqli is not present (you are using PDO ?? ) the component won't work.

I see some depricated warnings I will go and resolved those.


the problem is that the error 500 is a generic fault code whenever the server fails. You will need to go to the SERVERS error log file and look for a message there.

sorry for the inconvenience, but it's very hard to solve problems I can't reproduce ( and that are hidden inside a 500 message)

Please Log in to join the conversation.

More
7 years 8 months ago - 7 years 8 months ago #4137 by jcdhnleu
Vergeet de error 500 Bram, die zijn veroorzaakt doordat mysql_ niet weer werkt in PHP 7. Er vindt bij mij echt geen automatische omschakeling plaats.
Inmiddels heb ik in de cron map alle functies mysql gewijzigd in mysqli en de nodige aanpassingen gepleegd.
Via feedcron lijkt nu alles in php 5.6 weer correct te werken. Morgen test ik het in php 7.
Wat nog niet werkt zijn de links "Importeer gegevens" en "Nu updaten" op /administrator/index.php?option=com_datafeeds&c=datafeeds.

Enig idee waar ik dat moet zoeken?

Alvast bedankt,

Jan
Last edit: 7 years 8 months ago by jcdhnleu.

Please Log in to join the conversation.

More
7 years 8 months ago #4138 by jatoras
Just found it. It has nothing to do with mysqli. It is all about the 404 caching image cleaning script(See Below The error).

mod_fcgid: stderr: PHP Fatal error: 'continue' not in the 'loop' or 'switch' context in ../img/clean.php on line 13, referer: www.alijatoras.com/administrator/index.p...1%CE%A4%CE%91&freq=1

I emptied the clean.php and tested the cron and it works like a charm. We should now fix the clean.php script.

Please Log in to join the conversation.

More
7 years 8 months ago #4139 by jatoras
Comment out the continue; line within the clean.php script and you're done. I dont think this will cause any other issues.
Code:
<?php error_reporting(-1); $time=time(); $interval=3600*24*3; # in seconds $dir=dirname(__FILE__); $match='#.jpg$#'; $skip='#noimage.jpg$#'; try { $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::CHILD_FIRST); } catch(UnexpectedValueException $e) { print " No RecursiveIteratorIterator found\n"; #continue; } foreach ($iterator as $path) { $d=$time-$path->getATime(); # on some systems get A(ccess) time might not work # use get M(odification) time then # $d=$time-$path->getMTime(); if ( $d > $interval ) { $file=$path->__toString(); if ( preg_match($match,$file ) ) { if ( ! preg_match($skip,$file ) ) { echo $file."\n";; #unlink($file); } } } }

Please Log in to join the conversation.

More
7 years 8 months ago #4140 by jcdhnleu
Bram, ik heb nog eens goed nagedacht over je opmerkingen.
Ik was ervan overtuigd dat ik de laatste update van com_datafeeds 3.0 had geupload. Ik ben daar ook mee bezig geweest maar ben toen kennelijk met een andere site van mij gaan testen.
Kortom: na het updaten met de laatste versie van com_datafeeds 3.0 werkt alles zoals het hoort.
Sorry voor de overlast.

Groet en bedankt voor het meedenken,

Jan

Please Log in to join the conversation.

Time to create page: 0.874 seconds