Dreamweaver CS5.5 Dynamically Related Files - php

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.

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.

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.

Related

Source of img: "/images/..." vs "images/..." in PHP websites (VSCode and XAMPP)

I have recently been drafting a website in HTML and CSS, but since the scope of the site is larger than originally planned I want to use PHP as well (for e.g. shared nav menus). After getting my server set up (VSCode, PHP w/ Xdebug, XAMPP) I simply changed my index.html to index.php and previewed the page.
The website was identical except some images were broken. I noticed the ones that worked were sourced as images/... and there ones that were broken were sourced as /images/....
Is there a difference between /images/ and images/?
Some extra information that may play into this: When setting up PHP it was a fresh install of XAMPP and using the PHP debug with Xdebug extension in VSCode. When debugging and launching the server to preview my website I kept getting the XAMPP dashboard even though my website source was set as "webRoot": "${workspaceFolder}". The only way I could bypass this was for the project to set it absolutely by removing webroot and replacing it with "url": "http://localhost:8080/WebsiteDirectory/".
Yes, it is.
/images/ is an absolute path starting from the root of your page
images/ is relative from subfolder you're in.
And actually it's HTML question, not PHP.

Xampp not showwing my projects in browser - htdocs folder

I used windows 10 as the operating system and I installed xampp it's been a long time and it chews well, until yesterday after an error in mysql.
So I looked for solutions on the internet and I finally solved the error by copying the files from C:\xampp\mysql\backup to C:\xampp\mysql\data.
then the service mysql is well marketed even as Apache.
PhpMyadmin chews well without a problem. phpmyadmin page shows, but my code, will not show.
The problem is: my old projects exist in htdocs only display "This page does not work" and "localhost" in the title head, and nothing loads from my project files.
Note: I used codeigniter as a framework.
Note: I can navigate to a new project but for existing projects beyond that it no longer works.
Thank you P.al
Use Directly like-
http://localhost/projects/form.html
Here your files should be inside C:\XAMPP\htdocs\Projects\yourfile.html
The error in your picture appear an php script error
Edit php.ini for display error and notice in browser
display_errors = on
save the php.ini restart apache and reload page.

Wordpress version issue

I have a Wordpress 4.5.4 website I downloaded from a remote server to my local development server installing both, the files and the database.
On the remote server is working "apparently OK" but on my local server is doing something strange because on lot of files is doing the following appending:
http://<domain>.com/wp-content/themes/mytemplate/style.css?ver=1.8.4
Notice the version at the end: 1.8.4 while the current version is: 4.5.4
(this situation happens with lot of files)
Then I checked on the server and for these files the version at the end is the right one: 4.5.4
Then on both, on the remote server and on the local development server I read the global variable: $wp_version and on both cases I got the right version: 4.5.4, so I don't know why the 1.8.4 at the end as default version for those files on my local development server?
On my local development server the website looks really different than on the remote server and the files I download as well as the database is the right one, because on the root of the remote directory I put a dummy file and I can read it via the browser using the url. Also, I tried changing the database password on the wp-config.php file on the server and I got database connection error, so the files I downloaded and the database are the right ones.
Any idea on how to solve this?
EDIT 1
Remote server: CentOS release 6.8 / PHP v5.3.24 / MySql v14.14
Local Dev server: Windows 7 / Wamp64 / PHP v7.0.0 / MySql v14.14
EDIT 2
On the local development server I modified the .htaccess file and the Windows' hosts file to use the same domain and avoid the necessity of these kind of changes (and be totally transparent for browsers). I do this with tons of websites, so for me is a normal procedure. Then my problem is not a localhost/domain.com conflict.
The version add in a wp_enqueue_script() or wp_enqueue_style() is an optional value, and is related to the script version.
This value could be add the developper for caching purpose but it is not always corresponding to the WordPress version. The example you show is only relative to the theme and it's certainly hardcoded by the developper (this could be great to show us the wp_enqueue_style() ).
If version is set to false, a version number is automatically added equal to current installed WordPress version. But, some script can check and enqueue different file (I think about for minify css that will not load when you are enqueuing file locally).
In case, verify that both server show the same
get_bloginfo('version');
If not, change your local value with phpmyAdmin.
Hope it gives you some hints.
You need to manually update the siteurl and home options in the _options table and replace your domain with something like http://localhost, and remember to add the port number if you are running it at a different port than the usual 80

Why is Wordpress outputting phpinfo() when I try and go to a page?

I have just moved a Wordpress install from a remote host to run on my local development machine. On the remote server it's fully functional.
However, on my development box I can only load the homepage. Other URLs just load a standard phpinfo() page with no errors.
Does anyone know what might be causing this?
It sounds like you are using MAMP or WAMP on your dev box, which will load a default vhost showing phpinfo for any page that does not exist.
Inside wordpress, the settings, in the DB, it sounds like you have Url's "hardcoded" like "http://www.mysite.com" which are not working locally because your "dev" Url is something like "http://localhost"
Whenever using a development server, especially with wordpress, you should setup you dev server as close to your production server. This means you should edit your host file to make it so "http://www.mysite.com" actually goes to your development box or localhost. That way you are viewing everything as it will be when it goes to production.
I had this problem as well following the hosting company re-installing an SSL certificate.
I did some searching and really only found this thread which give me the idea there was a 404 error hiding there somewhere so I checked the php_errors.log file (which I found in the root folder of my site in FTP) - opened that in notepad and found many errors such as:
PHP Fatal error: Class 'WordPressHTTPS_Module_phpinfo' not found in /var/www/vhosts/mywebsite.com.au/httpdocs/wp-content/plugins/wordpress-https/lib/Mvied/Plugin.php on line 385
So - indeed a missing file in the wordpress-https plugin.
To correct, I renamed the folder which contained that plugin (eg wp-content/plugins/wordpress-https to wp-content/plugins/wordpress-https-disabled) - effectively disabling the plugin.
This then allowed me to login to the wordpress admin, install the latest version of that plugin - which worked fine and then deleted the old folder (wordpress-https-disabled)
Everyting was good as gold after that
Hope that helps someone :)
open httpd.conf in text editor
Change;
AllowOveride none
To;
AllowOveride All
I had the same challenge when I cloned my remote site locally.
I fixed it by checking the .htaccess file and correcting this line to point to the right project folder:
RewriteRule . /wordpress/index.php [L]

Cannot Edit WordPress Themes - Various Errors

Our WordPress 2.8.6 installation is returning multiple different errors when trying to edit theme files via wp-admin. The errors are as follows:
"Invalid index."
"The data area passed to a system call is too small"
"The parameter is incorrect."
We've tried deactivating all plugins to no avail. We also tried creating a blank "plugins" directory and also still experienced these errors. Some theme files we are able to edit (very few), but most give one of the three errors above. We also tried switching back to the WordPress Default theme with the same results.
This installation is running on a Windows 2003 Server, IIS 6, PHP 5.3.0, FastCGI 6.1.36.1, and MySQL 5.1.40-community.
Sounds like your IIS config is messed up.
Try posting on serverfault.com too, this is more of a server config problem than a programming problem I think.

Categories