Skip navigation
Currently Being Moderated

ADDT and PHP 5.3.x project

Oct 31, 2009 9:24 AM

Hello all, as 'abandon' user of ADDT... i hope we can together make ADDT compatible for future release of PHP.

Currently PHP 5.3 our main 'enemy'.

 

The 'patch' that i summarized far from other thread:

1. function split() found in:

- includes\common\lib\file\KT_File.class.php
- includes\common\lib\file_upload\KT_FileUpload.class.php
- includes\common\lib\folder\KT_Folder.class.php
- includes\common\lib\image\KT_Image.class.php

occurences found: one instance per file

possible fix: try replacing with preg_split()

 

2. function mysql_escape_string() found in:

- includes\common\lib\db\KT_FakeRecordset.class.php

occurences found: three instances

possible fix: try replacing with mysql_real_escape_string() but better to use function_exists so it still keep compatible with previous php version, for example :

if(function_exists(”mysql_real_escape_string”)){

$insert_values .= “‘” . mysql_real_escape_string($value) . “‘, “;

}else{

$insert_values .= “‘” . mysql_escape_string($value) . “‘, “;

}

 

Other than that a handful of other ADDT files make an ini_get() – call to some deprecated PHP.INI functions such as safe_mode — but I´m not sure if this would trigger errors, because ADDT just tries to retrieve the related INI values and doesn´t atempt to change them.

 

3. find "= &new"  and replace with "= new";

4.  Look inside includes/tng/tNG_insert.class.php, tNG_update.class.php, tNG_delete.class.php and tNG_custom.class.php and replace

parent::tNG_fields($connection); with parent::tNG($connection);

 

 

I've no idea about solution no.4, since parent:: usually(as far as i know) use for direct access a method on parent's class... but the solution works for me

 

As We're talking about live project here (i'm serious about this)  without legitimate technical support.  I have an idea if we can make a group and hire an expert programmer to audit ADDT's includes folder so it will compatible with PHP 5.3.x.. But, does it mean we break our license policy with adobe ?

 

========================

Hope this thread will alive and so does our ADDT's project

