Pengo26
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Broken Images after moving from Shared Hosting to VPSOkay I think I fixed it!!!!!!!!!!!!!
So I decided to quit on it and install OS-Classifieds instead. And in that install, OS-Classifieds says that I was missing Zip Module, mCrypt module, GD Library, mbString module, and MySQLi. So I decided to re-compile Apache with all those modules in it and it works!I don’t think the GD Library did much because I attempted that before, but I think mbstring, Zip module and MySQLi had something to do with it.
Thanks so much for your help anyways!
Forum: Fixing WordPress
In reply to: Broken Images after moving from Shared Hosting to VPSYeah I’ve tried that already, images still appear as broken.
The plugins are the same as they were before migration too.
About the “is-wp-error,” it’s in the code.Yeah, I am really stumped.
Thanks so much for helping out!Forum: Fixing WordPress
In reply to: Broken Images after moving from Shared Hosting to VPSYeah it works:
0 = 1280
1 = 853
2 = 2
3 = width=”1280″ height=”853″
bits = 8
channels = 3
mime = image/jpegBut yeah I dont understand why function.php would be affected by a vps switch. Here is the code regarding that particular part of function.php
function PricerrTheme_generate_thumb($img_url, $width, $height, $cut = true) { require_once(ABSPATH . '/wp-admin/includes/image.php'); $uploads = wp_upload_dir(); $basedir = $uploads['basedir'].'/'; $exp = explode('/',$img_url); $nr = count($exp); $pic = $exp[$nr-1]; $year = $exp[$nr-3]; $month = $exp[$nr-2]; if($uploads['basedir'] == $uploads['path']) { $img_url = $basedir.'/'.$pic; $ba = $basedir.'/'; $iii = $uploads['url']; } else { $img_url = $basedir.$year.'/'.$month.'/'.$pic; $ba = $basedir.$year.'/'.$month.'/'; $iii = $uploads['baseurl']."/".$year."/".$month; } list($width1, $height1, $type1, $attr1) = getimagesize($img_url); //return $height; $a = false; if($width == -1) { $a = true; } if($width > $width1) $width = $width1-1; if($height > $height1) $height = $height1-1; if($a == true) { $prop = $width1 / $height1; $width = round($prop * $height); } $width = $width-1; $height = $height-1; $xxo = "-".$width."x".$height; $exp = explode(".", $pic); $new_name = $exp[0].$xxo.".".$exp[1]; $tgh = str_replace("//","/",$ba.$new_name); if(file_exists($tgh)) return $iii."/".$new_name; $thumb = image_resize($img_url,$width,$height,$cut); if(is_wp_error($thumb)) return "is-wp-error"; $exp = explode($basedir, $thumb); return $uploads['baseurl']."/".$exp[1]; }Forum: Fixing WordPress
In reply to: Broken Images after moving from Shared Hosting to VPSAll the permissions for the folders are 755 and 644 for the actual images in wp-content. Both Owner/Group are by 501 and 512, which means the owner/group for both working and non-working images are the same.
The error logs only says: PHP Warning: getimagesize(/home/dormgigs/public_html/wp-content/uploads/2014/03/cms-265127_1280.jpg): failed to open stream: No such file or directory in /home/dormgigs/public_html/wp-content/themes/PricerrTheme/functions.php
The image exists in multiple sizes and original size