由于内部服务器错误,无法解析动态相关文件 - Dreamweaver CS5 错误

发布于 2024-10-16 15:14:48 字数 855 浏览 9 评论 0原文

我正在 Dreamweaver CS5 中构建一个 Wordpress 网站,并且还使用 MAMP 来满足我的 PHP/MySQL 需求。

问题是,当我在 Dreamweaver 中创建新的 Wordpress 站点(我有一个现有的 Wordpress 模板)并打开 index.php 文件时,它会询问我是否要发现与索引动态相关的任何其他文件。 php 文件。我单击“发现”,然后收到此错误:“由于内部服务器错误,无法解析动态相关文件。”

我的 MAMP 文档根目录是: /Users/Burton/Sites/

在文档根目录中,我有一个名为 Wordpress 的子目录,其中存储了所有 Wordpress 文件(包括我的主题)

在 Dreamweaver 中,我创建了一个新站点,以下是以下设置它和服务器:

站点名称:测试站点 本地站点文件夹:/Users/Burton/Sites

服务器名称:本地测试 连接使用:本地/网络

服务器文件夹:/Users/Burton/Sites 网址:http://localhost:8888/Wordpress

服务器型号:PHP MySQL 测试:打开(使其成为测试服务器)

通过网络浏览器访问该站点很好,我可以看到模板和所有内容。我可以在 Dreamweaver 中编辑站点并查看浏览器中所做的更改,但我希望 Dreamweaver 发现这些其他文件,以便我可以在 Dreamweaver 中进行实时查看,但此错误阻止我执行此操作。

我看过无数的教程并访问了许多论坛,但没有人有答案......

有人知道是什么原因造成的吗?

谢谢!

I am building a Wordpress website in Dreamweaver CS5 and am also using MAMP for my PHP/MySQL needs.

The problem is that when I create a new Wordpress site in Dreamweaver (I have an existing Wordpress template), and I open the index.php file, it asks me if I want to discover any other files that are dynamically related to the index.php file. I click "Discover", then I get this error: "Dynamically-related files could not be resolved because of an internal server error."

My MAMP document root is: /Users/Burton/Sites/

In the document root I have a sub-directory called Wordpress where all the Wordpress files (including my theme) are stored

In Dreamweaver I created a new site and here are the settings for it and the server:

Site Name: Test Site
Local Site Folder: /Users/Burton/Sites

Server Name: Local Testing
Connect Using: Local/Network

Server Folder: /Users/Burton/Sites
Web URL: http://localhost:8888/Wordpress

Server Model: PHP MySQL
Testing: On (Make it a test server)

Going to the site via a web browser is fine, I can see the template and everything. I can edit the site in Dreamweaver and see the changes made in the browser, but I want Dreamweaver to discover those other files so I can do Live View in Dreamweaver, but this error is preventing me from doing it.

I've looked at countless tutorials and visited many forums but no one has the answers...

Anybody out there have idea what is causing this?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

很糊涂小朋友 2024-10-23 15:14:48

DW 和 WordPress 网站会发生这种情况,因为 WordPress 不使用正常的包含调用,而是根据用户当时正在执行的操作动态执行此操作。 DW 无法处理设计视图中的复杂性,并且会阻塞它,显示您看到的消息。

This happens with DW and WordPress sites because WordPress doesn't use normal include calls but instead does this dynamically based on what the user is doing at the time. DW cannot handle that complexity in design view and chokes on it, displaying the message that you see.

薆情海 2024-10-23 15:14:48

我遇到了这个问题,对我来说,它是 wp-config.php 中的 mysql 服务器地址指向 localhost 的混合物,而事实上数据库位于不同的域上,并且wordpress 认为它​​部署在远程/实时域而不是本地。

更改数据库变量(它们位于文件顶部,有很好的注释)以指向正确的数据库修复了它。

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'DATABASENAME');

/** MySQL database username */
define('DB_USER', 'DATABASEUSER');

/** MySQL database password */
define('DB_PASSWORD', 'DATABASEPASSWORD');

/** MySQL hostname */
define('DB_HOST', 'DATABASEADDRESS');

另外,请确保您在本地拥有 WordPress 安装中所有文件的完整副本。我通过 CGI 脚本将我的安装在远程服务器上,如果您也这样做,请确保将全部内容复制到本地站点。

对我来说,最后一个难题是将 wp-admin 内的 WordPress 地址 (URL)站点地址 (URL) 更改为指向我的本地副本,相对于 Dreamweaver - 即 192,168.x.xxx/wordpressinstall

(我必须登录我的域 (www.wordpresstest.something) 才能访问管理工具才能执行此操作,然后它保存时重定向回新地址 - 因此请确保地址正确,否则很难修复)。

希望这可以帮助其他遇到同样问题的人。

I had this issue, for me it was a mixture of the mysql server address in wp-config.php pointing to localhost when infact the database was on a different domain, and wordpress thinking that it was deployed on the remote / live domain rather than locally.

Changing the database vars (they are at the top of the file, well commented) to point to the right database fixed it.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'DATABASENAME');

