dreamweaver automatically creating a new folder - php

Ok I didn't see this anywhere and Google isn't helping it keeps directing me how to create a folder.
So my issue is this, I have a login page that I'm trying to test. When I hit f12 to show the page in a browser (on my localhost) some how dreamweaver is creating a new folder within a folder and placing the file I just saved in a completely different folder in there and renaming the file with random characters.
so in effect it is doing this :
file name is login.php, folder location is admin, so my page should show as this in the url
admin/login.php
but instead it is showing this
Mysite/Mysite/admin/KOyilwoe.php
is is actually creating these folders as well so it is showing in my dreamweaver folder structure as
Mysite/Mysite/Mysite/admin/KOyilwoe.php
Of course when it does this it breaks all links to images and any connections I'm trying to make to the database.
I am using Dreamweaver CS4 does anyone know why it would do this? I have tested many sites before on my localhost and never had this issue until this website. Is this possibly a setting in dreamweaver itself or would a javascript be causing it? I did try removing the javascript and it was still creating the new folders.

So I posted a similar question on Adobe's forums and they responded with this and yes it does fix the issue.
Dreamweaver creates a temporary page. It's created specifically for previewing.
You "should" be able to turn it off in the preferences...
Edit > Preferences >select Preview In Browser > uncheck the "Preview using temporary file" checkbox
EDIT: OOps, forgot the Preview In Browser selection.

Related

Need help getting PHP project to work on my wampserver [duplicate]

This question already has answers here:
Project Links do not work on Wamp Server
(13 answers)
Closed 3 years ago.
This is my first time trying to use wamp and I'm having trouble viewing my php project. I know the code works just fine (because it is a copy of currently live site). Basically when I try to view the site on my localhost only the index.php file loads and the image folder. No css folders/files are loading. The links work, so I can navigate my site, but no css.
My project folder is inside the www folder in my localhost. See below my project is called movies.
C:\wamp64\www\movies
When I go to view it at - http://localhost/movies/ , it displays only the html. When I view the sources tab in the console it shows the localhost/movies and inside movies an image folder and index, there should be many other folders including CSS and PHP folder called process.
If you saved the Webpage by CTRL+S the sources to your wamp dir then maybe it didn't download all sources.
I suppose you are using Windows and maybe chrome or firefox. Inspect Element the page you are currently trying to view and find sources .CSS|.JS|.JPG in console then navigate to the file and see if it's working like http:/localhost/assets/js/something.css.
Remember all your files should be inside www folder because it is the root dir accessible for server.
If you are using <? (short open tag) then for Wamp, Left click on wamp, Hover on PHP then hover over PHP Settings, find "short open tag" and finally Click it. Restart Wamp Server.
The reason for this might be due to the links. If your website is example.com and you link to an image /directory/file.jpg, the browser will request domain+uri -> example.com/directory/file.jpg and it works fine.
You run in a directory called movies and you access it via localhost/movies/. You expect that the browser used localhost/movies/directory/file.jpg, but it's not. It's domain+uri -> localhost/directory/file.jpg. As you can see, "/movies" is missing from it, thus it's not finding the file.
There are a few possible solutions. The best one is to add alocal test domain in your vhost file. You can do this by clicking the wamp logo -> 'your virtual hosts' -> 'virtual host management'. This solution is a bit more difficult and might require some more research, but is the long term best solution.
The first input is your website, eg movies.test.
The second is the path, which is c:/wamp64/www/movies/ (or where-ever you have wamp).
Then click start and restart wamp.
You can also set a base path in you html header.
<base href="/localhost/movies" >
And you could also link to your files relative
<img src="./images/file.jpg" />
These last two are easier, but require different values local vs on your production server. That works annoyingly if you have to keep updating it.

wamp server wordpress media library not showing images

Im running wordpress woocommerce website on localhost via Wamp Server. The media library once worked fine but right now, every time I upload a new picture, the thumbnail doesn't show but when I open the url of the file location, the picture shows well.
I tried deactivating all the plugins but the issue is still the same.
I also tried other solutions like reuploading my .htaccess but its not working.
Please help me out.
Click on Inspect Element and check if the path of your images are correct or not. If there something wrong with the path of the images, then fix with inserting the images into the folder C:\wamp\www.
This way your Wampserver will find the images.
Step 1 Login to Wordpress Backend
Step 2 Go to > Settings > General Settings
Step 3 Supply WordPress Address (URL) & Site Address (URL) to your local website URL i.e. http://localhost:8080/furniture and Save changes
Step 4 Go to > Settings > Permalink Settings scroll down to Product permalinks and select Shop base and Save changes
Hard refresh and Test your product page it should have to work normally.
If above solution is not working for you then you can disable all plugin and use default theme might be incompatible plugin or incorrect file permissions are the primary causes here as I have seen you're not able to see Grid View properly.

