close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error when submitting a page

Thread began 3/21/2011 3:33 am by Daryl | Last modified 6/18/2011 10:34 pm by neo314 | 1974 views | 9 replies |

DarylBeta Tester

Error when submitting a page

I have a DA page that contains UE

When the forum is submitted a record is updated and an email sent however I get the folloewing error page in google chrome...

The website encountered an error while retrieving water_companies2_checked.php. It may be down for maintenance or configured incorrectly.

The page mentioned in the error is the same page that the form is on that was just submitted

The page should get redirected to submitted.php

So I guess there is an error when the page is submitted.

Attached Files
water_companies2_checked.zip
Sign in to reply to this post

Jason ByrnesWebAssist

we would need to know the PHP error to be able to troubleshoot.


try adding this code at line 1:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>




if this does not show the actual error on the page, you will need to look into the servers error logs to find the error. Once we know the PHP error, we can troubleshoot it.

Sign in to reply to this post

DarylBeta Tester

This is the error that I get

  Fatal error: Cannot redeclare wa_ab_getloopedfieldname() (previously declared in /home/sites/domain.co.uk/public_html/WA_DataAssist/WA_AppBuilder_PHP.php:11) in /home/sites/domain.co.uk/public_html/webassist/database_management/wa_appbuilder_php.php on line 19  
Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/mail/mailformatting_php.php file, comment the following line:


require_once("../database_management/wa_appbuilder_php.php");

Sign in to reply to this post

DarylBeta Tester

That got rid of the error and the redirect worked...

...just need to get the client to test it.

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working.

Sign in to reply to this post

neo314

I just ran into this problem. I suggest that changing the line to:

if (!function_exists("WA_AB_getLoopedFieldName")) { require_once("../database_management/wa_appbuilder_php.php"); }

might be better.

This occurred because require_once prevented the same file from being included twice, but because of the change to move all WA includes into a single directory (a great move) two different files contained the same function.

This code tests whether or not the old file [location] has already been included and, if not, includes the new file.

Otherwise, I believe if you add an email with dynamic elements to another page which does not already include either version of wa_appbuilder_php.php, the second email procedure will fail. Am I right on this Jason?

It would be nice, due to this transition to moving all the include files into the "webassist" directory, if the new files checked for preexisting includes in the old directory structure (by function test I suppose) to prevent this kind of conflict from occurring.

P.S. While I cannot be responsible for any harm that might come from this fix, I placed the code I recommended into the file located in C:\Users\[USER_NAME]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration\Shared\WebAssist\UniversalEmail\MailFormatting\MailFormattingPHP.php on my Windows 7 machine and now the file recreates with this code in it. Problem solved unless Jason points out a flaw in my reasoning.

Sign in to reply to this post

Jason ByrnesWebAssist

Thanks for posting this, that is how it will be fixed in a future update.

Sign in to reply to this post

Jenny I

Same problem

I am encountering the same problem. However when I appiled your fix I am now getting this error

Fatal error: Cannot redeclare wa_ab_getloopedfieldname() (previously declared in /home/theacts1/public_html/WA_DataAssist/WA_AppBuilder_PHP.php:11) in /home/theacts1/public_html/webassist/database_management/wa_appbuilder_php.php on line 19

Sign in to reply to this post

neo314

That is strange because the function is called WA_AB_getLoopedFieldName() and I think, even on a windows case-insensitive machine the error message should present the correct case, plus case-insensitivity should not apply to functions.

Did you look at the file to see if the name of the function is wa_ab_getloopedfieldname() or WA_AB_getLoopedFieldName() ?

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...