I have a "Main" SQL database - with 20 websites sending / receving data.
All sites Works with Classic ASP.
Today I create an include file to connect all sites to db.
My question is:
Its possible to create only one "conn file" and include this file to all sites?
Why?
because I need to change the connection - and now I need to change 20 files for all sites..
any idea?
Place that file to include in a folder on the server.
Create a virtual directory in each site pointing to that folder.
Add the following to the either the pages that need the connection or a global include file for each site.
<!--#include virtual="/virtualdir/connfilename"-->
Related
I have Drupal 7 website and i need to upgrade it to Drupal 8 i’ve followed drupal website documentation for upgrading to drupal 8 using web browser https://www.drupal.org/docs/8/upgrade/upgrade-using-web-browser#source-site
Now both sites installed in the same server with different domains.
When i added database access all data migrated successfully else the media files because I have an error in public file directory input i’ve tried the following directories but each one return error.
1- When I added public files directory with the website address as https://drupal7migration.mydomain.com/sites/default/files
Or
https://drupal7migration.mydomain.com/sites/default/files
the error was unable to read from public files directory. Client error 'Head https://drupal7migration.mydomain.com/sites/default/files' resulted in a 404 not found response.
2- When I added the local file directory: /var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/files
Or
/var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/files/public
Or
/var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/public
the error was "unable to read from public files directory".
also the sites folder has 777 permission.
So, what’s the right public file directory that should be added to migrate both database and files successfully?
The files folder usually lives in :
/sites/yourSite/files.
Given the errors you indicated, it sounds like the “web server” doesn’t have enough permissions to the /sites/yourSite/files (read, write , and execute).
So determine the user under which your web server is running and make sure that use has enough permission.
See docs for more:
https://www.drupal.org/docs/7/install/setting-up-the-files-directory
Also, look at your web server vhost to get the actual documentRoot location.
I don’t think what you have is correct:
/var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/files
Is probably meant to be
/var/www/vhosts/drupal7migration.mydomain.com/sites/default/files
Normally,
You have /
var/www/HTML/example.com
Point
to your Drupal install as:
/
yourDrupalInstall/sites/example.com
Or
/yourDrupalInstall/sites/default
/files
I am trying to move a cakePHP project I completed a few months ago from a server (a friend's server) to my own web server.
I have set up a database and changed the database config file to match my database/login credentials.
when I navigate to http://babbage.cs.missouri.edu/~jam2z9/muve/index.php you see it looks as if it is a brand new project. When I go to just /muve instead of index.php it says I'm missing a ~jam2z9Controller file but I don't see any files from the old server that are like this to edit and change to ~jam2z9.
I feel like this should be a very simple transition once I hook up the database credentials but I'm just confused as to what my issue is?
All of the database tables in my new database are blank as I just imported the .sql file into phpMyAdmin. It all seems to be connecting fine but it will not go to the home page just the aforementioned generic cakephp screen?
In your bootstrap.php add the following line:
Configure::write('App.base', '/~jam2z9/');
This is because as far as Cake sees it you are hosting it in a sub-sub directory.
Edit: There are more details about not being able to use mod_rewrite here
Migrating wordpress sites between hosts can take a lot of time, especially when the hosting platforms are different.
I have been trying to migrate my sites from Cpanel to Mediatemple, but it seems like im just not getting it right.
There is various options
Use the guide they provide
https://kb.mediatemple.net/questions/1556/Migrating+your+websites+to+the+Grid#gs
When moving the files in this way the permissions of the files are not set properly and I would have to got back through them and figure out which ones need to change.
The database export from PHPMyAdmin also does not look the same it looks in the screenshot
Using InfiniteWP
To use InfiniteWP you must provide the url of the site and since I dont want to change the DNS until the site is moved this option does not seems to be ideal.
This option might work if its ok for the sites to be unavailable for a day or so while the DNS resolves...
But I don't want the sites to be unavailable
Using Mediatemples "one click apps" to install wordpress and then moving only the files that are unique to the site from the old host to the new host.
I would like to use this option
I think that the content of the WP-Content folder needs to be moved that the database needs to be moved.
My question is
- what folders and files in a standard wordpress install typically hardly ever changes from one site to the other.
- can I use the wordpress database export and import function to move the database from one site to the other.
Any help will be appreciated
Thank you
With InfiniteWP, you can use the clone an existing site command (which can be found in "Tool"->"Install / Clone WP") to migrate a site to a new server.
You have to use a temporary (sub)domain pointing to the new server.
To answer your questions :
/wp-content/ stores all your files and sometimes plugin files, wp-config.php is where your configuration is stored (e.g. credentials to access the database). Depending on your servers, the .htaccess files may be different.
I would recommend to create a dump file of your entire database using phpMyAdmin.
I'm thinking about moving one of my clients mysql db to Rackspace could databases. Application is using Cakephp.. I would like to know if someone has experience doing so or will this work just by editing host/user/pass in the database.php file?
I havn't done so but Rackspace has a tutorial about doing so :
http://www.rackspace.com/knowledge_center/article/installing-cakephp-on-cloud-sites
It seems pretty simple, so you should not have any problems
Steps for cake
Locate the .htaccess file in the content directory. After "RewriteEngine on", add a new line with "RewriteBase /" to the .htaccess file and save the file back to the site. You will need to repeat this step for the rewrite rules in the .htaccess files in the app and app/webroot directories.
Load the site in your browser. You will notice several warnings concerning the installation. The first warning will be the following: Notice (1024): Please change the value of Security.salt in app/config/core.php to a salt value specific to your application [CORE/cake/libs/debugger.php, line 556].
Open app/config/core.php file and search for Security.salt. Change its value to whatever characters or string you would like, then save and close the file.
In the app/config/directory in FTP, rename the database.php.default file to be database.php.
Open app/config/database.php and scroll down to the bottom of the page to find the database connection information. Enter your database host name, user name, password and hostname, then save and close the file.
Reload your site in your browser.
I developed a small cakephp website on local machine. When I upload to my host server, I realize that I must use their prefix for the database name and database user. So, I go and create new database name and new user. When I visit the site, it has this:
Warning (2): mysql_connect() [function.mysql-connect]: Access denied for user 'old_name'#'localhost' (using password: YES) [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
I am 100% sure, I already change the name to "new_name", it runs on my local machine, but I dont know why it still load the old name. I go to ftp, and download the database config file, it clearly stated that, the database user is "new_name", i dont understand why when I go to the site, it loads the old database config. I am new to cakephp, please help.
try to clear the files from your app/tmp directory and tripple check the configuration.
Sometimes it can take a while for files to become live. One host I use has a folder for upload and then they transfer to the live folder from there automatically. Could it be something like this?
You possibly need to specify an IP for the database instead of localhost. Often the database is hosted on a different server to the code.