Announcement

Collapse
No announcement yet.

understanding actinic_main.php behaviours

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

    understanding actinic_main.php behaviours

    I'm aware that this file is to include php, but what does actinic do when its not there, or broken?

    If i make a mistake or syntax error in this file, actinic wont open. It crashes with some error. I'd like very much for you to trap this error, and display it. At the very least. Its a nightmare extending Actinic, if i have this to worry about. I'm quite happy to develop tools and addons, but I need more help when some bungles. Please, in the next V9 patch, trap the error and pop a message box.

    In XP, this file behaves as it should, mostly, but in vista, i have a terrible time editing it. the uac (on or off) causes havoc. Caching a copy of the file in some mad folder. changes dont stick and the file wont recognise. Not only that, but if i delete the file, actninc starts fine. leading me to believe that there is something seriously awry.

    Watching the process of actinic, i notice that it also attempts to load a file called: 'siteincludes.php'. Is this a site specific includes? is this documented somewhere? I couldnt find it.

    So, if someone with some knowledge of how this file behaves could drop me a line, telephone, forum or otherwise, then i'd be able to develop and enhance actinic MUCH faster.

    thanks.

    #2
    There's something in V9's Change Log about siteincludes.php.

    Personally, I use

    include_once 'mybitsofcode.php';

    in my layout code and the file mybitsofcode.php can then be in the individual Site folder.

    UPDATE:

    The V9 Advanced Guide doesn't mention siteincludes.php but has a section Creating PHP Functions that recommends using include_once.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi,

      I've passed your comments to the development team. I'll get back as soon as I get something from them.
      ********************
      Tracey
      SellerDeck

      Comment


        #4
        norm:
        thanks for that tip, it might help

        traceyg:
        thanks, any input would be appreciated.

        Comment


          #5
          Hi Gabriel,

          What version of 8 are you using? The release notes for 8.5.2 show:

          PHP Site specific library

          Designers may now add there own site wide PHP functions to be used in Actinic. If required, the file needs to be named ‘siteincludes.php’ and stored in the Site folder. This file, if present, will be included in the site snapshot.

          If PHP encounters errors while parsing either actinic_main.php or siteincludes.php then the error will be written to PHPErrors.log in the sites folder.
          .

          Does this help?
          ********************
          Tracey
          SellerDeck

          Comment


            #6
            Boom! It works.

            Error log is reasonably descriptive as well. A selectable PHP error log popup akin to the Coding error window would be nice though.

            written to PHPErrors.log in the sites folder
            For the record, I get phperror.log in my site folder, not PHPErrors.log in sites folder.
            Fergus Weir - teclan ltd
            Ecommerce Digital Marketing

            SellerDeck Responsive Web Design

            SellerDeck Hosting
            SellerDeck Digital Marketing

            Comment


              #7
              also, Tracey, can you confirm, changes to the siteincludes.php are only picked up after closing and reopening Actinic? I assume, therefore, that the contents are held in memory when Actinic loads?
              Fergus Weir - teclan ltd
              Ecommerce Digital Marketing

              SellerDeck Responsive Web Design

              SellerDeck Hosting
              SellerDeck Digital Marketing

              Comment


                #8
                I'll just check with the developers for you Fergus (I'm afraid that I don't know anything about php at all )
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  thats right ferg. it loads as actinic loads, compiles and then keeps in memory.

                  you have to restart actinic to get new contents. sadly.

                  but i had no idea about that error log. omg, its so useful.

                  Comment


                    #10
                    One for the wishlist

                    Just in case it got lost in the above

                    Originally posted by fergusw
                    A flagable On/Off PHP error log popup akin to the Actinic Coding error window would be nice
                    Fergus Weir - teclan ltd
                    Ecommerce Digital Marketing

                    SellerDeck Responsive Web Design

                    SellerDeck Hosting
                    SellerDeck Digital Marketing

                    Comment


                      #11
                      Originally Posted by fergusw
                      A flagable On/Off PHP error log popup akin to the Actinic Coding error window would be nice
                      Noted and passed to the development team.
                      ********************
                      Tracey
                      SellerDeck

                      Comment


                        #12
                        Originally posted by NormanRouxel
                        include_once 'mybitsofcode.php';
                        well, under vista, this happens:
                        Code:
                        Warning: Unknown(mybitsofcode.php): failed to open stream: No such file or directory in main on line 1 Warning: (null)(): Failed opening '../mybitsofcode.php' for inclusion (include_path='.;c:\php4\pear') in main on line 1
                        so, how do you get this to work?

                        i'm calling shenanigans.

                        for me, php includes under vista are broken.

                        Comment


                          #13
                          Originally posted by gabrielcrowe
                          (include_path='.;c:\php4\pear') in main on line 1
                          Seems a bit weird - c:\php4\pear ? Actinic and Vista not playing happily again?

                          Gabriel, do you have c:\php4\pear on said machine?
                          Fergus Weir - teclan ltd
                          Ecommerce Digital Marketing

                          SellerDeck Responsive Web Design

                          SellerDeck Hosting
                          SellerDeck Digital Marketing

                          Comment


                            #14
                            Originally posted by fergusw
                            Seems a bit weird - c:\php4\pear ? Actinic and Vista not playing happily again?

                            Gabriel, do you have c:\php4\pear on said machine?
                            update:
                            putting the included file in the path described fixed this temporarily. I had to create this folder, it is a hard coded default path for php4, included in v8.
                            c:/php4/pear/myinclude.php

                            wierdness.

                            but id still like it to work from the site1 folder.

                            Comment


                              #15
                              can you confirm, changes to the siteincludes.php are only picked up after closing and reopening Actinic?
                              That's right - or after switching sites.
                              ********************
                              Tracey
                              SellerDeck

                              Comment

                              Working...
                              X