close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Fatal error: Cannot redeclare

Thread began 7/13/2010 3:34 pm by david403594 | Last modified 7/19/2010 2:01 pm by Jason Byrnes | 4128 views | 11 replies |

david403594

Fatal error: Cannot redeclare

I made it all the way through the setup stage with CMS2. However, when I put the developers notes part of the code onto the following page I'm getting errors.

Page: small_business.php

Error:
Fatal error: Cannot redeclare wa_getcmscontent() (previously declared in /home/bayareaw/public_html/WA_CMS/WA_CMS.php:2) in /home/bayareaw/public_html/cms/WA_CMS/WA_CMS.php on line 68

Please let me know what it's going to take to fix this???

Sign in to reply to this post

Jason ByrnesWebAssist

it looks a change has been made to the WA_CMS/WA_CMS.php file.

The error is saying that the function wa_getcmscontent() is declared twice in that file. Once at line 2 and again at line 68.


That file should only have 11 lines of code in it.


You should re-download the PowerCMS files from your download center and replace the WA_CMS/WA_CMS.php on your server with a fresh copy from the downloaded files.

Sign in to reply to this post

david403594

Some success...

I tried what you suggested but it didn't work. Then I thought I'd just try it on a blank page and it worked fine. So, I'm assuming that it has to do with the fact that this is a page that uses elements from the powerstore? Could there be some conflict between adding the developers notes to a page that is in the powerstore?

Here's the page that worked:
test.php

Here's the page that it didn't"
gallery.php

Or, could it be a template problem????

I just tried starting with a blank page, got the CMS to work. Then I went back to and applied the main template to the page and the errors came up again. I'm assuming that the problem is in my template? Can you please tell me what I need to do to be able to make this work for me????

Thanks in advance.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of those two pages so i can examine the code.

Sign in to reply to this post

david403594

here are the pages:

see attached. I've also included my template file.

Attached Files
Main.dwt.php.zip
gallery.php.zip
test.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

AOn your template, you have the WA_CMS.php included at line 3

<?php require_once('../WA_CMS/WA_CMS.php'); ?>


because of this, when you add the developer nots to a file that is based on the template, you do not need to include it again.

instead of using this code:

php:
<?php

include('/home/bayareaw/public_html/cms/WA_CMS/addtosite.php');
echo 
WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'test''Content'false);
?>




you can just use:

php:
<?php

echo WA_getCMSContent($database_PowerCMSConnection$PowerCMSConnection'test''Content'false);
?>
Sign in to reply to this post

david403594

Different error...

I replaced the code and now I'm getting:

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/bayareaw/public_html/WA_CMS/WA_CMS.php on line 3

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/bayareaw/public_html/WA_CMS/WA_CMS.php on line 5

I've also attached the page that the problem is coming up on:

gallery.php

Thanks for your help. I'm really trying to understand this so I can stop bugging you guys.

More info...
I was wondering if I may have found the problem. I'm trying to use the powerstore along with the PowerCMS. I'm trying to make changes to pages using the PowerCMS and that's when I'm running into problems. When I do it in the PowerStore it works. It just seems like it's easier to manage more pages with the PowerCMS. Is there a way to manage pages with the PowerCMS even though I'm running the PowerStore? Any advice would be appreciated.

Thanks in advance....again.

Attached Files
gallery.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

PowerStore 3 has PowerCMS functionality built in for this purpose.

Sign in to reply to this post

david403594

Does that mean that the PowerCMS doesn't work??

So am I to understand that there's no way to get the PowerCMS to work with the PowerStore? It's okay if it doesn't, I just need to understand how these things work.

I'm looking to manage around 60 pages and it just seemed like the PowerCMS was the way to go as the functionality is somewhat different within the PowerStore.

Specifically, we liked the idea of logging in, and clicking on the "edit" links on the pages. Is there any way to do that?

Thanks for you help.

Sign in to reply to this post

Jason ByrnesWebAssist

No, you cannot run PowerCMS in a PowerStore site, the tow cannot be integrated into the same pages.

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...