Menu

Script returns no result

2007-04-10
2013-04-22
  • Nobody/Anonymous

    Hi,

    I'm using php4Delphi 6.2.2 with BDS 2006 and PHP 5.2.0.  Everything compiles fine and seems to be working, but I just don't receive any result after executing a piece of PHP code.  The result string is empty. 

    Any ideas of what I'm doing wrong?

    Cesar Cepeda.

     
    • Nobody/Anonymous

      It seems that the problem arises only when calling TpsvCustomPHP.RunCode and not when calling TpsvCustomPHP.Execute(File). The pipe is opened correctly and the code is written to it, I don't know if there is something wrong with the zend_file_handle initializacion when using the virtual file created by RunCode.

      I hope this helps to pinpoint the problem.

      Thanks.

      Cesar Cepeda

       
    • Serhiy Perevoznyk

      There are few things can be wrong.
      1. Check you php.ini file:
      short_open_tag = On
      By default it's "off"

      2. How long is your script?
      If you want to execute very long script, you have to increase the pipe buffer size:
      in CreateVirtualFile function at the following line:
      if pipe(@_handles, Length(ACode) + 4096, 0) = -1 then
      replace 4096 by bigger number

      3. Check UseDelimiters = true or add <?..?> delimiters to your code manually.

       
    • Serhiy Perevoznyk

       

Log in to post a comment.