Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: bakedjake
The host said they have tried and tried to move the contents of one box to the other but the website scripts break and would require a programmer to figure it out because all the scripts were written for two servers. There are several hundred custom scripts on each box.
My host (elsewhere) offers much cheaper prices so I'd prefer to move it there but they don't use freebsd.
Are php/mysql scripts on a freebsd server somehow different that what you would use for linux?
It's probably configuration of the scripts. I'll bet the scripts need to be updated to use the path on the new box, since their location will probably be different. Another thing that might have to be updated, database access and set-up - would need to be replicated and/or the scripts updated.
Wonder: is the database hosted on one server, the site on the other box? That'd be my guess.
There are literally thousands of scripts on the main server and it's hard to figure out which ones are actually being used. I think it's only a couple hundred of them though.
There is no phpMyAdmin and lots of scripts use mysql commands, also there's a bunch of .sh scripts that I don't even understand.
The host just emailed me and said this,
to combine the two servers we would have to run
everything on a Linux server (as our managed server product runs Linux). We
tried once to move the site as-is to our managed platform and certain
elements of the site would not function.
As a general rule there is usually no problem moving sites freely
between operating systems. However, this particular site is custom designed
and frankly so difficult to follow that we were unable to move the
site and keep it running properly while we tried to troubleshoot it. The
developer of the site would be the best candidate to support any
further attempts to move the site again.
arrrrg. This is turning out to be a nightmare.
The Key areas I would investigate are:
1) Location of config files. php.ini on FreeBSD is in /usr/local/etc/php.ini and extensions.ini is in /usr/local/etc/php/extensions.ini
2) Path names in config files (e.g. httpd.conf) - stuff is very likely to be in different places on a linux box (e.g. htdocs may live under /var, while FreeBSD puts it into /usr/local/www).
3) Plain PHP will obviously be the same, but you need to ensure all the required PHP extensions are available. The most incompatible PHP code will be calls to external commands.
4) Any .sh (i.e. bash) scripts may again have hard-coded path names which won't work on linux. FreeBSD's /bin/sh is also different from linux's /bin/bash - bash is mostly a superset, but I have seen /bin/sh scripts fail on /bin/bash.
5) Any external utilities (e.g. tar) called by PHP or the scripts could be in different locations, AND are likely to use some incompatible switches. FreeBSD uses *BSD style switches (obviously); not all of these work or do the same thing as GNU.
6) Read/Write permissions to files and directories used in scripts, etc. (A forked script called from a FreeBSD web server will run as 'www:www', but I believe some linux distros may run it as 'nobody:nobody').
A brute force, quick and dirty approach might be to replicate the locations of everything using symlinks, set file permissions, ensure the PHP configuration is the same, and then you're only left with a bit of .sh script debugging ;)
Unfortunately we decided to just shut down the site because all the scripts on these two servers are a mess and no one can figure out how it works.
There are literally thousands of scripts, each with a few hundred to a few thousand lines of code and they don't make sense. It's overwhelming to say the very least.
The whole program was given to me for free cause the current owner couldn't figure it out either.
The real question for you becomes is the site worth paying someone like me with the relevant experience to deal with figuring it out?
Honestly, it sounds like something that a little knowledge of sed and awk could put right in a few hours of investigation. Posix/gnu utilities are all pretty commonly shared on both platforms and paths aren't all THAT different.