PHP on different hosts - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-14-2011, 01:20 PM   #1 (permalink)
Junior Member
 
Join Date: Mar 2011
Location: NY
Posts: 2
Question PHP on different hosts

Hi, I'm trying out some code from the PHP Anthology. I find that it works fine on one of my hosting accounts, but not the other. I'm wondering whether anyone might be able to suggest why this might be the case?

The code is from Chapter 7. Email and is as follows:


Code:
<?php
mail('you@yourdomain.com', 'Howdy', 'Glad to meet you.',
    'From: me@mydomain.com');
?>

(I've changed the two email addresses to my own...)

The exact same code works perfectly on one hosting account, but not the other. It's a really simple script, so I'm wondering what's up.

Many thanks for any help

Last edited by RobertJohnson; 03-14-2011 at 01:35 PM. Reason: check
RobertJohnson is offline   Reply With Quote
Sponsored Links
Old 03-14-2011, 07:09 PM   #2 (permalink)
Regular User
 
Join Date: Jul 2005
Posts: 47
Default Re: PHP on different hosts

For the one not working you need to make sure that the install of PHP you are using supports the mail() function. Create and upload a simple phpinfo.php file.

<?php
phpinfo();
?>
sandman is offline   Reply With Quote
Old 03-15-2011, 08:20 AM   #3 (permalink)
Junior Member
 
johneva's Avatar
 
Join Date: Nov 2010
Location: UK
Posts: 61
Default Re: PHP on different hosts

Yeah the other hosting probley just does not have PHP installed.
johneva is offline   Reply With Quote
Old 04-09-2011, 11:36 AM   #4 (permalink)
Junior Member
 
Join Date: Mar 2011
Location: NY
Posts: 2
Default Re: PHP on different hosts

sandman, thanks!
RobertJohnson is offline   Reply With Quote
Old 04-10-2011, 02:54 AM   #5 (permalink)
Regular User
 
Join Date: Apr 2011
Posts: 115
Default Re: PHP on different hosts

This link illustrates the use of Mail function in PHP
chunnilal is offline   Reply With Quote
Old 05-16-2012, 11:35 PM   #6 (permalink)
Regular User
 
Join Date: May 2012
Location: usa
Posts: 18
Default Re: PHP on different hosts

Check your configuaration of smtp port
__________________
a games
y8games2012 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:37 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting