views:

192

answers:

2

Hi everyone,

just have a short question here. I've just installed new php extension (geoip.so) using pecl to /usr/local/zend/lib/php_extensions/ and added the extension to the php.ini. Run the code and it works just fine. But Zend Studio is giving warning of undefined geoip function. Try to add the directory path above to the include path of Zend Studio, still the warning exists. Any clue how to remove this warning? Thank you in advance!!

/Agustinus

A: 

This is driving me up the walls too.

I'm having trouble with the checkdnsrr function, which is perfectly valid in PHP 5.2 on linux, but is getting flagged because it's not available on windows.

Snooze
+1  A: 

You can add functions to Studio by putting PHP files with stub function descriptions into special directory. Find this directory in filesystem in a following way: write something like gmdate(), select the name and press F3. You will be taken to one of the prototype files. Note the directory where this file resides (shown on the top and if you hover over the tab). Now you need to create stubs for functions you are missing just like the one you're looking at. You can put them into any file, generally, but I suggest putting them into separate file - like geoip.php - and put this file into that directory. You may also want to do right-click/Show In/PHP Explorer and browse other prototype files if you need examples of how to do it right.

StasM