drupal 7 Configuration file location - drupal

I am relocating Drupal 7 website from Pantheon to new hosting and need to configure Domain Access module. But I find some troubles.
Domain Access module gives me the error message:
Domain module installation is incomplete. See INSTALL.txt and check
your settings.php file.
Domain access failed to load during phase: bootstrap include. Please
check your settings.php file and site configuration.
So I put the string
include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';
to my /sites/default/settings.php file.
But it didn't do any effect. I tried different paths but got no result.
After I've found that my settings.php file have default database settings - not the ones that I've written when installing Drupal site.
So I have deleted setting.php and reinitialize Drupal site from web-browser */install.php. After it I've found newly created /sites/default/settings.php with wrong(default data) DB. And $drupal_hash_salt = ''; But site is working correct.
Additionally, I've changed Permissions to 777 and went to /admin/reports/status and found the row
Configuration file - Protected
It's very strange.
Can you help me solve this problem and find my Configuration file real location?

Usually Pantheon have different hosting structure from the conventional hosting/self-hosting solutions, first I would check the location of the contrib modules, sometime they are included in sub-directory called contrib, so once the system attempts to load
include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';
it will not find it, try to have it like the following might help:
include DRUPAL_ROOT . '/sites/all/modules/contrib/domain/settings.inc';

First step is to check if Domain module was enabled and get its path on linux :
$ drush pmi --fields=type,project,title,status,path --format=table|sort
Other way :
$ drush pm-list | grep domain
If your module was installed by drush , its path can be sites/all/modules/contrib/domain/settings.inc so you have to modify include path like :
include DRUPAL_ROOT . '/sites/all/modules/contrib/domain/settings.inc';

Related

Sync does not exist when run the update.php script

I reproduced demo NewsPlus Lite on my site http://druid888.mcdir.ru,but when I update Drupal core and run the update.php script I get the error:
Configuration directory: sync
The directory sites/default/files/config_2ds9Pl...-wAgFK.../sync does not exist."
Simply add an sync folder in an appropriate place on your filesystem, and add this line to your settings.php (or settings.local.php), e.g.:
$config_directories['sync'] = __DIR__ . '/sync';
Drupal will create appropriate directories during installation in your sites/default or sites/<sitename> folder.
Source: If you have just changed code at Drupal.org

Drush not recognizing drupal root folder

This one is driving me crazy.
Whenever i use "drush dl" to download site_audit or drupalgeddon it downloads these modules inside the drush home folder ( /users/[user]/.drush ) instead of the current sites modules folder.
the "drush status" and the "drush #site-alias status" command gives me the correct site information, see below:
C:\wamp\www\drupal>drush dl site_audit
Install location C:\Users\Thomas/.drush/site_audit already exists. Do you want
to overwrite it? (y/n): n
Skip installation of site_audit to [warning]
C:\wamp\www>drush #drupal status
Drupal version : 7.34
Site URI : localhost/drupal
Database driver : mysql
Database username : root
Database name : drupal
Default theme : garland
Administration theme : garland
PHP executable : php.exe
PHP configuration : C:\Users\Thomas.drush\php.ini
PHP OS : WINNT
Drush version : 6.0
Drush configuration :
Drush alias files : C:\Users\Thomas/.drush/aliases.drushrc.php
Drupal root : /mamp/htdocs/drupal
Site path : sites/default
File directory path : sites/default/files
Also, when i try to download a module that already exist in the current sites modules folder it tells me so correctly. Same goes for the "en" command. I can also disable or uninstall modules successfully. Uninstalling does not remove the folder, tough.
The only thing i have noticed is that "drush configuration" does not show a path. However, i did copy the example file inside the .drush home folder AND one inside the sites/all/drush folder (i removed the 'example' from the filename off course).
Running windows 8 and tried both MAMP and WAMP with same results. I really hope someone can help me with this cause i am pulling my hair here.
Update:
I tested the dl command with other modules and they are downloaded to the correct folder. I cleared the drush cache several times. Yet site_audit and drupalgeddon keep getting downloaded to the wrong folder. I just don't get it.
Stupid me. These are both not modules but Drush extensions, hence the alternative download locations.
I think the real problem is, that you didn't specify the site-alias in your "drush dl" statement.
You run
drush #site-alias status
containing the site-alias, but
drush dl site_audit
without a sie-alias. I suppose you are in the drush folder, as drush downloads to the current folder, if no root folder is given explicitly or via site-alias.