/** MySQL database username */
define('DB_USER', 'DATABASEUSER');

/** MySQL database password */
define('DB_PASSWORD', 'DATABASEPASSWORD');

/** MySQL hostname */
define('DB_HOST', 'DATABASEADDRESS');

Also, make sure you have, locally, a complete copy of all files in the wordpress install. I installed mine on a remote server via a CGI script, if you do the same then make sure you copy the whole lot to your local site.

The last peice of the puzzle for me was changing the WordPress address (URL) and Site address (URL) inside wp-admin to point to my local copy, relative to Dreamweaver - i.e 192,168.x.xxx/wordpressinstall

(I had to log in on my domain (www.wordpresstest.something) to access the admin tool to do this, then it redirects back to the new address when you save - so make sure you have it correct or it's hard to fix).

Hope this helps anyone else with the same problem.

无声静候 2024-10-23 15:14:48

我在

我遇到了同样的问题并找到了这个帖子。 David_Powers 于 2010 年 5 月 1 日 05:31 发表的第 6 篇文章对我们想听的内容做了一些解释。

因此,要解决问题,您可以转到“编辑 ->”首选项”并禁用“发现动态相关文件”,同时保持“启用相关文件”处于激活状态。

虽然这修复了错误显示,但我不太明白 David_Powers 说这个函数会做什么以及我是否真的希望打开它。如果有人可以帮助我了解这个选项的作用,我将不胜感激。

I found this on this thread

I have come across the same issue and found this thread. The post that explains a bit what we want to hear is post #6 by David_Powers on 01-May-2010 at 05:31.

So to make the problem go away you can go to 'Edit -> Preferences' and disable 'Discover Dynamically-Related Files' while leaving 'Enable Related Files' activated.

Although this fixes the error display I don't quite understand what David_Powers says this function will do and if I actually want it turned on. If someone could help me realize what this option does I would appreciate it.

萌辣 2024-10-23 15:14:48

我从中找到了解决方案 link

经过验证的解决方案如下:

  1. 在 Dreamweaver 中打开您的站点,然后等待顶部的消息,告诉您有相关文件可供发现。点击“发现”并收到错误消息。

  2. 接下来通过浏览器登录到您的本地 WordPress 站点,并记住当前固定链接的设置(在“设置 - 永久链接”下)。

  3. 选择默认(第一个选项)并点击保存。

  4. 返回 Dreamweaver 并再次尝试发现选项。所有相关文件均已发现 – 万岁!

  5. 返回您的 WordPress 网站,将永久链接更改回原来的状态,然后点击保存。

我知道这有点棘手,但在 Adob​​e 找到可行的解决方案之前,这已经是最好的了,而且并不是那么麻烦。

I found the solution from this link

And verified solution is as follow:

  1. Open your site in Dreamweaver and wait for the message at the top, telling you that there are related files to be discovered. Hit “Discover” and get the error message.

  2. Next login to your local WordPress site via a browser and remember what the current Permalinks are set to (under Settings – Permalinks).

  3. Choose the Default (first option) and hit save.

  4. Go back to Dreamweaver and try the discovery option again. All related files are discovered – hurray!

  5. Head back over to your WordPress site and change the Permalinks back to what they were, then hit save.

I know this is a bit hacky, but until Adobe can figure out a working solution this is as good as it gets, and not really that cumbersome.

蘑菇王子 2024-10-23 15:14:48

这都是关于“永久链接”的。问题是您在测试服务器设置中输入的 Web URL 地址与 WordPress 使用的结构不同。

打开 WordPress 仪表板,在“设置”下选择“永久链接”(“设置”>“永久链接”)。您将看到 WordPress 中定义的结构,也许,这是一个不同的结构,您已将其引入 DW:http://localhost:8888/Wordpress。 WordPress 中的永久链接结构类似于 http://localhost/yoursite/?p=123

检查自定义结构单选按钮 - http://localhost/sitename 并单击保存
返回DW网站>>管理网站>编辑 {your-site},在“服务器”选项卡中选择您的服务器,点击 编辑 按钮,然后在 Web URL 框中输入相同的结构:http://localhost/sitename
本地站点文件夹和服务器文件夹应类似于 C:\wamp64\www\sitename\
我在Windows上使用WAMP和DW,所以你自己算一下。

It's all about "Permalinks". The problem is the web URL address that you have entered in the test server setup has not the same structure, which WordPress uses.

Open your WordPress Dashboard, under Settings choose Permalinks ( Settings > Permalinks ). You'll see what structure is defined in Wordpress and, maybe, this is a different one, which you have introduced into DW: http://localhost:8888/Wordpress. And your permalinks structure in the WordPress is like http://localhost/yoursite/?p=123.

Check custom structure radio button - http://localhost/sitename and click Save.
Go back to DW site > Manage sites > Edit {your-site}, in the Server tab choose your server, hit the Edit button and put the same structure in the web URL box: http://localhost/sitename.
Local site folder and server folder should be like C:\wamp64\www\sitename\.
I use WAMP and DW on Windows, so do the math yourself.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文