May 4, 2011

"Store Images Locally" question | CyberSEO Pro | Support Forums

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Related Topics sp_topicicon
"Store Images Locally" question
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
Tags: images
September 15, 2011
3:44 am
Avatar
Member
Members
Forum Posts: 33
Member Since:
July 27, 2011
sp_userofflinesmall Offline

Occasionally I run into a problem when storing images locally.  CyberSEO will stop on that post and continue no further when it can't get the images for a specific post.  The error returned is this:

Error: Could not insert post into the database
0 posts were added

Is there any way, through executing lines in the “PHP Code” box or through an extra setting, to have CyberSEO first attempt to store the images locally, but fall back to using the original src upon failure?  I run into this quite often, sometimes for no apparent reason.

 

Example:

CyberSEO Domain = Domain1.com

Source Domain = Domain2.com

If image successfully downloads, img src = domain1.com's url{

Else{ img src = orginal img src on domain2.com}

 

I hope this makes sense.

 

Thanks!

September 18, 2011
11:45 am
Avatar
Admin
Forum Posts: 3097
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Actually the plugin is used to work exactly that way you suggested above. So it seems there is some problem in your case. Can you show me example (you can PM it if you don't want to post your site here), or tell me how exactly can I reproduce the mentioned error on my own test blog.

September 20, 2011
3:26 am
Avatar
Member
Members
Forum Posts: 33
Member Since:
July 27, 2011
sp_userofflinesmall Offline

Example sent via PM.

September 20, 2011
11:59 am
Avatar
Admin
Forum Posts: 3097
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Just one question. Do you have allow_url_fopen enabled in your PHP config?

September 20, 2011
7:42 pm
Avatar
Member
Members
Forum Posts: 33
Member Since:
July 27, 2011
sp_userofflinesmall Offline

Yes, I do.

 

allow_url_fopen = On

September 22, 2011
2:37 pm
Avatar
Admin
Forum Posts: 3097
Member Since:
July 2, 2009
sp_userofflinesmall Offline

Unfortunately I was unable to re-produce the problem mentioned above. Could you please enable debug mode (define('WP_DEBUG', true); in wp-config.php) and post here all the error messages, warnings and notes you are receiving along with “Could not insert post into the database”?

October 1, 2011
7:32 pm
Avatar
tonyparra
Guest
Guests

I also have a question about storing images locally i wasnt sure if i should create a new topic with the same title so i just piggybacked this one. I use this code to get flv automatically, and on the tools section i have selected image path cloaking. Both wp-content and wp-content/uploads are 777. This code works on other sites so i cant figuire out the the issue:

//
$post ['custom_fields'] ['sponsor'] ='BisexDigital.com';
$post ['custom_fields'] ['paysite_url'] = 'Login to see this link.;;
// “sponsor” field
$post ['custom_fields'] ['site'] = '';
$post ['custom_fields'] ['sponsordesc'] = '<a href=”http://www.xbisexuals.com/bsd.php” target=”_blank”>BisexDigital.com</a> – The biggest on-line resource for bisexual porn action, BiSexDigital.com brings you the highest quality bisexual porn available on the net! Browse our massive bisexual adult dvd collection, because its fun to share!';
// format clip's duration as mm:ss
$post ['custom_fields'] ['duration'] = date ( 'i:s', $post ['custom_fields'] ['duration'] );
// fake random time from 0:20:00 to 2:00:00
$post ['custom_fields'] ['time'] = date ( 'i:s', rand ( 1200, 72000 ) );
// create an URL of thumb from it's path and file name
$screen = $post ['custom_fields'] ['screen'];
if (is_array ( $screen )) {
$post ['custom_fields'] ['thumbnail'] = $post ['custom_fields'] ['screen_url'] . $screen [rand ( 0, count ( $screen ) – 1 )];
} else {
$post ['custom_fields'] ['thumbnail'] = $post ['custom_fields'] ['screen_url'] . $screen;
}
// uncomment the line below to store thumbnails on your server
cseo_store_image ('thumb', $post ['post_title']);
// since FLV videos have no unique GUID's let's use their URL's as post GUID's
$post ['custom_fields'] ['hostedflv'] = $post ['guid'] = $post ['custom_fields'] ['clip_url'] . $post ['custom_fields'] ['flv'];
// now let's delete all useless custom fields
unset ( $post ['custom_fields'] ['screen_url'] );
unset ( $post ['custom_fields'] ['screen'] );
unset ( $post ['custom_fields'] ['clip_url'] );
unset ( $post ['custom_fields'] ['flv'] );

October 1, 2011
8:13 pm
Avatar
Admin
Forum Posts: 3097
Member Since:
July 2, 2009
sp_userofflinesmall Offline

I believe the “image path cloaking” is the issue, because it doesn't work on all hosts. For example, it doesn't work if you are using the nginx server to process the static content. Try to disable the “image path cloaking” option.

December 3, 2011
2:10 am
Avatar
Member
Members
Forum Posts: 33
Member Since:
July 27, 2011
sp_userofflinesmall Offline

Hey CyberXXX.  Sorry it took me so long to reply to this.  I figured out the issue I was having.  The server had a php timeout of 30 seconds.  I kept increasing it until I finally hit a time that it wouldn't hang on.

Thanks for all of your help.

Forum Timezone: Europe/Moscow

Most Users Ever Online: 105

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 81

Freedom: 61

B8europe: 54

saviulisse67: 45

adultdenim: 44

allgoodies: 38

Member Stats:

Guest Posters: 350

Members: 1927

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1328

Posts: 6627

Administrators: CyberSEO: 3097