Migrating data and files to a new site

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
ed209
Forum Contributor
Posts: 153
Joined: Thu May 12, 2005 5:06 am
Location: UK

Migrating data and files to a new site

Post by ed209 »

Hi,

I'm migrating an existing site into a newly developed site. Most of the SQL stuff is straight forward, but I'm just wondering about migrating files. All the files need to go through an image re-size script (which already exists). Does anyone have any experience with this, any common pitfalls?

My plan is to write a custom script that will open, resize and move the files but I've never done it before so I'm not sure if there's an established proceedure for doing this.
santosj
Forum Contributor
Posts: 157
Joined: Sat Apr 29, 2006 7:06 pm

Re: Migrating data and files to a new site

Post by santosj »

If you use GD, then this would be a simple task.
User avatar
ed209
Forum Contributor
Posts: 153
Joined: Thu May 12, 2005 5:06 am
Location: UK

Post by ed209 »

could you expand a bit on that.

I have actually managed to write a script that does exactly what I need but I think it's timing out as it's notfinishing the job. I have used set_time_limit(900); but I think the browser maybe timing out - not the script
santosj
Forum Contributor
Posts: 157
Joined: Sat Apr 29, 2006 7:06 pm

Post by santosj »

Well, you need to post some code. It could probably be optimized a little bit.
User avatar
ed209
Forum Contributor
Posts: 153
Joined: Thu May 12, 2005 5:06 am
Location: UK

Post by ed209 »

I've managed to get it working. It turned out to be a permissions thing on some of the original files - php didn't have permission to open the file that's why it worked for some and not for others. I guess it's always the most obvious thing!
Post Reply