Jump to content
Larry Ullman's Book Forums

Is This Possible With Databases?


Recommended Posts

I have 2 sites. For the first one I created a newsletter. People register and I send them the newsletter from another webpage by using the mail() function. My problem is that 90% of users have yahoo emails. Yahoo does not accept emails from this first server. After a lot of useless discussion, I bought a second site, from which yahoo accepts emails.

 

I thought I might move the whole site at first, but I have several databases and was afraid the difference in mysql and php versions might make some commands in php and mysql unusable.

 

So now users are registering on site no1 into a database and are receiving email from site no2 from another database.

Server1 has a 4.4.8 php version, version 4 for mysql - maybe that is why yahoo won't accept them.

Server2 has a 5.2.17 php version, version 5 for mysql - I haven't been able to find a host with 6 for php yet.

 

I never tried but could it be possible to connect to mysql on server 2 from the php on server1? db, username, password are all known so these emails would be saved in the right table at registration and I wouldn't have to import the table from time to time and keep two tables.But, even if possible with different versions, that would be like hacking my own site. Would the webhost mind? Why? Is there a better solution?

Link to comment
Share on other sites

I tried to use MailChimp but my newsletter has 4 options for the email (the user can pick 1,2,3 options or all of them) that makes 15 combinations. Maybe I was hasty but MailChimp doesn't seem to offer more than one combination. I used to send this email manually, and I couldn't change the format later. I will check out SendGrid though.

Link to comment
Share on other sites

IMO it's worth it to move to PHP 5.4. OOP is far superior to 4.+, ereg, register globals deprecated, etc. Most importantly, php mysql library has been deprecated. The mysqli lib is recommended. Upgrading to current version on single server also removes conflicting php.ini issues, beyond everything else describe. Life'll be easier I think.

Link to comment
Share on other sites

I would just try exporting the DB and try to import it at the other host. If everything worked ok, move on to coying files over. When everything is working correctly, you make the switch. ( Permanent redirect through .htaccess for example)

 

It's possible to remote connect at my host at least. (I connect to that server from localhost when developing) I would guess this is possible also elsewhere. Just make sure you get the hostname correct as "localhost" obviously won't work when connection remotely.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...