radhoo Posted August 3, 2008 Share Posted August 3, 2008 Hi, Recently I have installed a simple send mail form on a host, but I cannot get it to run. I tried the same script on other 3 hosts and it works as it is, but on the host I need it to work it doesn't. May be you can look at it. Some parts of the php code appear in the form on that host , maybe there are some php or apache setting to be made to work... Here it works for example. Thanks. Already tried : changing "<?" in "<?php short_open_tag = On in php.ini[/url] [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/117929-sending-mail/ Share on other sites More sharing options...
wildteen88 Posted August 3, 2008 Share Posted August 3, 2008 Its because you're using short tags, on your host (quanticlab.com) short_open_tag is disabled, that is why you see your PHP in the source code. When modifying the php.ini make sure its the same php.ini PHP is using, you can check this by running phpinfo You might want to ask your host how to enabled short_open_tag and/or how to configure PHP. You'll be better of converting all short tags (<? ?>, <?= ?>) to full PHP tags (<?php ?>, <?php echo ?>). If the script still doesn work after converting the tags then your Server may be mis-configured. Quote Link to comment https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-606613 Share on other sites More sharing options...
radhoo Posted August 4, 2008 Author Share Posted August 4, 2008 I have modified the php.ini - > short_open_tag = On but it still doesn't work. I also created an info file : <?php phpinfo(); ?> And there is shows that short_open_tag = Off. Although in the ini is on. Quote Link to comment https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-607284 Share on other sites More sharing options...
PFMaBiSmAd Posted August 4, 2008 Share Posted August 4, 2008 I would guess that the host does not allow that setting to be changed using the method you are trying. Why not take the easy way out and change any short tags <? and <?= to long tags <?php and <?php echo like wildteen88 already suggested. Then you will have code that will work with any short_open_tag setting and you won't have to mess with it any more. Quote Link to comment https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-607300 Share on other sites More sharing options...
radhoo Posted August 4, 2008 Author Share Posted August 4, 2008 Ok, I have managed to do that. So short_open_tag problem is soved, but now it say that the mail was sent but I don't get any mail... Quote Link to comment https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-607315 Share on other sites More sharing options...
BioBob Posted August 5, 2008 Share Posted August 5, 2008 spam filters maybe? also mail() is a BOOL so you can use if(!mail($mail,$subject,$body,$headers)) { echo "ERROR!" } Are you using it in mail() or if(!mail) { format? Quote Link to comment https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-608479 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.