The pictures are not showing

Hello,

I’m trying to help some friends ( a small team ) who work on an Arabic website. please check the following link:

They are using Comfy Pro theme ( licensed vision ) and when they moved the website to a new dedicated server, the pictures are not showing anymore on the homepage ( the link above ), they tried to contact the owner of the theme, but till now they didn’t get any help, and I’m tried many solutions without any success ( like for example, I installed PHP GD support on their Linux server, but this is not solve the problem), do you have any good solution ?

Thanks in advance

If you try to load one of the images that are missing you get this:

Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 152 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 160 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 177 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpthumb.class.php on line 980 Deprecated: Function ereg() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpthumb.class.php on line 1024 Deprecated: Function ereg() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpthumb.class.php on line 1069 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 269 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 287 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php on line 287 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpthumb.class.php on line 1154 Deprecated: Function ereg_replace() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpthumb.class.php on line 890 Deprecated: Function eregi() is deprecated in /var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpthumb.functions.php on line 514 **Headers already sent in file "/var/www/vhosts/zakiworld.com/httpdocs/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php" on line "152", dumping error message as text:**

phpThumb() v1.7.9-200805132119


Headers already sent (phpThumb.php line 446)

So there are technically two problems:

  1. The PHP is using a deprecated function, so really ought to be updated to support PREG instead of EREGI and
  2. You need to suppress these error messages. You could just edit phpThumb.php and add this to the top:
error_reporting(E_ALL ^ E_DEPRECATED);

That should do it for you. Fingers crossed anyway

Thanks Antnee

I’m gonna to test your solution, but just one quick question concerning your first point, is that possible to update my php to support PREG by SSH ?

That depends on whether you have the necessary file permissions to edit it. Though, in WP, can’t you usually edit template files through the admin control panel? You would need to find all references to the EREGI functions and then replace them with the PCRE PREG type functions, which will also probably require you to change the parameters that are passed to the functions too. For now I’d just suppress the errors and see if that works, since it’s not your code that is breaking it. Maybe contact the template creator and ask if they have an update?

Yes I have the access as root to the server, so there is no SSH command to do that ? or this is would make a problem for other scripts on the website ?

If you mean can you run a command that will find all references to that function and replace with another, then yes, there probably is (can anything not be scripted?) but it will probably break as a result. Download the script, look at it in your editor, and find all references and ensure that you also fix the pattern that is passed in as EREG and PREG are very different

I converted all the EREGI by PREG inside the file phpThumb.php and added ( error_reporting(E_ALL ^ E_DEPRECATED):wink: to the top, but nothing happened, check the link again in the first post.

No, you can’t just replace the functions. Put the functions back how they were, change the error reporting and test it. If it then starts to work then either decide to live with it or refactor the code properly

ola, it is really so hard for me, I contacted the owner of the theme from 2 days ago without any answer. I think it’s not easy to resolve the problem. Thanks a lot Antnee
for your support, I appreciate it.

It’s no problem. Let’s just try suppressing those deprecated warnings and hopefully it’ll then work as you expect it to

THanks!
In fact, I added the following code

error_reporting(E_ALL ^ E_DEPRECATED);

as you asked me to the top of phpThumb.php file, that I found it inside the script ( mytheme/script/PHPThumb ), but nothing happy, should I do something else also ?

The URL I’m looking at is: http://www.zakiworld.com/ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php?src=/ar/v2/wp-content/uploads/go-zakiworld-make-your-link-shorter.jpg&w=100&h=75&zc=C&q=95

So I would suspect that it’s the file in /ar/v2/wp-content/themes/zakiV5/scripts/phpThumb/phpThumb.php that you’re looking for. Also search to make sure there isn’t already another on in there that is conflicting with your change (ie you set it to one thing, it then changes it to something else)

no it is the right file, exactly, and this is a part of the code after modification

//////////////////////////////////////////////////////////////
/// phpThumb() by James Heinrich <info@silisoftware.com> //
// available at http://phpthumb.sourceforge.net ///
//////////////////////////////////////////////////////////////
/// //
// See: phpthumb.changelog.txt for recent changes //
// See: phpthumb.readme.txt for usage instructions //
// ///
//////////////////////////////////////////////////////////////

error_reporting(E_ALL ^ E_DEPRECATED);

error_reporting(E_ALL);
ini_set(‘display_errors’, ‘1’);
ini_set(‘magic_quotes_runtime’, ‘0’);
if (@ini_get(‘magic_quotes_runtime’)) {
die(‘“magic_quotes_runtime” is set in php.ini, cannot run phpThumb with this enabled’);
}
$starttime = array_sum(explode(’ ', microtime()));

// this script relies on the superglobal arrays, fake it here for old PHP versions
if (phpversion() < ‘4.1.0’) {
$_SERVER = $HTTP_SERVER_VARS;
$_GET = $HTTP_GET_VARS;
}

// instantiate a new phpThumb() object
ob_start();
if (!include_once(dirname(FILE).‘/phpthumb.class.php’)) {
ob_end_flush();
die(‘failed to include_once("’.realpath(dirname(FILE).‘/phpthumb.class.php’).‘")’);
}
ob_end_clean();

$phpThumb = new phpThumb();
$phpThumb->DebugTimingMessage(‘phpThumb.php start’, FILE, LINE, $starttime);
$phpThumb->SetParameter(‘config_error_die_on_error’, true);

if (!phpthumb_functions::FunctionIsDisabled(‘set_time_limit’)) {
set_time_limit(60); // shouldn’t take nearly this long in most cases, but with many filters and/or a slow server…
}

Look at the very next line after the one you just entered:

error_reporting(E_ALL ^ E_DEPRECATED);

error_reporting(E_ALL);

I did say to look for other error_reporting() entries after yours! :slight_smile:

hahah I’m lost
I keep just the first one, and remove the second line, but no change

Try setting error_reporting(0); and see if that has any effect

incredible, nothing happen, can I send you by PM the access info ?

Sure, if you like

By the way, don’t forget that there are also includes in this file that you’ll also want to check to ensure that the author hasn’t enabled error reporting in all of them

ah it not easy for me to define all that things :slight_smile: I will try to contact again the vendor