Facing 404 while accessing a php file

After doing some changes to my plugin amtyThumb, I realized that there is some problem to access imgsize.php. But i dint change anything in imgsize.php.
If i put this script into some other folder other than plugin folder on my site, then everything is working fine. I am keeping file permission 644 on both places. Folder permission is 755 on both places. It is working fine if i run it locally on my PC.
I had checked .htaccess for hotlinking. But it is not enable.
visit article-stack to view the problem. If you open page in IE or chrome, you can see broken image sign or cross sign in place of images which should be appear just before the post title in sidebar.
In addition, I am using previous version of this plugin on my one of the sites where it is working fine. visit thinkzarahatke. All images in footer bar and sidebar, are being displayed through amtyThumb 1.0.
For debugging : I added some code to write to a text file (just to check). But even that code is not getting executed :(
After a long time i found the silly mistake i did. I actually was calling script resides in "amtyThumb" but the actual plugin url was having "amtythumb".

Dynamically-related files could not be resolved because of an internal server error - Dreamweaver CS5 Error

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!
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.
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.
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.
I found the solution from this link
And verified solution is as follow:
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.
Next login to your local WordPress site via a browser and remember what the current Permalinks are set to (under Settings – Permalinks).
Choose the Default (first option) and hit save.
Go back to Dreamweaver and try the discovery option again. All related files are discovered – hurray!
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.
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.

Help with Clean URLs

I am very new to php (in fact about 2 days old). After getting ripped off by my last webhost I have decided to move my website to a different host. A friend has been helping me do this as he has a little info but we are now stuck and I have tried finding a soloution on google but most answers are way over my head. My site is a php site with a mysql database. We have moved the database and ftp'd the site and everything is now working on the new server except one thing - my site was designed originally to use clean urls? When I go to my shop page (ie: mywebsite.com and click on the shop link - mywebsite.com/shop/ (shows in the bottom left of my browser) I get a page not found error, yet when I type in the url mywebsite.com/shop.php the page displays fine. In addition, if I go to mywebsite.com/shop/shoes/ (another link which shows the preceding link in the bottom left hand corner) I get a page not found error. Also if I type in mywebsite.com/shop/shoes.php in the address bar I also get a page not found error even though the page shoes.php exists on the ftp server in a folder called templates - if I go to mywebsite.com/templates/shoes.php it shows up) I understand this is called clean urls and I need to add an .htaccess file to sort out the issue. I have looked on the ftp area of my old host and cannot find this file but have been told it is probably hidden. I have been told by my new provider that mod-rewrite is available on the server but I have no idea how to write this htaccess file. Can anyone please give me a step by step on how to do this as I am not a coder.
Additional Details
I have the following files in my root directory: index.php, shop.php, checkout.php, completed.php, contact.php ... I then have a folder called templates and in this folder I have: shoes.php. clothes.php, coats.php ...
The issue I am having is that most of the php files in my root directory already have href-links? pointing to places like mysite.com/shop/ and mysite.com/shop/shoes/ so when I open up the home page in my browser and hover over the links these are the addresses I see and when I click on the links I get page not found as the borwser must be looking for the links in the wrong place. (these links worked fine however on the last host I used). I understand I need an htaccess file to re-direct these links to the correct places. - ie the link for mysite.com/shop/shoes/ is actually linking to a page called shoes.php located in root/templates. I understand this method was used to tidy up the urls?? ie: instead of having mysite.com/templates/shoes.php the urls shows mysite.com/shop/shoes/. I have looked at the code within some of the php pages in the root and they all have lots of links to these 'false' addresses - ie: mysite.com/shop/shoes/ when the actual file should be at mysite.com/templates/shoes.php. I don't want to go through each file one at a time as they are hundreds of links, thus the reason for trying to make this htaccess file. Thanks for your time, Dave
Try to find an option on your FTP client software to show hidden files.
The name of this file is .htaccess (dot htaccess), that is probably the reason you're not seeing it. If the old site is working then the file is probably there. You could also contact somebody to send you the file via e-mail, IM, etc.
You do not need mod_rewrite or .htaccess for this.
Turn on multiviews in your Apache configuration. This will allow you to omit the .php extension from your URLs.

Categories