"Unable to create directory wp-content/uploads" in wordpress?

I encountered this problem when I am trying to upload image files to my wordpress. I am using XAMPP on a Mac OSX Mavericks. I also upgraded to the latest wordpress version (3.8.1). I already tried the ff methods to solve this:
Method 1: I added the ff codes to the wp-config.php
define('UPLOADS', '/migsmarbella.com/wp-content/uploads');
define('WP_CONTENT_URL', 'http://migsmarbella.com/wp-content');
"migsmarbella.com" is the name of my wordpress folder.
Method 2: CHMOD the particular folder "migsmarbella.com" using Terminal Utility
sudo chown -R nobody:staff /applications/xampp/xamppfiles/htdocs/migsmarbella.com
Method 3: I also checked the "migsmarbella.com/wp-content" folder's permission settings (Right Click then "Get Info") which stated that "user" can read and write files, while "staff" and "everyone" can only read files.
Method 4: I unchecked the "Organize my uploads into month- and year-based folders" checkbox, then saved the setting changes inside Settings > Media.
Are there any better methods out there? Please help. Thanks.
P.S. Method 2 didn't work especially since it restricted my permission settings I have to undo the command I did by changing "nobody" into my mac's username.
Additional:
It seems this whole changing permission settings is getting more and more confusing. Can you guys give me the first step, the exact way to change permission settings of a folder in MAC? I tried to use Filezilla but I cannot find the command to chmod folders, at least in the Mac version.
First I'm using XAMPP for OS X 1.8.2-5 running the apache, mysql and ftp services, also the new wordpress 4.0, so I added this to my wp-config.php:
define('FTP_HOST', 'localhost');
define('FTP_USER', 'daemon'); /* check the user at XAMPP_dir/xamppfiles/etc/proftpd.conf */
define('FTP_PASS', 'xampp'); /* also the password is at XAMPP_dir/xamppfiles/etc/proftpd.conf */
define('FS_METHOD', 'ftpsockets');
define('FTP_BASE', '/XAMPP_dir/xamppfiles/htdocs/wordpress'); /* check/mod your path */
Also the ownership, hope this helps
After trying everything, I fount out this way to solve it which consisted in getting the actual username of the server. I wrote a small php script for this:
<?php
echo '<pre>';
$user = system('whoami', $retval);
echo '
</pre>
<hr />Ultima linea de la salida: ' . $user . '
<hr />Valor de retorno: ' . $retval;
?>
I ran it at http://localhost/wordpress/test.php and got the username daemon. I then changed the permissions to this user sudo chwon daemon -R wordpress and solved!
From your code you no need to define the path of your website as like migsmarbella.com Not sure why you targetting the path as with your site url? It take automatically of your corresponding site path you don't even put a path including your site url.
Your code of defining the path is not the correct way
define('UPLOADS', '/migsmarbella.com/wp-content/uploads');
define('WP_CONTENT_URL', 'http://migsmarbella.com/wp-content');
Correct way is as below.
Open up your wp-config.php file, located at the root of your WordPress installation, and add the following code
define('UPLOADS', 'wp-content/yourfoldername');
The codex specifies that it should be added before the line that says require_once(ABSPATH.’wp-settings.php’);.
If the directory that you are defining does not yet exist, WordPress will automatically create it as long as wp-content is writeable. Otherwise you can just go in and create the directory yourself via FTP. Make sure to make the new directory writeable.
Change upload organization
You can also change the way WordPress uploads are organized. Navigate to Settings > Media in the dashboard and you’ll find the option to check or uncheck the box next to “Organize my uploads into month- and year-based folders”.
The path you gave when doing chown is invalid. Paths are case sensitive.
Please also be aware there is a difference between chmod and chown.
Path should have been /Applications/XAMPP/xamppfiles/htdocs/migsmarbella.com
Run the following commands in terminal:
mkdir /Applications/XAMPP/xamppfiles/htdocs/migsmarblla.com/wp-content/uploads
sudo chown -R nobody:staff /Applications/XAMPP/xamppfiles/htdocs/migsmarblla.com/wp-content/uploads
The first creates an uploads folder since one doesn't already exist.
The second changes its ownership so folders can be created and files added by WP. Changing the ownership of the entire install will cause issues when you modify files. This only applies the change to the uploads dir.
In the recent version on xampp-7.2.6 in mac osx, the lampp process is running as daemon user.
And your wordpress folder might not have permissions to create the plugin folder in the directory. In order to resolve this issue, I changed the permissions of the webiste folder.
chmow daemon -R website
It worked.

