Announcement

Collapse
No announcement yet.

problem with the function imap_open ()

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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?
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Originally posted by aducom View Post
      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

      Comment


      • #4
        Then you need to create a small app to see if your php supports the imap statements and start from there.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Originally posted by aducom View Post
          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?

          Comment


          • #6
            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.
            Albert Drent
            aducom software netherlands
            scriptcase partner, reseller, support and (turn-key) development
            www.scriptcase.eu / www.scriptcase.nl

            Comment


            • #7
              Originally posted by aducom View Post
              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!
              Greetings!

              Comment

              Working...
              X