Site icon David Yin's Blog

Path difference between Windows and Linux

Movabletype 4.01 has the internal upload facility, which can upload images to the assets manager.
My blog is always runing well on my Windows 2003, until I moved it to the Linux server.
The photo is not displayed on the sidebar. Only the file name is shown there.
After researching over 2 hours, I found the problem is the path.
Windows uses “\” as the path symbol. Linux uses “/” as the path symbol.
The path saved in the database is something like, “\images\photo-1.jpg”
It can not be displayed correctly in Linux server. Movabletype has not have the tool to change the path. I have to use PhpMyAdmin to change the path manually. It is saved in mt_asset table. Change the asset_file_path and asset_url to match Linux rule.
Then the photo widget shown properly and the page of manage assets can display image asset and preview popup can shown the correct image.
It is not the end. I have to check all my blog use the thumb image, which has some URL use the old Windows path. Manually change them again.
After these changes, all images use the MT4.01’s inclusive asset manager can be displayed perfectly.
Please be reminded thant when you move your MT blog from Windows to Linux. And also I think if the MT blog moves from Linux to Windows has same problems.

Exit mobile version