Wordpress Import Failed

Having trouble installing serendipity?
Post Reply
Sarpy Sam
Regular
Posts: 17
Joined: Thu Feb 03, 2005 3:37 am
Contact:

Wordpress Import Failed

Post by Sarpy Sam »

I have been interested in S9y for a while and downloaded the snapshot two days ago. I tried to import my wordpress blog and failed with the following error.

Fatal error: Maximum execution time of 30 seconds exceeded in /home/nowheret/public_html/test/include/admin/importers/wordpress.inc.php on line 222


All entries came over all right but the comments didn't all make it. Is there any way I can make the execution time go over 30 seconds to finish this or can I just do it again.

Thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Wordpress Import Failed

Post by garvinhicking »

Maybe you can try to open the file include/admin/importers/wordpress.inc.php and after the <?php insert this line:

Code: Select all

set_time_limit(600);
Then you can try the importer again (though you should empty your entries/comments table first, of everyting will be imported again...)

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

note that set_time_limit has no effect if your site is in safe-mode
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
Sarpy Sam
Regular
Posts: 17
Joined: Thu Feb 03, 2005 3:37 am
Contact:

Post by Sarpy Sam »

I don't know what safe mode is but it worked anyway. Everything got imported. I do have a question though.

At the end of all the posts where it tells you the number of comments to the post they all read 0 even though the post has comments attached to it. Is there any way to fix this so it shows the right number of comments?
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post by jhermanns »

if you are using mysql 4.1 you could do the following (in phpMyAdmin or so):

Code: Select all

UPDATE serendipity_entries SET serendipity_entries.comments = (
  SELECT count(serendipity_comments.id) FROM serendipity_comments
  WHERE serendipity_comments.entry_id LIKE serendipity_entries.id
  AND serendipity_comments.type LIKE 'NORMAL'
)
to fix the number of comments and then

Code: Select all

UPDATE serendipity_entries SET serendipity_entries.trackbacks = (
  SELECT count(serendipity_comments.id) FROM serendipity_comments
  WHERE serendipity_comments.entry_id LIKE serendipity_entries.id
  AND serendipity_comments.type LIKE 'TRACKBACK'
)
to fix the trackbacks. Please note that these subselects only work in MySQL 4 and this select construct only in 4.1. You might need to change the 'serendipity_' prefix if you chose something else. I hope there's no typo in there, I haven't tested this, but thats the way to go :-)
Sarpy Sam
Regular
Posts: 17
Joined: Thu Feb 03, 2005 3:37 am
Contact:

Post by Sarpy Sam »

I assumed there was a way to do it via mysql. Unfortunately my server is running 4.0.16 mysql. I am completly unfarmilar with mysql and I can't figure out the documentaion for how it should be configured to get the command to work.

Thanks.
Post Reply