Windows Changed SMF Files to All Lower Case

Started by ForumGuy789, May 03, 2014, 11:02:21 PM

Previous topic - Next topic

ForumGuy789

This is an interesting problem. I've been running SMF fine on windows for 7 yrs or so. Well recently my web host went to shyte and they made me migrate onto a server that when i FTP'd my SMF files onto it it changed all the files and directories to lower case!

But since this is a Windows system it ran fine, and i didn't even notice the file name changes for a while. Windows and IIS I guess have case insensitivity in everything including php code ran on it.

Well i want to join the rest of the world now and run SMF on CentOS/Apache but the smf code is looking for the php files with case sensitivity so it's not working!

There are a LOT of files to go through and manually fix their cases. That's a last resort that I might consider.

But so far I've tried setting this on the apache server config file and it didn't seem to help - unless i used it wrong.
CheckSpelling On
CheckCaseOnly On

That didn't seem to work.

I should also mention that I have a few mods installed so would rather not install fresh new files.

Any other suggestions? Any ideas would be greatly appreciated.

Lou69

This may work .... since most files will be the same unless modified by a mod, you could uninstall all mods and themes and then copy over the source files and whatever else from a fresh download. Save a copy of the Settings.php just in case ... infact, backup everything first. :)

When finished copying, then reinstall your themes and then install the mods. Deleting the cache would not hurt either.

Kindred

it actually sounds like whoever transferred your files screwed up.
Windows, as stupid as it is, should still maintain the case of filenames.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ForumGuy789

Quote from: Kindred on May 04, 2014, 09:24:31 AM
it actually sounds like whoever transferred your files screwed up.
Windows, as stupid as it is, should still maintain the case of filenames.

It could be. I did the transfer. But I just used Filezilla as always (7+ yrs) but didn't see an option to mess up the file name case.
And all of this happened when Hostgator forced everyone, including those on a dedicated server, to move to their crappy Provo datacenter.

sschefer

Windows 7, Windows Server and IIS 7 are not you problem and neither of them changed the case. My guess is that it's actually MySQL that's the culprit. It's probably set for lower case only. It probably converted your database and table names to all lower case and that's where your problem and not the file names.

I run both IIS 7.5 and 8 servers alongside Apache servers. The IIS servers are hands down the most stable and easiest to configure and tune but nobody likes them because they're not free or they've never actually used them.

ForumGuy789

Ya I have no complaints about IIS.

I was thinking it was the servers because they were newly configured, by a company that completely changed from a great company to a complete shyte company overnight after EIG purchased Hostgator.

The problem with ftp also seemed to go away after a few days (like they realized there was some bad setting and fixed it) and it no longer changed file names to lower case when transferring files on there. I did nothing to change that. There were a few other probs with the newly configured server too.

I could be wrong and it's user error. I realize user error is more often the case but if you know anything about the new Hostgator you'd also suspect them of messing something up.

I don't see how MySQL would be the problem when the actual filenames are changed themselves to all lower case - unless mysql can change filenames.

I'll probably try doing what Lou suggested above if there are no easier suggestions.

sschefer

Good to here your getting it hammered out.

MySQL has an option to only accept shema names in lower case and will convert them if you don't but it also usually throws an error. I've also had it not allow table names in lower case. With SMF I haven't seen that ever be an issue unless someone changes the table prefix to upper case.

If your file names all got changed and there is something like and include statement somewhere in a .php file and it calls the file with the uppercase characters then that would be problematic. Normally, we would preface the call with a check and convert to lower to ensure that is not a problem.

Kindred

normally by whose standards?

If a file name is in mixed case, just like a variable name, it should be called in the exact case that it is...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Yay for lots of confusion and FUD.

MySQL is totally irrelevant in this discussion. Completely. (And MySQL does not have any known issues with lower case in database names, table names or column names. It was only changed in SMF 2.0 to use all lower-case table and column names because PostgreSQL and SQLite don't support mixed case.)

Windows generally doesn't care about file name casing; Linux and *nix in general does. Having CamelCased files in SMF is therefore potentially problematic because not only do all the files have non-lower case, all the source refers to it as such. You can't just change all the filenames to lower case and not expect it to break. Plenty of other software has a similar issue, though, especially if they're using PSR-0 style conventions in terms of classes and class naming (doubly so if using an autoloader)

All the file names should, however be kept consistent when uploading to a server because even the FTP services on Windows are not *that* stupid, normally. I'd wonder what's gone wrong but spreading FUD about MySQL is not appreciated, thanks.

ForumGuy789

I'm marking this solved. Here's what I did to fix all the file capitalization probs:
- Made a fresh install of SMF 2.0.7 on a new SMF DB
- Installed all mods I had installed previously
- Edited some SMF css and other files a bit with custom code.
- Deleted new SMF DB
- Imported the old SMF DB (my forums) into Mysql

I have tons of attachments too and some attachment files still used the old attachment naming convention where not everything was named (attach_id)_(hash) in lowercase like it is now. So some HDD attachment files were named incorrectly because they previously had Caps in them.
- Made a php program that retrieved all attachment info on SMF DBs.
- Compared it to the files I found on the HDD.
- Found a HDD file match for each DB attachment by looking for different naming conventions.
- Renamed the HDD files that needed renaming based on it's naming convention.

All Attachments and Avatars are now found when checking their Integrity in SMF so that's good.

I also noticed that many attachments that I previously tried to delete (ages ago) were never actually deleted off the server. Server permissions for the attachments directory must not have been good enough at some point. So I made another php prog that went through and deleted any files that weren't on the SMF DB. I freed about 100 MB by deleting these files :)

Advertisement: