Jevents 1.4 for Joomla 1.0.x

Getting from Jevents 1.3 to 1.4

Postby dmcneillsf » Wed Mar 23, 2011 5:51 pm

I've attached the top portion of a screen shot. There's data now but, to my untrained eye, it looks a little odd. Perhaps I should take the "serialize" function out of the export.php portion? You can see the entire listing at http://www.swmtsugar.com/jeventsmigrator_import.php.

I do see some progress!!
Attachments
scrshot1a.jpg
scrshot1a.jpg (242.89 KiB) Viewed 2348 times
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby dmcneillsf » Wed Mar 23, 2011 5:59 pm

Ooops!! base64_encode did not like having to stand alone without serialize. That was enlightening. :shock:

I'll put the code back the way it was.
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby Geraint » Thu Mar 24, 2011 10:00 am

That looks fine - it could be that there is a problem with your php version's unserialize function.

What version of php do you have?
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42781
Joined: Fri Feb 15, 2008 6:14 pm

Postby dmcneillsf » Thu Mar 24, 2011 1:39 pm

I have 5.2.16
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby Geraint » Thu Mar 24, 2011 3:22 pm

Try adding this in the file near the top
Code: Select all
error_reporting(E_ALL);
ini_set('display_errors','On');
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42781
Joined: Fri Feb 15, 2008 6:14 pm

Postby dmcneillsf » Thu Mar 24, 2011 3:42 pm

In the jeventsmigrator_import.php file? I put the code just below the max_execution_time - didn't see anything different in the screen output.

Then I saw the set error handling section and moved the code to that section. Again, no difference in the screen output, no messages.
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby dmcneillsf » Thu Mar 24, 2011 6:51 pm

I'm sorry - I blew it. There is a message. I cleaned out all the $tempdata stuff we were working with yesterday and reran the import. The message must have been overwritten by the vardump. Here's the message -

Notice: unserialize() [function.unserialize]: Error at offset 49145 of 516187 bytes in /home2/swmtsuga/public_html/jeventsmigrator_import.php on line 81

Line 81 is $eventdata = unserialize(base64_decode($eventdata));

BTW, I tried the import on webhosts (lunarpages and bluehost) that were using php 5.2.14 and 5.2.16 - identical message.
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby dmcneillsf » Thu Mar 24, 2011 7:29 pm

More information on the error. I thought that the error might be caused by a corrupted record. I figured out approximately where 49145 was in the record stream and deleted the records around that point (they were from 2007 - no one will miss them). I exported the file again and the error shows up at the same point. I looked at the stream in the vardump and the records have changed.

Is there a way to transfer the data using something other that serialize/unserialize?
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby dmcneillsf » Thu Mar 24, 2011 10:37 pm

After looking at the array created by the import command, I realized the base64-decode results had lots of data corruption way down in the file.

Fortunately, I think I have a work-around. In the export program, I replaced -
Code: Select all
$eventdata = base64_encode(serialize($eventdata));

header ('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header ('Content-Type: text/plain');
//header ('Content-Length: ' . sizeof($eventdata));
header ("Content-Disposition: attachment; filename=eventdata.txt");
echo $eventdata;


With
Code: Select all
$eventdata=serialize($eventdata);
$eventfile="eventdata.txt";
file_put_contents($eventfile,$eventdata);


In the import program, I replaced -
Code: Select all
$eventdata = unserialize(base64_decode($eventdata));

with
Code: Select all
$eventdata=unserialize($eventdata);


It looks like all the data came across. Are there landmines I should be looking for?

For the moment, it's looking good!! :mrgreen:
(crossing fingers, looking for rabbit's foot, hoping for the best)

Deb
dmcneillsf
 
Posts: 31
Joined: Tue Jun 10, 2008 7:38 pm

Postby Geraint » Fri Mar 25, 2011 9:10 am

I woke up this morning with exactly the same suggestion - so good work.
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42781
Joined: Fri Feb 15, 2008 6:14 pm

PreviousNext

Return to Jevents 1.4 for Joomla 1.0.x

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: No registered users