problem with the function imap_open ()

I have the following error on a blank application: Call to undefined function imap_open ()
Use in production environment compartment served WAMP
IMAP functionality is enabled in the php.ini

If someone gives me a clue … thanks in advance

First of all check if the call is supported if you create a simple ‘hello world’ like php program. In general there are several php.ini files around (2 in the wamp environment afaik) that you need to be sure to have changed the right one. Second, in Scriptcase development another php is used, so does it work in dev but not on prod?

It does not work in the production environment. In the application and use other functions such as http_build_query or utf8_decode, just to name a few.

Sorry for my rudimentary English

Then you need to create a small app to see if your php supports the imap statements and start from there.

I solved it, I had to modify the php.ini SC folder. In my case: C: \ Program Files (x86) \ NetMake \ v8 \ components \ php.

I now another problem, global variables declared in a function do not work … could it be?

It depends where you are using the functions. Keep in mind that the declaration needs to be present before use and I don’t expect that that would be the case with a function. Personally I always declare my globals in the main application so that I don’t have the problem of obscure error messages of not knowing the variable.

Already solved it. The problem was accessed as variables:

function getmsg($mbox,$mid) {

global $htmlmsg,$plainmsg,$charset,$attachments;

The he used like this:

$htmlmsg = $plainmsg = $charset = '';
$attachments = array();

When it should be like this:

 [htmlmsg]=[plainmsg]=[charset] = '';
 [attachments] = array();

Thank you for responding forever!

Can you please advice what modification you did, i am also facing the same issue

Fatal error: Uncaught Error: Call to undefined function imap_open()