Jump to content

Php Filter Help


jbsmith

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.

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().

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...