Categories > TinyButStrong general >

Debugging my php installation

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2005-07-15
Time: 15:41

Debugging my php installation

I am having the weirdest problem I have seen at my work with a program not behaving...

For some reason I decided to remove my PHP installation since I was using the cgi version and the actual server I design for uses the isapi module version (and I needed some modules that the server uses) Anyway, after I removed the PHP installation I started setting up the isapi module which basically means copying some files and making very little changes so IIS finds it.

Fact of the matter is that now my last project won't work on my computer anymore where the same files on the server still work perfectly. And this is ofcourse not acceptable; I cannot develop in this way because the only server I can work on is the live one.

I have been having several different messages and currently I am getting one from tbs. I am wondering if someone can explain when this error would occur. This might help me find the problem on my pc...

Part of the template going bad:
[var.zettings.settings.stylesheet_print.value]

The error tbs generates:
TinyButStrong Error (Object or Array value expected): Can't merge [var.zettings.settings.stylesheet_print.value] because the item before 'stylesheet_print' is neither an object nor an array. Its type is string. This message can be cancelled using parameter 'noerr'.

The print_r output of $zettings:
cSettings Object
(
  [DB] => db_sql_co Object
    (
      ...
    )

  [DB_table] => ew1_settings
  [DB_key] => settings_id
  [DB_value] => settings_value
  [DB_description] => settings_description
  [settings] => Array
    (
      [error_page_not_available_name] => Array
        (
          [key] => error_page_not_available_name
          [value] => errorpage
          [description] => Define ... of pages.
        )

      ...
     
      [stylesheet_print] => Array
        (
          [key] => stylesheet_print
          [value] => print.css
          [description] =>
        )

    )

)

So for as far as I can see I am doing the right thing, and this is a exact copy of the working website on the actual server.

Hopefully anybody can help me find out why this error appears. Knowing why tbs displays this message helps as well (and is the reason I post in this forum)...
By: Skrol29
Date: 2005-07-15
Time: 15:55

Re: Debugging my php installation

Hi RwD,

You have to check the centents of the variable when TBS merges it.
Because the contents may have changed before of after the merge.

Var fields are merged at the Show() method if they are not embedded.
Otherwise they are merged when the parent field is merged (more exactly when the parent's embedding parameter is processed).

For example, you can first put the Show() method in comment, and code "exit;" instead in order to check if it's actually Show() that merges this Var field. If it's so, then do a "print_r" output just before the Show() method, and another one just after in order to check the content at this time. This is a good check.

I hope this makes sens to you.
By: Pirjo Posio
Date: 2005-07-16
Time: 10:46

Re: Debugging my php installation

Hi RwD,
I had last year problems with installing php on my other Windows pc. Finally the only thing helping was to copy the php.ini from my first pc to the new one.
Do other (non-TBS) php-programs work? Do new TBS-programs work?