taliets Posted November 6, 2007 Share Posted November 6, 2007 Hello everyone! I have got this problem with my contact form on my website and was wondering if you could help. It used to work fine before and I've just changed the way the form is coded by adding some label tags to make it more user friendly for text browsers. I've even tried reverting back to the old form and it still doesn't work. It displays the message for when all the form fields haven't been filled out as if some fields were not filled out. Here is the link to test: www.frostedberry.net/Silvia/Kontakt.php I've recently added a php.ini file and was wondering if that could be the problem? Is it neccessary to have a php.ini file in my site? Any help would be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
revraz Posted November 6, 2007 Share Posted November 6, 2007 The PHP.INI file is usually provided by your webhost and you always had one. But if you added another one to say your webroot, now it is defaulting to yours instead of the webhosts. I would rename the php.ini that you added to like php.ini.bak and see if that fixes your problem. If not, post your code. Quote Link to comment Share on other sites More sharing options...
btherl Posted November 7, 2007 Share Posted November 7, 2007 It's not necessary to have your own php.ini. The system will have a default one. And yes it's quite possible that adding php.ini will have broken the site. In particular, there's a setting called "register_globals" that regularly breaks websites when it is switched off. Quote Link to comment Share on other sites More sharing options...
taliets Posted November 7, 2007 Author Share Posted November 7, 2007 Thanks guys! So you think the best is just to delete my own php.ini file? A friend told me that when you have includes its best to create this file to show the server where the includes are otherwise it sometimes can't find them. Is that correct or would it still find them without me adding my own php.ini file? Quote Link to comment Share on other sites More sharing options...
btherl Posted November 7, 2007 Share Posted November 7, 2007 You can still set the include path from your script (it will need to be done in each script). I do it like this, checking to see if it's already there first. You don't need to check if it's already there if you know it isn't. if (!preg_match('|/var/www/www.prioritysubmit.com/webroot:|', ini_get('include_path'))) { ini_set('include_path', '/var/www/www.prioritysubmit.com/webroot:' . ini_get('include_path')); } Quote Link to comment Share on other sites More sharing options...
taliets Posted November 8, 2007 Author Share Posted November 8, 2007 Hi. Where in the script do you set this code? I usually just add the include script in my html. Is that enough/ok? I have now fixed the form problem btw. It was the php.ini file that was the problem! Quote Link to comment Share on other sites More sharing options...
obsidian Posted November 8, 2007 Share Posted November 8, 2007 If you're just trying to set your include path and add a directory to that, here are a couple options that are a bit easier: PHP: <?php $newPath = '/var/www/www.prioritysubmit.com/webroot'; set_include_path(get_include_path() . PATH_SEPARATOR . $newPath); ?> If you know exactly what path your want your directory to use, just do something like this in an .htaccess file within your directory root: php_value include_path ".:/var/www/www.prioritysubmit.com/webroot" Quote Link to comment Share on other sites More sharing options...
revraz Posted November 8, 2007 Share Posted November 8, 2007 Most Hosts allow you to edit your PHP.INI that they provide for you already, so there really is no need to create your own. Thanks guys! So you think the best is just to delete my own php.ini file? A friend told me that when you have includes its best to create this file to show the server where the includes are otherwise it sometimes can't find them. Is that correct or would it still find them without me adding my own php.ini file? Quote Link to comment 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.