What is the basic file structure for Drupal 7 and where do the sites files go? - drupal-7

I need to move a Drupal site. I was provided three zip files:
code.tar.gz
db.tar.gz
files.tar.gz (this is images and a few CSS files)
Does the content of the "files" go inside the code structure somehow (maybe in /sites)? Or does the contents of the code and files get dumped in the root folder? I don't know why they gave me separate files.
I am not experienced with Drupal and tried putting it all into the root, but it's throwing an error and I thought I'd better check the structure first. The site isn't live yet. Just trying to connect it all.
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost' (using password: YES) in lock_may_be_available() (line 167 of /home/xxx/public_html/includes/lock.inc).

I guess you could give a look to Drupal directory Structure's guide on their website.
It should provide you all the knowledge to warmup your project

Related

Migrate files from drupal 7 to drupal 8

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

Can i use a centralized external config file for c#?

I found an article on using external config files here. While I was able to extract my config settings, I was unable to put them in a central location.
When i tried to do something like this:
<connectionStrings configSource="C:/dev/Configs/ConnectionStrings.config" />
It causes a type initializer exception. If i put the file in a folder under the bin directory, it's ok. Problem is, I want to keep the config files central to all apps so i can reuse it in a lot of places.
Is it just not doable?
I ended up using Symbolic Links. I created a subfolder under each app that symlinked back to the master config folder. All apps share the same Connection Strings now.

404 Error when copying Orchard CMS

I have one knowingly good site. It works as expected. I copied all the files from that one directory to a new directory. I created a new website with the correct host header and pointed it to the new directory. When you browse to the new site you get a 404 error.
I have checked the file permissions. I have even made the two sites share the same app pool.
Any suggestions would be helpful.
If you look in /App_Data/Logs you can see the error message. As it turned out for me, it was because I was trying to run the same "tenant" twice on the same server.

symphony datasource error

When creating a data source that pulls from any of my sections and pressing "create data source", I get the following error:
Forbidden
You don't have permission to access /symph-page/symphony/blueprints/datasources/new/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Strangely, if I pull from the system or provide custom xml, the data source is created fine and I don't get the previous message. Running symphony 2.3 on server that should be meeting the technical requirements. I have run Symphony before and never encountered this sort of issue.
It sounds like you need to change the workspace/data-sources directory file permissions so that the web server user can write files into it.
For example, on a Linux server (777 may not be necessary and depends on your webserver's configuration):
chmod 777 /symph-page/symphony/blueprints/datasources
If you access the server via FTP, your FTP client will probably let you do this.
Edit: Re-reading your question, I think I was mistaken in saying this is a workspace writing permissions issue. I don't recognise the "blueprints" directory path. Does this directory exist within your installation, and does your webserver have read permissions?
You might also want to make sure that you .htaccess file is present.

Cakephp loads old database config file

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.

Resources