Dreamweaver CS5.5 动态相关文件

发布于 2024-11-29 09:06:46 字数 1710 浏览 1 评论 0原文

我正在尝试在 PHP/MySQL 站点中将 Dreamweaver 与现有代码库(不是 WP、Drupal 或 Joomla!)一起使用。我继续收到“由于内部服务器错误,无法找到动态相关文件。”我一整天都在谷歌上搜索,阅读了大量特定于 WP 的解决方案,包括本网站上的线程。我已经尝试了列出的所有方法,但没有成功。

设置信息

  • MAMP 2.0.1
  • Mac OS X 10.6.8
  • Dreamweaver CS 5.5
  • 站点的本地地址:/Users/myName/Sites/siteName
  • 测试服务器地址:/Applications/MAMP/htdocs/siteName

尝试的解决方案:

  • 1)将库添加到站点根目录( /Users/myName/Sites/siteName/library)
  • 2) 将库添加到 MAMP 根目录 (/Applications/MAMP/library)
  • 3) 添加了应用于 phpinfo 中列出的 php.ini 的两个位置的包含路径
  • 4) 将 Dreamweaver 设置为使用站点根路径而不是页面相对路径
  • 5) 切换回页面相对路径
  • 6) 重新启动 MAMP,将首选项中的端口重置为 8888 /8889 或 80/3306
  • 7) 检查站点信息以确保正确定义路径

当我插入以下代码或任何具有相对路径、实时视图和预览的 require 函数时浏览器显示空白页面。

<?php require_once('includes/initialize.php'); ?>

我非常沮丧。我在之前的工作中一直使用 XAMPP 和纯文本编辑器,并且从未遇到过相对路径的问题。任何帮助将不胜感激。

回答我自己的问题;我知道,形式很糟糕。

编辑:

添加到之前尝试的解决方案列表:

8)尝试将服务器端口指定为8888/8889并将服务器路由定义为http://localhost:8889/mySite/,例如设置Drupal/ WP/Joomla!测试环境。

9) 卸载/重新安装 MAMP、Dreamweaver、禁用 OS X 附带的开箱即用 Apache 服务器、在 Dreamweaver 中重新定义站点。

修复尝试 8 导致此处讨论的数据包错误。

修复尝试 9,以及之前不起作用但现在起作用的错误报告:

// 报告所有 PHP 错误(参见变更日志)
error_reporting(E_ALL);


显示测试服务器正在使用本地定义来引用动态相关文件,即使这应该有效,但它却不起作用。

重新安装后,使用“站点>管理站点”创建新站点,并将“站点”菜单中的本地站点文件夹和“服务器”菜单中的服务器文件夹定义为同一目录。 (/Applications/MAMP/htdocs/mySite)

请参阅OP中的设置信息来查看我的系统变量;这可能特定于任何/所有设置。但只有相同的本地定义和服务器定义才能解决问题。我已经重新创建了以前的设置,以确保不同的本地/服务器定义不起作用。

I'm trying to use Dreamweaver with an existing code base (not WP, Drupal, or Joomla!) in a PHP/MySQL site. I continue to receive "Dynamically related files could not be found because of an internal server error." I've been googling all day and have read plenty of WP-specific solutions, including the thread on this site. I've tried all the methods listed, no luck.

Setup Info

  • MAMP 2.0.1
  • Mac OS X 10.6.8
  • Dreamweaver CS 5.5
  • Site's local address: /Users/myName/Sites/siteName
  • Testing server address: /Applications/MAMP/htdocs/siteName

Attempted solutions:

  • 1) added library to site root (/Users/myName/Sites/siteName/library)
  • 2) added library to MAMP root (/Applications/MAMP/library)
  • 3) added include path for both locations to applied php.ini listed in phpinfo
  • 4) set Dreamweaver to use Site Root paths instead of page-relative paths
  • 5) switched back to page relative paths
  • 6) Restart MAMP, reset ports in Preferences to 8888/8889, or 80/3306
  • 7) checked site info to make sure paths are correctly defined

When I insert the following code, or any require function with a relative path, live view and preview in browser display empty pages.

<?php require_once('includes/initialize.php'); ?>

I'm incredibly frustrated. I had been using XAMPP and a plain text editor for previous work and never had an issue with relative paths. Any help would be appreciated.

Answering my own question; bad form, I'm aware.

EDIT:

Adding to previous list of attempted solutions:

8) tried designating the server ports as 8888/8889 and defining server route as http://localhost:8889/mySite/, like setting up a Drupal/WP/Joomla! testing environment.

9) Uninstalled/Reinstalled MAMP, Dreamweaver, disabled the out-of-the-box Apache server included with OS X, the redefined the site in Dreamweaver.

Fix attempt 8 led to packet error discussed here.

Fix attempt 9, plus error reporting that hadn't been working, but did now:

// Report all PHP errors (see changelog)
error_reporting(E_ALL);

showed that the testing server was using the local definition to refer to dynamically related files and, even though that should work, it wasn't working.

After reinstall, created new site with "Site > Manage Sites" and defined Local Site Folder in "Site" menu and the Server Folder in the "Server" Menu as the same directory. (/Applications/MAMP/htdocs/mySite)

Refer to the Setup info in the OP to see my system variables; this may be specific to any/all settings. But only identical local definition and server definition solved the problem. I've recreated previous settings to be sure, and different local/server definitions don't work.

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

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

发布评论

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

评论(2

梦回梦里 2024-12-06 09:06:46

如果包含文件的内容使用 Dreamweaver 无法识别的 PHP 语法进行其他动态调用,则 Dreamweaver 和 PHP 站点可能会发生此错误。如果没有看到initialize.php的内容,我不能100%确定情况确实如此,但我很确定DW无法解析那里的代码并找出要显示的文件。

This error can happen with Dreamweaver and PHP sites if the contents of the included file make additional dynamic calls using PHP syntax that Dreamweaver doesn't recognize. Without seeing the contents of initialize.php, I can't be 100% sure this is the case but I am pretty sure that DW is not able to parse the code there and figure out what files to get for display.

九命猫 2024-12-06 09:06:46

我看到很多人遇到的动态相关文件问题:

Dreamweaver 正在扫描您本地副本中的任何内容,它应该是 WordPress 的完整安装。如果您在本地工作,请将“测试服务器”上的所有内容下载到“文件”面板中的“本地视图”。

如果您正在使用两组文件,则您的本地副本以及 MAMP 的 htdocs 或“测试服务器”上的内容应该几乎相同,除了您正在处理的粗略内容之外。这就是我看到人们遇到的问题。

如果您在“pho-FTP”环境中工作。

Problem Dynamically related files that I see a lot of people run into:

Dreamweaver is scanning whatever is in you Local Copy, it should be a the full installation of WordPress. If you're working locally, download everything on your "Testing server" to your "Local view" in the Files panel.

If you're working with two sets of files, your local copy and what is in MAMP's htdocs or on your "Testing server" should be nearly identical, except for what you're working on of coarse. That's the problem I see people have.

If you're working in kind of "pho-FTP" environment.

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