Announcement

Collapse
No announcement yet.

understanding actinic_main.php behaviours

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

    #16
    Originally posted by gabrielcrowe
    thats right ferg. it loads as actinic loads, compiles and then keeps in memory.

    you have to restart actinic to get new contents. sadly.
    The startup of the PHP engine is time consuming. Therefore we are starting the engine only in special cases (e.g. site change). Otherwise the rendering performance would be awfull.

    Obviously a background thread can be used to check for file changes. But the PHP files used by Actinic is not expected to change so often.

    Originally posted by gabrielcrowe
    but id still like it to work from the site1 folder.
    That's weird you can not get working on that way. Is it v9?

    When the engine is started the c++ code constructs the following PHP fragment and executes it.
    Code:
    CString sPath;
    sPath.Format("$sSitePath = \"%s\";\r\n"  
    	"chdir(\"$sSitePath\");\r\n" 
    	"if (file_exists($sSitePath . 'siteincludes.php')) include $sSitePath . 'siteincludes.php';\r\n", CTextUtils::MakeStringSafeForQuotedPerlFragment(s_sPath));
    sInit += sPath;
    The s_sPath points to the site folder therefore the CWD should also point there.
    Zoltan
    Actinic Software
    www.actinic.co.uk

    Comment


      #17
      thanks for the snippet, explains nicely.

      but sadly, in that case, it means that my issue is actually a vista one.

      nightmare.

      Comment


        #18
        Yep, it looks like the CWD is messed up on some way on Vista. Probably I will have some time this week to take a look. But even in that case I believe only v9 will contain any change on this field.

        Meanwhile a couple of things you can check.

        1) You can try to add your changes to siteincludes.php as that's what designed for these purposes.

        2) The code snippet is just a normal PHP script executed after the engine is started up. As we do not shut down the engine the variables defined there can be used by any code I believe. I.e. you can try to reuse the $sSitePath variable in your include on the same way as it is used for siteincludes.php.
        Zoltan
        Actinic Software
        www.actinic.co.uk

        Comment


          #19
          i'm revisiting this one, since i'm having the issue again, but this time on an xp system.

          i cannot make a function include, using either the actinic_main.php or the siteincludes.php, or even using norms method.

          if anyone has any explanation why this can possibly be happening, then i'd love to hear it. if i delete the files, including actinic_main.php, then actinic still starts, and there are no errors?

          this time, its in V9.

          Comment


            #20
            Originally posted by TraceyG View Post
            That's right - or after switching sites.
            Tracey Am I right in thinking Actinic Version 8 is using PHP V4 and that Version 9 has moved on to PHP V5

            Malcolm

            SellerDeck Accredited Partner,
            SellerDeck 2016 Extensions, and
            Custom Packages

            Comment


              #21
              Yes. For fuller details, simply paste the follwing into a product description

              !!<<actinic:block php="true">phpinfo();</actinic:block>>!!
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment

              Working...
              X