close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

chdir(dirname(__FILE__)): error

Thread began 9/17/2015 8:41 am by mrobben375515 | Last modified 9/21/2015 9:35 am by Ray Borduin | 5141 views | 12 replies |

mrobben375515

chdir(dirname(__FILE__)): error

I am getting two errors on http://loyalneighbor.com/inducteecat_detail.php?catid=4 The error is coming from code in a .dwt template.

One error is "Warning: mysql_select_db() expects parameter 2 to be resource, null given in /home/content/05/11651305/html/WA_CMS/WA_CMS.php on line 3"

Line 3 the WA_CMS/WA_CMS.php is "chdir(dirname(__FILE__)):"

The other error is probably related. How can I fix this?

Sign in to reply to this post

Ray BorduinWebAssist

This means the connection that the cms is using isn't on the page. You probably just have to add the require_once() to add the connection file that the cms uses. If I had a copy of the page giving the error I could be more precise.

Sign in to reply to this post
Did this help? Tips are appreciated...

mrobben375515

see attached files

Attached Files
inducteecat_detail.php
menu.dwt
menu_fw_theme.dwt
Sign in to reply to this post

Ray BorduinWebAssist

Try adding this to the top of the inducteecat_detail.php page:

<?php require_once('Connections/PowerCMSConnection.php'); ?>

Recordset and server code on a template isn't automatically moved to the pages using the template... so you may need to move more of the code from the template onto the page before it will function properly as well.

Sign in to reply to this post
Did this help? Tips are appreciated...

mrobben375515

Adding that code helped a little, there are no errors.

The base content was created through Data Assist. When I opened the page with no templates applied, it all looks fine. I then applied the menu.dwt template to the page. All I see now is a partial menu and to content that was created and working from Data Assist. You have all the files already. See this page: http://loyalneighbor.com/inducteecat_detail.php?catid=4

Sign in to reply to this post

Ray BorduinWebAssist

I believe this is because of the other server side code on the template page that isn't on the page itself. You are going to have to manually move that code to the pages as you apply the template because dreamweaver won't do that for you.

Sign in to reply to this post
Did this help? Tips are appreciated...

mrobben375515

Have I messed something up? When I try to update the server behavior connections I am seeing multiple versions of database names that are all pointing to the same tables, I guess I would expect three, one for the standard mysql database connection, another a dynamic MySQLi and another for dynamic MySQLdi. But see attached. All those connection type are all pointing to the same database and the same tables. Should I just keep the PowerCMSConnection types?

I also tried to update all the server behaviors, but I am still getting an error on /WA_CMS/WA_CMS.php but just a different line. All the servers behaviors look ok, no red warning flags. Yet I still am getting an error. (see http://loyalneighbor.com/inducteecat_detail.php?catid=4). I can tell the connection the PowerCMS is problematic.

Sign in to reply to this post

Ray BorduinWebAssist

Keep all of the connections. They are fine.

The issue now is that you have required the CMS include file twice on the same page.

If you attach a copy of inducteecat_detail.php I can look at where it is repeated and suggest a fix.

Sign in to reply to this post
Did this help? Tips are appreciated...

mrobben375515

attached is the file

Sign in to reply to this post

mrobben375515

Is the attached error related to what you think is happening? WA_CMS.php is the folder, but Dreamweaver is not seeing it.

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