close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PowerCMS and PowerStore Integration Challange

Thread began 11/16/2009 10:03 am by buzzellm352279 | Last modified 11/19/2009 8:50 pm by Eric Mittman | 1664 views | 7 replies |

buzzellm352279

PowerCMS and PowerStore Integration Challange

I am currently running both PowerCMS and Power Store on a client website. Both are working fine but I would like to use PowerCMS to allow the client to modify text section of the PowerStore Index (Home) page. I read in the forums where they can be integrated. My current configuration is as follow. PowerCMS is in the root directory of the site. PowerStore is in a sub-directory called "store" in the root directory with all of the PowerStore files and folders in it. I have tried adding the 2 lines of PowerCMS PHP code to the top of the store home page and then the PowerCMS content string to the area of the page I want the text/images to show up in (same as I have down with each of the main web site pages and as I read here in the forums) the problem I am having is a code error occurs when the page loads. I have checked the code and everything seems correct. My guess is that I have to do something else because the store files are in a root subdirectory "store" and PowerCMS is in the root. Can you help. I can provide access to the site if necessary for you to review.

Thanks,
Mike

Sign in to reply to this post

Eric Mittman

What is the specific error you are getting on your store pages when you try to add in the CMS content? If you have them both working successfully in their own directories then you should not have any problems using the CMS content on your Power Store pages. I think based on the structure you have described here that the problem may just be a linking issue to the include files. On your Power Store pages that you are putting the CMS content on you may need to put a ../ in front of the paths.

Sign in to reply to this post

buzzellm352279

Eric,
Here is the page error I'm getting at the top of the PowerStore Home page:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/somersf3/public_html/choicesnewyork/store/index copy 5.php:3) in /home2/somersf3/public_html/choicesnewyork/store/WA_eCart/WA_eCart_Definition_PHP.php on line 479


And here is the error I am getting in the Product Box:

TestTable 'somersf3_choicesStore.contents' doesn't exist



Here is what I added to the line 1, 2, 3, of the PowerStore page for PowerCMS:

1 <?php include "../Connections/localhost.php"; ?>
2
3 <?php include "../WA_CMS/WA_CMS.php"; ?>
4
5 <?php require_once( "WA_Globals/WA_Globals.php" ); ?>
6 <?php require_once('Connections/localhost.php'); ?>
7 <?php
8 //WA eCart Include

================================= and for lines 155 through 163 of the PowerStore page for PowerCMS.

155 <div class="box">
156 <h2 id="featureProduct">Featured Product</h2>
157 <div class="productWrapper">
158
159 <div align="center">Test<?php echo WA_getCMSContent($database_localhost, $localhost,"Shop Featured Product", "sfp_box1"); ?>
160 </div>
161
162 </div>
163 </div>


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


Thanks,

Mike

Sign in to reply to this post

Eric Mittman

Normally when you get this headers sent message it is because of some extra white space that is outside of the php code blocks. You should look for any spaces outside of these script blocks and get rid of them, you should also get rid of the extra blank lines at the top of your page where you are adding in the include files. Please give this a try and let us know the result.

Sign in to reply to this post

buzzellm352279

PowerCMS and PowerStore Integration Challange

Eric,

I made the changes you suggested i.e. removing any extra white space and the results were as follows:

The top of the PowerStore Home page error

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/somersf3/public_html/choicesnewyork/store/index copy 5.php:3) in /home2/somersf3/public_html/choicesnewyork/store/WA_eCart/WA_eCart_Definition_PHP.php on line 479

Has gone away. Good ( I think :-) )

But the error I am getting in the Product Box on the PowerStore home page:

Table 'somersf3_choicesStore.contents' doesn't exist

Still remains and the rest of the page after this error does not completely show up.



================================= and for lines 150 through 155 of the PowerStore page for PowerCMS.

150 <div class="box">
151 <h2 id="featureProduct">Featured Product</h2>
152 <div class="productWrapper">
153 <div align="center"><p>Test<p/><p><?php echo WA_getCMSContent($database_localhost, $localhost,"Shop Featured Product", "sfp_box1"); ?></p></div>
154 </div>
155 </div>


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


Thanks,

Mike

Sign in to reply to this post

Eric Mittman

This error looks to be complaining about the table and column from the db. If you are not getting errors for the connections file include then you may be referencing the wrong connections file for this. You should try to update the path for this include to point to the connection file that CMS is using, I think if you did this then it would work.

If there continues to be a problem please post back and give us some more details about the connection files that you are using, where they are in your site and what dbs are referenced in them.

Sign in to reply to this post

buzzellm352279

PowerCMS and PowerStore Integration Challange

Eric,

The database connection files for PowerCMS and PowerStore are located as follows:

PowerCMS files are at root including the Connections directory for PowerCMS database connections

PowerStore files are located under root in a directory called "store" and under the store directory the Connections folder for the PowerStore database connections is located.

With this configuration if I don't include the PowerCMS includes in the PowerStore home page everything works fine both in PowerStore and PowerCMS. PowerStore connects to the somersf3_choicesStore Table accordingly. No errors. and Power CMS connects to it's database somersf3_choicesCMS.

Here is the PoweCMS connections code located in the Connections directory under root: (passwords X'd out for security)

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_localhost = "localhost";
$database_localhost = "somersf3_choicesCMS";
$username_localhost = "somersf3_choices";
$password_localhost = "XXXXXXXXX";
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
?>


Here is the PowerStore connections code located in the Connections directory under root, under the directory called store, in the folder call Connections: (passwords X'd out for security):

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_localhost = "localhost";
$database_localhost = "somersf3_choicesStore";
$username_localhost = "somersf3_choices";
$password_localhost = "XXXXXXXXXX";
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
?>


Again the only thing I am changing in the overall setup is adding the PowerCMS includes in the PowerStore home page. I really need to get this resolved. Again if providing you access to the site is helpful let me know.

Thanks,

Mike

Sign in to reply to this post

Eric Mittman

So this is only a problem when you have the other connection file include on the home page for the store correct?

The reason you are having this problem is because the connection files use the same variable names:

php:
$database_localhost



These values are referenced on the page and whatever the last connection file to load is that connection files value will be used. So in the case of a database variable if the wrong db is being referenced then the table you are attempting to work with may not exist.

If I were in your situation I would create a new database that combines all of the tables from the other two, then copy one of the connection files and specify my new db in there. Always make sure to backup existing files and don't delete the other db's in case you need to get back to them for some reason.

If you had all of the info in a single db you could use just one connection file and not have any problems with conflicting values. If you were to do it this way the new connection file should be copied to both the CMS and PowerStore locations so that these pages remain working as they did.

Sign in to reply to this post

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