I want to collect country name of an user who logined to my site. So i used
geoip_country_name_by_name() php function for this purpose.
But i got a fatal error as :
Fatal error: Call to undefined function geoip_country_name_by_name()
How can i avoid this error ?
Is there any other method to get country name using php?
Can someone help me please?
Sounds like the extension is not installed on your computer. Check out this link, it is a PECL extension.
http://www.php.net/manual/en/geoip.setup.php
you need the PECL extension, have a look here http://www.php.net/manual/en/geoip.installation.php
Related
Fatal error: Call to undefined method Exception::getClass()
Simply! You are calling a function which is not available
I assume it's OpenCart error. It might be seen after new extension is added or after OC version update as they recently changed some file paths.
The URL probably looks like:
http://example.com/index.php?route=exampleA/exampleB/exampleC
You need to correct the route. Start adding extension in front. It works in some cases.
The updated URL would be:
http://example.com/index.php?route=extension/exampleA/exampleB/exampleC
If that works fine, you need to correct path in your extension source. If not keep searching in documentation.
If you work with cart.php it was moved from system/library/cart.php to system/library/cart/cart.php together with some other files. Good luck and try to give us more details in the future.
When i code phalcon with phpstorm i have one particular error i cannot figure out how to resolve. I like to see the green check at the top of each page to indicate there are no issues but this error is preventing the green checkmark shown.
So this is what causes the error:
$this->persistent->parameters = null;
How can i alter that code to prevent the PHP Storm error:
Field accessed via magic method
I know its a bit picky but would love to solve this
Use #property PhpDoc construction. Example:
It's also gives autocomplete to magic properties. Always use all available inspections.
Uncheck "Notify about access to a field via magic method".
You can find this setting under Project Settings -> Inspections -> PHP -> Undefined -> Undefined field.
You can try to download the framework code from the devtoolos on Github and Include it in PHP Storm. You can either add it as library dependency or simple paste it in the file explorer of your project.
https://github.com/phalcon/phalcon-devtools/tree/master/ide/2.0.7/Phalcon
It should have all the required PHP Doc
I have a script that is encoded with IONCUBE 8.3.
And now , I have a Bad problem that I can't solve it.
the version of Loader is 4.6 on server (its lastest version)
But I see this error :
Fatal error: Call to undefined function [obfuscated]() in .... .
I have already obfuscated all the functions and classes and I can't let them unobfuscated !
So what should I do to solve this ?
I tried to solve it by cheking all function and setting on server .
But they are ok
Assuming that you have encoded the files yourself and that you have the source, a first step would be to disable line number obfuscation so that you can find the location of the failed function call. From that you can look at the source code and identify the function that cannot be found. It may be, for example, that the code is calling a function with a name that has not been obfuscated, and an exclusion list could then be used so as not to obfuscate calls to that particular function.
I am trying to implement an store locator using php and mysql and google maps
I have gone through this article "https://developers.google.com/maps/articles/phpsqlajax_v3 "
it says "Check your configuration or try initializing a domxml_new_doc() to determine if your server's PHP has dom_xml functionality on."
But apparantly mine is not on because it is giving me this error :
"Fatal error: Call to undefined function domxml_new_doc() in C:\wamp\www\StoreLocator\phpsqlajax_genxml.php on line 5"
I am using php 5, and I am not sure how I can turn it on.
Please help me with your opinions.
This question might help answer your problems.
Are you sure you want to go down the XML route and not the JSON one?
I'm getting the following using the PHP client on my server (connecting via FBML). I've included the appropriate php files (facebook etc..)
Fatal error:
Call to undefined method FacebookRestClient::feed_publishUserAction()
in ..../index.php on line 50
I'm trying to use the example given.
Any ideas?
You might want to take a quick browse/grep through your Facebook API files (facebookapi_php5_restlib.php) and make sure that the feed_publishUserAction() method exists. Perhaps you're using an older version of the API library?
OMG I found the answer
Because the facebookapi_php5_restlib.php that facebook.com provided you is a piece of outdated shit
i.e. you won't be able to find the word feed_publishUserAction in the facebookapi_php5_restlib.php file
HOWEVER, the official facebook smiley demo from this facebook wiki page , contained a more completed facebookapi_php5_restlib.php , along with the feed_publishUserAction function
Which finger would you like to show to the facebook developer staffs?