Page 1 of 1

Custom PHP Form No Longer Working

Posted: Sat Sep 29, 2012 11:41 pm
by InfraGuy
Hi

I am having some difficulties with a custom PHP form and trying to troubleshoot what has gone wrong. The form was working with version 1.10.3 of CMSMS but no longer works with version 1.11.2 of CMSMS. The hoster's platform consists of CMSMS 1.11.2, Apache 1.3.42, PHP 4.4.9 and MySQL 5.0.95. This has also been tested unsuccessfully on a platform of CMSMS 1.11.2, Apache 2.2.22 , PHP 5.3.17 and MySQL 5.1.56.

This form has not needed to be used since March 2012. At that time, the CMSMS was version 1.10.3. Since then CMSMS has been upgraded incrementally to 1.11.2 and now that I need to use the form it is no longer working. I am assuming that something has changed with the tags or how custom PHP is rendered, but have not been able to figure out what has changed.

The form itself presents a user with a drop down selector for the user to select a date. Once a date is selected, an XML file is read to find the corresponding date, and the associated XML attributes are used to populate the form fields. The user than enters information to a few fields, selects some radio buttons and submits the form.

The PHP code (a form and processing page) was written and tested outside of CMSMS (e.g. hosted on a Apache/PHP platform) and still works still fine When the CMSMS version (with the <?php and ?> tags replaced with {php} and {/php} ) is run, the selection displays all possible fields as opposed to just the dropdown selector.

I have included a zip file with the following files to assist anyone willing to take a look (I can grant access to the public website if needed):

1. clubnom-form.php, clubnom-process.php, clubnights.xml - the original files that can be placed on an Apache/PHP server to view the functionality (the XML file to be placed in the same directory as the PHP files).

2. clubnnom-form, clubnom-process, clubnights.xml - the CMSMS version of the above files, with the <?php and ?> tags replaced with {php} and {/php} and any javascript being encapsulated with the {literal} {/literal} tags which can be added to CMSMS pages (the XML file to be placed in the root of the CMSMS installation).

Any suggestions on troubleshooting or advice with what to correct would be greatly appreciated.


Regards

InfraMan

Re: Custom PHP Form No Longer Working

Posted: Sun Sep 30, 2012 7:28 am
by InfraGuy
After searching and reading changelog's I have realised that 'use_smarty_php_tags' has been deprecated as of CMSMS 1.11. That said, I am now trying to use UDT to provide the functionality of the original form.

Due to the mixture of blocks of PHP code and the use of embedded PHP snippets within HTML, I am finding it difficult in implementing to form as a UDT. Any suggestions/advice would be greatly appreciated.

InfraGuy