Jump to content

Recommended Posts

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]

Link to comment
https://forums.phpfreaks.com/topic/117929-sending-mail/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-606613
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/117929-sending-mail/#findComment-607300
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.