========================

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Nov 1, 2009 7:06 AM   in reply to viktor.iwan

    Hi Viktor,

     

    As We're talking about live project here (i'm serious about this)  without legitimate technical support.  I have an idea if we can make a group and hire an expert programmer to audit ADDT's includes folder so it will compatible with PHP 5.3.x.. But, does it mean we break our license policy with adobe ?

    The license, which I personally consider excessively restrictive, says:

     

    -------------------

    If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior written permission of Adobe

    ------------------

     

    The way I understand it, modification and distribution is allowed for those who have received the "includes" files from Adobe -- but the hired PHP developer would, unless he/she were someone who has purchased and installed the extension himself/herself, actually not be receiving them from Adobe, but from a customer and hence would not be allowed to modify and distribute them.

     

    Furthermore this license attempts to control the "use" aspect, means that - again, the way I see it - would require us users to ask Adobe for permission in case we would like to use the modified files which the PHP developer has handed over to us.

     

    Cheers,

    Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 2, 2009 8:14 PM   in reply to viktor.iwan

    Hi Viktor,

    I would be interested...

    Meredith

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 4, 2009 4:02 PM   in reply to viktor.iwan

    Hi,

     

    I think the idea of a petition to bring ADDT back in with DW and make it PHP 5 compatible are very good ideas to me!

     

    I think it's a mistake to let ADDT go.

     

    Thanks,

     

    -The Hyperbola

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 5, 2009 2:19 AM   in reply to viktor.iwan

    Hi,

     

    Count me in. I've many sites build on ADDT and after a month investigation not found a good replacement yet. I like all your ideas. Concerning the license, there is a legal solution. Let an PHP expert examine the files and let him or her write a report with all the changes needed to be made. He is not going to use the files and the report can be published online. All interested users of ADDT can with help of the report modify their own ADDT files.

     

    That should legaly not give any problems.

     

    I hope in some way I can contribute in keeping/upgrading/developping ADDT, because its MORE than the right tool for designers/deveoppers in one person like me.

     

    Hans

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 5, 2009 6:44 AM   in reply to viktor.iwan

    I too, have numerous websites built on ADDT, and do not have the programming knowledge to redo them without a tool such as ADDT.

    I support the effort to make ADDT useful for sometime into the future.

    Denny

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2009 6:52 AM   in reply to Dennis48755

    I think that we lost time; Adobe doesn't consider/read the user/customer request.

     

    I hope that next CS5 will have a new framework for PHP website developement (but rumors not indicate improvements in the server behaviors).

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 11, 2009 12:33 AM   in reply to viktor.iwan

    Adobe to layoff 680 full-time employees, 9% of workforce.

     

    Do you really think that Adobe has time for ADDT (or Dreamweaver)?

     

    I would not be surprised if the next version (dreamweaver cs5) would be the last; most of its investments are for the Rich Internet Application sector (Flash and Flex technology).

     

    The beta 1 of dreamweaver cs5 not have improvements respect cs4, only spry 2.0 widget and html5 support.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 24, 2009 8:14 PM   in reply to viktor.iwan

    Maybe we can develop an application that modifies the files automagically, open source the application and thus giving a few more months/years? of life .


    The PHP problems aren't too severe. AFAIK.

     

    If the application is used by legal owners of the code, there shouldnt  be much of a legal issue. And it seems that adobe does not care much about addt anymore.

     

    I Think we can develop this without much effort, however , how long will it be useful, we might be stuck with DW CS4 until there is a decent replacement.

     

    My 2 Cents

     

    Rodrigo O
    XNet

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 3, 2009 4:15 PM   in reply to viktor.iwan

    Hello Everyone!


    As an advanced user of ADDT since long time ago, i think there is no one can do that job "Re-Programming" ADDT better than Adobe itself, they made it and they know better how to make it compatible with PHP 5.3.x.



    Well, i bet sure that they know how important and "easiest" ways of using ADDT by most (Beginners + Intermediates + Advanced) users! So i think instead of hiring a programmer we can:


    1- Write a review and send it to adobe for consideration.

    2- Pay them if required to continue developing ADDT.

    3- Try to look for an alternative instead of wasting our time begging them.


    __
    Best Regards
    Waleed Barakat
    Developer-Online Creator and programmer

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2009 7:55 AM   in reply to viktor.iwan

    Just wanted to add my vote. Adobe's decision to abandon ADDT, whithout real comment is very disappointing. It's going to cost many of us a great deal to work around them. They should sell the extensions to someone who is interested. I've paid for all the Interakt extentions and still use many of them. I'd pay again.

     

    I have been in contact with  my site host and they will have an option to run php 4.9 if I choose but I would like the security enhancments 5.3 shold bring. The other option, which is unlikly is that 5.3 not depreciate those functions.

     

    Nick

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2009 3:37 PM   in reply to viktor.iwan

    Hi looking at the PHP 5.3 documentation there are som Backward Incompatible Changes: I'm uncertain if it will actually affect any of the code but this list may give a clue to somebody with knowledge of code:

     

    The array functions natsort(), natcasesort(), usort(), uasort(), uksort(), array_flip(), and array_unique() no longer accept objects passed as arguments. To apply these functions to an object, cast the object to an array first.

     

    array_unique()
    ktml4_functions.inc.php -
        line 268: $allowed_tags_list = array_unique($allowed_tags_list);
    line 293: $denied_tags_list = array_unique($denied_tags_list);

     

    array_flip()
    XML_Export.class.php
    line 75: $trans = array_flip(get_html_translation_table(HTML_ENTITIES));

     

    uasort()
        tNG.class.php
    line 212: uasort($this->triggers[$triggerType],array('tNG','compareTriggers'));

     

    natsort()
        ktml4_mspl_folder.class.php
            line 312: natsort($arrTmp);

     

        NAV_AZ.class.php
            line 69: natsort($arr);

     

    NAV_Category.class.php
    line 122: natsort($arr);

     

    ????
    The behaviour of functions with by-reference parameters called by value has changed. Where previously the function would accept the by-value argument, a fatal error is now emitted. Any previous code passing constants or literals to functions expecting references, will need altering to assign the value to a variable before calling the function.
    ????

     

    clearstatcache
    KT_config.inc.php
    line 1732: @clearstatcache();

     

    KT_Folder.class.php
    line 53: clearstatcache();

     

    service.php
    line 3:clearstatcache();

     

    XML_Recordset.class.php
    line 97: clearstatcache();

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2010 6:05 AM   in reply to viktor.iwan

    I think too much emphasis is going into PHP 5.3. The real problem is going to be PHP 6, and 5.3 appears to be nothing more than a "prepare yourself now for what's to come" release. If you think about it - they are still releasing updates for 5.2.x, for a reason.

     

    Luckily I run my own servers, and can retain a copy of 5.2.9 (.10 and up have their own problems with ADDT) indefinitely but I do have a couple of sites that live on outside servers. I have communicated with those hosts, and they have NO INTENTION of going to 5.3 since so many problems are introduced with it. That's not to say that all hosts are going to wait, but most are operated by people that really don't want the "support calls" to start flooding in.

     

    The real thought is to audit and make ADDT work with PHP6, not just 5.3. I'm with many, that it just isn't worth the fight anymore, and time to move on - but I still might run a full featured site on a 5.3 test server to see what's going on. I suspect the PHP 6 change release is so great that it is one of the major reasons Adobe decided to dump it now, rather than later. ADDT likely would need a massive facelift to keep it alive. Quite simply, by not maintaining and upgrading the software over the past few years - it is now just too big of a job to tackle.

     

    Any project that was backward compatable to PHP 4 is going to have these problems, as seen with Drupal and Joomla. If it was running on both platforms - it will now need an overhaul to go onto version 6. I tip my hat to the developers that said "PHP5 Only" when the majority of hosting company's still only offerred PHP4. It cost them business at the time - but who is better prepared for the future now?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2010 6:20 AM   in reply to viktor.iwan

    In reply to budeborton.

     

    Thanks for your feed-back. Interesting thoughts - I'm of the same conviction. There are no other opportunities but to move ahead. Problems will increase exponentially by sticking to ADDT.

    Personally the way forward is through FLEX, amfphp/ZENDamf causing some initial problems, but I also experienced these with early interakt implementations. Developing a reasonable back-end for customer update and then a customizable front is the actual goal.

    Regards

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2010 2:01 PM   in reply to viktor.iwan

    I've been running a custom CMS for the past 2 years, which was build on ADDT. I finally got the courage to setup a 5.3 test server just to see how it stands. Some of the ADDT features used on the CMS are as follows:

    • Includes
    • Dymanic Lists and Forms
    • Image Uploads
    • List Sorting
    • Widgets
    • Send Email
    • much, much more

     

    When I first ran the sites front end, everything was perfect. All I did was update a few of the files as recommended on these forums. That was about 15 minutes work, and voila - the display of the sites contents was great.

     

    However - when I dove into the admin area, that is where the problems started. Most of the problems were simply errors, that pinpointed where the problem was, and for the most part - the problem was already outlined on these forums, but the include file was not mentioned (eg: don't just update "tNG_insert.class.php", you also need to update "tNG_multipleInsert.class.php" and several others.

     

    NOW I AM STUCK! This is on the lists and forms. Both of these items display properly, but when I try to update a record, an error is thrown that I cannot find a fix for. This same error is appearing on Joomla and Drupal forums all over the internet, and the only solution I ever see is "wait for the 5.3 update for the program". OF COURSE, THAT IS NOT COMING FOR ADDT!

     

    Since lists and forms is the most used feature (for me anyway) of ADDT, it is rendering ADDT completely useless on PHP 5.3.

     

    THE ERROR:

    "PHP Warning: Parameter 2 to Trigger_Default_FormValidation() expected to be a reference, value given in D:\sites\pra2.ca\public_html\includes\tng\tNG.class.php on line 228"

     

    I know this has to do with the "pass by reference" deprecation, but I cannot figure out how to fix this problem. I am able to supress the warning with the @ symbol, and therefore I can continue testing. But that is just hiding the problem, not fixing it.

     

    Any suggestions would be appeciated

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2010 10:24 PM   in reply to viktor.iwan

    in reply to buberton

    have a look at this post:

    http://forums.adobe.com/message/2419029#2419029

    It helped me at lot when I was in trouble - remember to update all 4 (8 if you also need to update the multipletNG error) files

    regards

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2010 5:30 AM   in reply to glensbo

    Thanks Glensbo!

    I did have these files updated although didn't make that very clear in my post.

     

    The problem I am having is a PHP Warning in the "tNG.class.php" file when I try to insert, update or delete. The error (which is posted in a post above) is suggesting that "call_user_func_array" is expecting the 2nd param to be a reference not a value. According to the code in that file, it looks like it is a reference, so I am really stumped. I've tried everything to pass it as a reference to no avail.

     

    As I mention in the post. This is just a warning, and I can supress that with the @ symbol, and everything works as it should. But this is just hiding the error, not fixing it. Come PHP 6, it will break - I am certain of that.

     

    Here is the actual snipped of code. I have placed a comment and supressed the line that is throwing the error. This is line 221 - 231 in "tNG.class.php". At least in the copy I have.

     

        if ($runTrigger) {
         $callBackFunction = $trigger[1];
         $tempParam = array_reverse($trigger[3]);
         $tempParam[] = &$this;
         $tempParam = array_reverse($tempParam, true);
         tNG_log::log($triggerType, $callBackFunction, 'begin');
         if (is_string($callBackFunction) && function_exists($callBackFunction)) {
         @$ret = call_user_func_array($callBackFunction,$tempParam); // PHP 6 update. Error is supressed with the @ symbal   

          } else {
          die('Internal Error. Trigger "'.$callBackFunction.'" does not exist.');
         }

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2010 7:01 AM   in reply to budeborton

    For Budeborton

     

    I think I have seen a similar error trying to solve the problems. Here's what I did:

     

    Found a totally untouched and unedited tng folder -

    Then I deleted the tng folder I have edited (and forgot what I actually changed)

    Pasted the untouched and unedited tng folder

    Then I changed the 8 above mentioned tNG files and--- knock on woods---- it worked.

     

    Just tested again with PHP errors set to ON and I do not get errors

     

    Regards

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2010 7:50 AM   in reply to glensbo

    glensbo: Great advice - and something I generally will do before running to the forums.


    When I think back - this problem could come from anywhere, and may not be that file in particular. I first developed this CMS in Kollection Pro about 2 -3 years back. I ported it over to ADDT simply by updating the include files and making some minor adjustments, but quite possibly - the generated code on the "insert/update" pages is where the real problems are occurring.

     

    Rather than continuing with old code, I am going to build a page for each ADDT function just to test it. At least then it will be clean installs of everything.

     

    Overall - I think it should be relatively easy to overcome the errors. I certainly would not recommend building new sites on the ADDT platform, but at least we might be able to keep old sites alive on another generation of PHP (talking 6, not just 5.3). That should provide about 5 more years of comfort zone.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2010 11:54 AM   in reply to glensbo

    glensbo:  I just tried a clean install, and get exactly the same warning. I have narrowed it down to be part of the form "validation". If I remove validation, it works, but as soon as I add it, this warning get's triggered. Oddly enough, if I supress the warning, the validation is working fine.

     

    Aside from that issue, most features are working as well as can be expected. Back to the drawing board.

     

    EDIT: I found the problem, but I guess only time will tell if my solution creates more problems.

     

    includes > tng > triggers > tNG_defTrigg.inc.php

    Line 60 read: "function Trigger_Default_FormValidation(&$tNG, &$uniVal)"

    Changed that to: "function Trigger_Default_FormValidation($tNG, $uniVal)"

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 1:10 AM   in reply to viktor.iwan

    For Victor, Budeborten and others

    Interesting proposal - I have looked a lot at the code, and upgrade to 5.3 may seem OK but look closely to the start of some of the code (find and replace?) here you will find the following if statement:

     

    if (PHP_VERSION < 6) {

        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

      }

     

    So apart from the 5.2 to 5.3 changes we look at some additional changes (as budeborton initially pointed out) when we arrive at PHP 6.0.

     

    What we all seem to lack here is the deep knowledge of PHP coding and some dedicated PHP-coders wanting to participate at forum level.

     

    I would like to participate actively in any legal upgrade of ADDT because it seems to be a solid framework, on the other hand I don't sit at my hands as the evolution of other CMS solutions are evolving very fast.

     

    Another issue with ADDT is the lack of future support for Internet Explorer (in some/or one of the js files) there are also some limitations that need changes.

     

    End of the day security may be compromised and then the **** really hits the fan.

    Regards
     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 8:14 AM   in reply to glensbo

    Glenbo: You said "Another issue with ADDT is the lack of future support for Internet Explorer (in some/or one of the js files) there are also some limitations that need changes."

     

    That is going to be a very big problem. AJAX has really pushed the JavaScript development hard (in a good way) and not just IE, but Safari, Firefox and others are moving ahead at an alarming rate. For instance, anyone that owned the AJAX ToolBox from Interakt knows darn well it failed within a year! Trying getting many of those features to work on Safari - won't happen!

     

    Luckily, most JS files are used in the displays, more than the functions.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 15, 2010 8:35 AM   in reply to viktor.iwan

    This is interesting, but I'm not sure what the benifit would be as an end result. Prolonging ADDTs death could make us lazy in moving on

     

    I'm not intested in making sure ADDT will work as a developmental tool at this point. My only concern is making sure I can jump through the 5.3 hurdle with my existing sites. If my clients sites are getting old (2 yrs +) then I can convince them of a re-developed version. But I have several sites built in the past two years, that could potentially fail, and I feel obligated to keep those working.

     

    Most Hosting Company's are NOT going to dive into version 6, without providing a version 5 alternative. Proof of this already exists, as most hosts still provide a PHP 4 alternative for those that need it. My concern lays with the sites I have running on existing PHP 5 hosts - that are going to upgrade to 5.3.

     

    I'm very confident that I have found and fixed most of my problems with tips already found in these forums. That doesn't mean "All of ADDT" works, but the features I use are all working at this time. I still even use KTML as a wysiwyg editor, and it's holding strong in 5.3 tests.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2010 12:22 PM   in reply to Günter Schenk

    Gunter do you have a bundled includes folder with the changes already made? And also do you have a way to implement the changes so that the new code can be bundled into the toolbox libraries? This way when creating a new script/software that you do not have to go back in and manually update the code.

     

    Anyhow, have another question and this regards to my current setup. I am running php5.29, but since my hosting companies new firewall setup, the email scripts are failing. It took a long time to figure this out, finally at least I know the root problem. Other personally written email/SMTP scripts work flawlessly though even the same login creditenials, so the problems I am incurring is because the email script in ADDT is not properly authenticating the SMTP. Any help/explanations would be appreciated.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2010 12:41 PM   in reply to EverWebby.com

    Re: Your mail problem - have you tried this:

    email.jpg

    regards

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2010 12:44 PM   in reply to glensbo

    Thanks for responding so quickly!
    Yes, I did try that. That modifies the config file inside the tng folder. So yeah I got that one under wraps. 

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2010 1:04 PM   in reply to EverWebby.com

    I imagine that it did not solve your problem? I experimented with Tellmatic the other day, and did my ususal trial and error but in wain. So from time to time there is a little error in the way you are trying to set up the connection that causes the error. And you just cant see it. the code an post it, fresh eyes may be sharper? Anonymy(encrypt?) the code and lets have a look

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2010 1:27 PM   in reply to glensbo

    Thanks for responding so quickly!
    Yes, I did try that. That modifies the config file inside the tng folder. So yeah I got that one under wraps.

     

     

    Followup:
    I am laughing here... Its fixed. It wasnt exactly that but by going through that process it it reminded me why proper commenting of code is so important.

     

    Thanks 

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2010 9:23 PM   in reply to viktor.iwan

    viktor.iwan have you had any interest with this?  Where are things at? Any solutions yet?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2010 5:40 PM   in reply to viktor.iwan

    i would also be interested. using mx since a long time and still didn't find anything like it to switch, even i wish some competitor would come out with something doing the same or better job.probably found one thing on MAC but not windows.

     

    will watch this forum, thanks for the help posted here so far.

     

    patrick

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2010 5:56 AM   in reply to Patrick_N

    I was very very satisfied one I finally figured a lot out with ADDT. I also build a lot of sites with update-pages

    in the last 2 years. I am not a PHP programmer for that it was perfect solution. now I did the changes and it workes in 5.3. so far.. but I got "scared" about all the other sites I have and what will happen in future.

    So I am very interested in ADDT moves on.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 13, 2010 8:32 AM   in reply to viktor.iwan

    Sighn the petition for preserving ADDT here:

    http://forums.adobe.com/message/2589081

     

    I'm also very interested for addopting of ADDT for future releases of PHP, Dreamweaver, Mysql, Apache etc,...

     

    I will post all hacks here. Let's make ADDT compatible with CS5.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 13, 2010 8:58 AM   in reply to viktor.iwan

    viktor.iwan where is this project on www.getafreelancer.com?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2010 3:32 AM   in reply to viktor.iwan

    That good project ,Thanks for the useful information!

     
    |
    Mark as:
  • Currently Being Moderated
    May 12, 2010 11:41 AM   in reply to viktor.iwan

    I absolutely support you guys.  We need some publicity!!!

     

    Adobe is just ignoring us as far as I can see.

     

    There is no honor.  They don't care about us small fry.

     

    If I find another solution ... I'll post it here.

     
    |
    Mark as:
1 2 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points