Multiple computers will cache old version of included css/php files - php

I've been working in Dreamweaver CS4 on two computers, bot by accessing my hosting server (Bluehost) via the FTP feature in DW. Whenever I need to edit a file, I double click the file on my server in the Files Manager and it opens it with the submenu directly under the file name. Here's the example:
The issue I am having is when I edit includeA.php (which is included in PageA.php) on Computer1 and then go home to edit PageA.php on Computer2. I then save, which then saves over my changes made to includeA.php from Computer1.
Essentially, Is there any way to automatically update included files when opening a file? Or even when I start DW, updating all of my files in a certain directory? I believe I have tried refreshing my working directory before I edited includeA.php, but that did not help...I think... I have set up a test for this and will be testing by my return here (Computer2) tomorrow.
Any ideas? Thanks all!

Maybe you want to use a revision control system that solves your problems. git?

Related

Different ways of making changes existing website

I have an admin page that I want to make some changes. The website has been built using php and mysql, by someone else and it is up running.
First thing came to my mind was:
Download source code and make a local copy of everything and work on that and once finished upload to hosting again.(using Xampp)
I also have been advised to make another copy of server and make changes on the server instead of running it locally.
My question is: Second option seems much easier , but does that mean in order to test every little detail I have to save file, upload back to server and run it?
Am i missing something?

How to edit website locally while live DB is still being edited

I'm relatively new to web development and I have some serious concerns about repairing/editing/fixing live site.
I use WordPress and its DB hold also configuration, so let's say that I need to do some work on website with e-shop. I will start website on my local with current version of DB from live website. But in few hours, when I'm done, I can't just overwrite live DB with my DB from local environment, because there are some new orders, posts etc.
How can we deal with this kinds of things?
Thanks everyone who will share his advice or experiences!
First youhave to make note of all the changes you are making in the files. You have to document it properly.
Next there are actually three cases
i) When changing the files alone
if you are changing just the files then obviously no need to change the database only the files needs to be updated. First no need to hack the core wordpress files as everything can be done through "actions" and "filters" method. I mean by creating a plugin so your core files are safe. https://codex.wordpress.org/Writing_a_Plugin
ii) When chaning the database alone
if you are chaning the database instead of deleting the entire datase and reloading you can simply alter the tables using "ALTER" command http://dev.mysql.com/doc/refman/5.7/en/alter-table.html.
iii) Changing both databse and files.
Follow (i) and (ii)

WordPress files downloading instead of executing on the server

My WordPress files are downloading instead of executing on the server. I have tried changing the server but that does not solve the issue. I am sure it is happening from my WordPress files as the hosting runs other WordPress files smoothly.
I wish I could could provide the code but that isn't needed. Please guide me. Thanks.
I have only seen this happen when:
1) PHP is turned off or not installed on the server
2) The server needs to be reset
3) File names are not correct
4) The redirect script is not redirecting as it should
5) Links are not valid
The good news is most of these can be solved by you/your host. Call your host to ask them for help on verifying the PHP install/process. If everything is good (for instance, if you have another site on the same server that is working fine) then you need to verify file names. As this is WordPress and the file names are all pretty standard this isn't exactly likely but make sure there are no unwanted spaces and the file names are "something.php". With WordPress you may see a bunch of parameters passed through the URL so "something.php?blah=blah" Is fine too (no space between php and ?).
Check the link you are clicking. The file names might be good but the link may be bad. It might be as simple as fixing all the link URLs. From what I recall of WordPress, there is a built in method of linking to pages within the same WP site. I believe these are all based off the URL in the database so you may want to verify the URL in the database/config file to verify WP is sending them to the correct place. If they are not stored in the database and are instead, coded directly into the content, you may have to manually update every link to the correct URL.
Finally, if it is script or wordpress related you may want to consider a fresh WordPress install. The good thing about WordPress is all the good stuff is in the data base:
1) Make a backup of the data base
2) Trash your WP install completely
3) download and install new WP with desired plugins and themes
4) Restore database
If the last step breaks the server again, check URLs within the database: http://codex.wordpress.org/Changing_The_Site_URL
Your Host can usually help in backing up and restoring WP databases. Even godaddy (who does not support it) will often help you walk through the process (you really want to call the hosting team. As an ex-godaddy employee, those guys are the experts).
If this isn't enough information, please provide a link to the site. It will allow me to do some quick troubleshooting to determine the overall issue.
EDIT: Help for verifying php install
Create a php file with the following contents:
<?php phpinfo(); ?>
And upload it to your site
This will make information about your PHP install easily accessible
Note: DO NOT LEAVE THIS FILE UP PERMANENTLY AND DO NOT POST A LINK PUBLICLY, YOU DO NOT WANT RANDOM PEOPLE ON THE INTERNET ACCESSING THIS INFORMATION
If you can access the file and it loads up a bunch of information in a purple (I believe it is purple) table, your PHP install is up and running. If the file just downloads like the rest, contact your hosting provider.

Magento site not working since being moved

I developed a magento site locally and it was and still is working fine. I need to put it on a public URL to show people though so I've set it up on a subdomain.
I have uploaded all of the files, copied the database to the live server, amended the database connection details and cleared the cache and session folders. I just get a load of wierd symbols when I try and view it in my browser. It is at Click me
You can check if the settings of the webservers are alike. If it is a cloud spaced hoster ask them if their server is capable of running Magento.
Also make sure the compiler is disabled and there are no other cache modules active.
You can't "copy" a Magento database, you'll have to create a new one at your new location.
Every installation needs its own database as many variables are different...
Copy it over and amend the core_config_data table so it contains the new URLs of your store. You will also want to flush the cache and empty out any session data in the database, as it will relate to your old URLs (probably won't matter too much, though).

How to download new files in Netbeans FTP view

I have created a new project as a PHP Application from Remote Server. I am using the passive mode FTP connection setting, as without this setting I could not access the files via Netbeans at all. However, some files on the server do not show in my Netbeans panel. How does one refresh the view to show new files on the server? I have tried closing and reopening Netbeans, however it seems that Netbeans will only upload, not download new files. I see no obvious menu items for refreshing the view from the server, and adding the Scan on Demand plugin did not help. Thank you.
right click on Source files then select :
Download for downloading files.
or
Upload to upload your local files.
or
Synchronize to synchronize existing files in local and server.
i hope my answer is useful for you
You can find the Upload/Download option on all folders if you are using the Project Tab. The same option does not exist when you are browsing the Files tab. This will solve your issue. Because it worked for me.
Interestingly, the inner folders do have a "Download" menu item for downloading new and changed files from the server, but the Source Files and top-level directories do not have this item. Therefore the user can only refresh folders that are at least two levels deep.
In 7.2.1, go to projects, expand the project you want to get the files for, then right click on the folder that says 'Source Files' for a download menu item that gets all of your files for that project.

Categories