keaauBoy Posted September 29, 2015 Share Posted September 29, 2015 I am attempting to write PHP to send form data to email. I completed a Lynda.com tutorial "Introducing PHP" by David Powers When I test the Pges on my machine with xampp installed, everything works. I have no mail function on my msachine so I uploaded to a folder on my website to test. I get the above error 'Fatal error: Call to undefined function: filter_input()' and the email format validation does not function. Can someone help me?formTest.phpmail_process.php Quote Link to comment Share on other sites More sharing options...
requinix Posted September 29, 2015 Share Posted September 29, 2015 What version of PHP are you running on the site (echo PHP_VERSION;)? What does phpinfo output? Quote Link to comment Share on other sites More sharing options...
keaauBoy Posted September 29, 2015 Author Share Posted September 29, 2015 PHP 5.5.28 I'm not sure how to access phpinfo output Quote Link to comment Share on other sites More sharing options...
hansford Posted September 29, 2015 Share Posted September 29, 2015 What requinix is referring to is one of these 2 functions as either one will return the php version you are using. echo phpversion(); echo phpinfo(); Quote Link to comment Share on other sites More sharing options...
keaauBoy Posted September 29, 2015 Author Share Posted September 29, 2015 Used <?php echo phpinfo();?> got a very large document with all kinds of info Quote Link to comment Share on other sites More sharing options...
requinix Posted September 29, 2015 Share Posted September 29, 2015 Yeah, there's a lot. Â 1. Near the top is probably a "Configure Command". What is it? 2. Is there a section named "filter"? If so, what does it include? Quote Link to comment Share on other sites More sharing options...
keaauBoy Posted September 29, 2015 Author Share Posted September 29, 2015 Yes, see attached JPGs Quote Link to comment Share on other sites More sharing options...
scootstah Posted September 29, 2015 Share Posted September 29, 2015 Who is your webhost? You're probably going to have to bring this up in a support request. Quote Link to comment Share on other sites More sharing options...
Psycho Posted September 29, 2015 Share Posted September 29, 2015 According to this post, for what appears to be the same issue, the OP found that his host supported PHP5 but parsed php files using PHP4 by default. He solved the issue by naming his files with a .php5 extension. I know some hosts also allow you to set the default parsing method. Quote Link to comment Share on other sites More sharing options...
scootstah Posted September 29, 2015 Share Posted September 29, 2015 I would hope to hell there is not still webhosts running PHP4. But I know I'm probably wrong... Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted September 29, 2015 Share Posted September 29, 2015 the OP's phpinfo() output lists a Windows 7 Pro operating system, which is probably his development system, not the web host where he is having the error at. Â so, what that output from a phpinfo() statement on your web hosting or was that on your localhost xampp system? Quote Link to comment Share on other sites More sharing options...
keaauBoy Posted September 29, 2015 Author Share Posted September 29, 2015 The info I gave is the output from my xampp on my machine. He is the test from my ISP Looks like you are right Siteserver is running PHP 4.4.8. What know? Quote Link to comment Share on other sites More sharing options...
scootstah Posted September 29, 2015 Share Posted September 29, 2015 Who is your web host? Â Refer to the post that Psycho referenced to see if that applies to you as well. Quote Link to comment Share on other sites More sharing options...
keaauBoy Posted September 30, 2015 Author Share Posted September 30, 2015 My web host is Siteserver. I have contacted them about the fact that PHP 5 was released in 2004 and they are still using PHP4. I might be looking for a new ISP Quote Link to comment Share on other sites More sharing options...
keaauBoy Posted September 30, 2015 Author Share Posted September 30, 2015 I was abble to upload my php pages to an associates server who supports php 5. Everything worked perfectly including the email format validation. However when I clicked the submit button the page returned to the intitial format with blank fields in the form. When I test the pages on my xampp server on my machine and hit submit it brings up the thanks page. I know I don't have server side 'mail' capabilities but the page has code that should at least give me an error message 'Sorry your mail could not be sent.' I am not sure of the code to authenticate...... authenticate = '-fwalterhughes@hawaii.rr.com';. All who helped with the last problem with my web host, thank you. Could you help me with this final problem?formTest.phpmail_process.phpthanks.php 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.