LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Migrating xampp website, but php form doesn't send email from new server (https://www.linuxquestions.org/questions/linux-server-73/migrating-xampp-website-but-php-form-doesnt-send-email-from-new-server-4175517304/)

Habitual 09-05-2014 01:40 PM

Quote:

Originally Posted by rjo98 (Post 5232856)
going under the impression I can skip MySQL.... I didn't get the email

If your PHP site uses or will use a mysql database, you'll need this package.
Where was the email supposed to "go"? Local or off-host?

CentOS version...?

I agree with unSpawn, your progress is very commendable.

anon091 09-05-2014 01:45 PM

The only php I could find so far was all for forms that just send an email of the form data to different folks. So, at least at this point, I'm going to see if I can get by without install MySQL on the new server.

Looks like sendmail is timing out talking to my mail relay, off host, from my virtual machine. But I figure that's a lot easier of an issue to tackle, if it's even still an issue, once i'm on the real server. For how my attempt at xampp was going, the fact that it's actually logging something in there is a big step.

CentOS 6.5

Thanks guys, I'd still be banging my head against a wall if it weren't for you two.

Shortly here i'm going to try to kill my xampp disaster, then install apache and php and see where that gets me.

anon091 09-05-2014 02:17 PM

My two test php forms work PERFECTLY on the real server!!!

Question though on what you think is the best way to get the actual html, php, jpgs, etc out of the existing xampp and into /var/www/html on the new server? I know unSpawn said rsync the docroot over, but I'm almost afraid of how much useless stuff I'd be bringing over (they don't have a real good inventory/idea of what's still in use and what's not).

Should I really just copy it all over and see what happens? Is there a program that could crawl the main 'homepage' of it and see what's still used, that would include any .php .jpg .whatever files with it, then I could move that over? I'm not sure what the best practice is in this situation, so just looking for opinions here.

I still can't get over how much easier the "right way" is haha

Habitual 09-05-2014 03:18 PM

Quote:

Originally Posted by rjo98 (Post 5232949)
Looks like sendmail is timing out talking to my mail relay, off host, from my virtual machine.

Probably the "real server's" IP is in either a firewall rule that allows that IP or in the "trusted hosts" directive of the receiving server's mail service configuration.

Hard to tell. You could try telnet <mailrelay_ip> 25 and see what's what... ;)
Can you send mail from the VM's host (not the guest) to the mail relay?

I'd copy everything over unless space is an issue.

anon091 09-05-2014 03:21 PM

You're probably right about the trusted IP thing.

Yeah, I'm thinking about just copying everything, that way it's all there, even if most of it is garbage at this point. Guess I'll just do an rsync of the folder containing all the files on the old server, and have it duplicate that folder under /var/www/html then.

Habitual 09-05-2014 03:40 PM

if you can
Code:

telnet <mailrelay_ip> 25
to offer a prompt on the host, you could install postfix on the guest and use the Smarthost configuration to send mail to the mail_relay.

anon091 09-05-2014 03:41 PM

OK, I will give it a shot later.

anon091 09-12-2014 02:19 PM

Hey guys. Kinda related to this but definitely off topic from my first post, but I'm going to ask.

So now that I have a fancy, non-lampp web server with sendmail working with my php forms, how do I back this thing up? haha

Habitual 09-12-2014 05:20 PM

define "up"... please.

Glad to see you're making progress!

anon091 09-12-2014 05:44 PM

Got everything working on the new server!
But I'm not sure about backing it up. Is there an "official" way or do I just rsync some folders?

Habitual 09-13-2014 06:21 AM

doh, I definately mis-read "back this thing up" for backup. Long day.
rsync is my choice.

anon091 09-13-2014 07:37 AM

No problem. Ok. I'll just setup rsyncs of the stuff. Do I need to stop processes first or you think I can skip doing that jazz.

Habitual 09-13-2014 09:17 AM

Really depends on how much writing is going on in the directories you wish to backup.

anon091 09-15-2014 07:56 AM

Very, very minimal, and not at the hours i'd be running the rsync.

I was thinking of backing up /var/www and then /etc. For what I'm doing, do you think that covers it?

Habitual 09-15-2014 09:35 AM

I'd use something like this:
Code:

#!/bin/bash
tar -pczf /path/to/storage/backup_name_$(date +%F).tar.gz /var/www/site1 \
/var/www/site2 /etc/apache2/sites-enabled/000-default /etc/apache2/sites-enabled/other_site
#EOF

/var/www/siteX may be /var/www/html/siteX and /etc/apache2/sites-enabled/000-default would be your path to the apache conf files for any sites included in the backup.


All times are GMT -5. The time now is 12:33 PM.