Jump to content

Php Filter Help


jbsmith
 Share

Recommended Posts

Hello,I am trying to run filter_var and receive the error about "Call to undefined function: filter_var". A search on google tells me I need to install some type of filter extension. I see that it is automatically installed with version 5 of php but I am running a shared hosting which is using version 4. Is this a setting in the ini file or do I need to have the host change something for me? I saw something about PECL Filter, but I am not sure that I would be able to do that since its a GoDaddy shared hosting.Thanks!

Link to comment
Share on other sites

You'll have to either use PHP5 somewhow and/or ask GoDaddy to install the filter extension. You can't simply enable extensions on a shared hosting.Alternatively, you could simply try validating your data without the filter extension, but by other means.

Edited by boen_robot
Link to comment
Share on other sites

In my godaddy hosting CP it looks like I can switch between version 4 and 5. I am just not sure if my app will work with 5 and if it doesn't if i can switch back to v4.I guess i need to install locally v5 to test. However I can't mirror godaddy exactly...

Link to comment
Share on other sites

Note that having PHP5 doesn't guarantee that the Filter extension is installed and enabled. You'll have to switch to PHP5 at some point, and see if GoDaddy has it by using phpinfo().

Edited by boen_robot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...