Drupal Site Download : Not able to install site as-is

I recently downloaded a fully functional drupal(6) site using FTP. Though I installed the Drupal instance, I got the modules and the themes that were in the sites/all folder, but wasn't able to get the actual site configuration ( Configuration and Settings of those modules )
Any help in this regard would be greatly appreciated.
Assuming this is a follow-on of: Drupal Site install on localhost after downloading source using FTP
If you get the Drupal install screen when accessing a site you've just migrated to your localhost, it's likely because you're trying to access the site locally using a URI that's different than the remote site AND this URL does not fall within the directories that Drupal searches when looking for a settings.php file (see comments starting about line 20 in the default.settings.php file of the sites/default folder).
You have two options:
Option 1: Create a symbolic link on your localhost that points requests to your local URI to the directory hosting the live site. This would look something like this:
ln -s /path/to/webroot/sites/default/ /path/to/webroot/sites/mydevsite.dev
Option 2: Create a sites/sites.php file that maps URI's to the correct folder hosting your settings.php file. For example, you'd add this to sites/sites.php if you left your settings.php file in the sites/default folder:
$sites['mysite.dev'] = 'default';
$sites['www.mysite.dev'] = 'default';
$sites['mysite.com'] = 'default';
$sites['www.mysite.com'] = 'default';
Simply put, this translates into: "Serve sites mysite.dev, www.mysite.dev, mysite.com, and www.mysite.com from the folder located at sites/default."
I usually use the second option. It's more sustainable, OS independent, and can be committed to source control.
Update based first 5 comments:
You need to edit the .htaccess file in your Drupal install. Look for this section:
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
And do as it says, uncomment out the line and set it to your subdirectory.
Yes the steps are correct. Is it the design that is not coming or is the functionality of views missing? If its only the css that is not coming, then the issue could be that your theme is not getting applied. Check if the theme folder correctly exists, and disable/enable the theme.

WordPress update failing

I'm having a problem when trying to update WordPress to the latest version I get the following error:
Download failed.: Destination directory for file streaming does not exist or is not writable.
Installation Failed
I'm also having the same problem when uploading images, it fails and gives the following error
has failed to upload due to an error
The uploaded file could not be moved to "the website path and then uploads directory"
I have checked the permissions of the folders and the folders themselves are set to 755 & the files inside them set to 644.
Could anyone tell me why it would be doing this?
Where running a plesk server.
Thank You,
Mark
Are there any more error messages, probably also in the servers log files? Probably the download for the update should be done to /tmp and you are not allowed to store files there? Try setting the constant WP_TEMP_DIR which should change the directory. Put something like this in your wp_config.php:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
The permissions you're using seem reasonable, but they will only work if the FTP user that WordPress is using (set in your wp_config.php file) is the same as the owner of those files/folders.

Resources