Sync does not exist when run the update.php script - drupal

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

Related

drupal 7 Configuration file location

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';

Openshift JBoss Logging

Hi I am deploying my spring application to Openshift Jboss AS. The problem is whereever i placed the log4j.properties it is not read by the application. I've tried the following ways to achieve this but can't.
Placed my log4j.properties in WEB-INF/classes.
Placed my log4j.properties in WEB-ING/resources and in web.xml loaded the
context-param for log4jConfigLocation.
Created a
jboss-deployment-structure.xml in META-INF which excludes log4j
logging.
Nothing seems to work . Can some one please help me.
In Jboss there is a default logging available, which can be implemented by modifying standaole.xml.
In Openshift when you ssh into your app using the below command
rhc ssh <app-name>
You will taken into your application where when you give ls command you will see the list of files and folders, you can find jbossas folder change your working directory to that folder
cd jbossas
execute ls command you will see list of folders where you will find standalone folder, change your working directory to this folder
cd standalone
again execute ls command you can see configuration folder, change your working directory to this
cd configuration
now if you execute ls command you can see standalone.xml, we need to edit this file, but editing here may not work because this standalone.xml is a copy of the another file which is in the following folder .openshift/config/standalone.xml . You can find this folder where you clone your git copy, Not in eclipse go to your working directory in window.
We need to edit this file and add our logging properties here. thats how it works

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.

How to install site-specific modules in a Drupal 7 multi-site?

I have a "multi-site" installation of Drupal 7, which means that I have these folders in my "sites" folder:
all
domain.one
domain.two
domain.x
And in each of these folders, I also have "modules" and "themes" folders.
If I click the "install new module" link on the modules page ("admin/modules") from any domain X, Drupal tries to download modules in the "all/modules" folder instead of the "X/modules" folder.
Maybe I am not using the proper phrase to search in Google, but I do not see similar problems, so it may just be my problem.
How to install site-specific modules in a Drupal 7 multi-site?
You can try the example detailed out in this post: http://www.pixelclever.com/how-set-up-drush-for-multisite-installation which basically requires you to create a drushrc.php file for each multisite, which includes the path to the respective modules folder.
Here are the lines from that post that explain
To start, go to your drush folder where you will find a file entitled example.drushrc.php. Copy that file into the individual site folder in your Drupal multisite installation (sites/yourmultisite), and rename the file to drushrc.php.
Now open that file and add the following line:
$command_specific['dl']['destination'] = 'sites/yourmultisite/modules';
or
$command_specific['dl']['destination'] = 'sites/yourmultisite/modules/contributions';
This is also a step by step walkthrough of the updating process using drush on multisites.
http://rinen.net/2013/02/updating-a-drupal-multisite-using-drush/
I found good article for multisite install here,
http://mydons.com/drupal-7-multisite-install-steps-in-linux/
http://mydons.com/drupal-7-multisite-install-steps-in-windows/
This worked for me:
Changed working directory on terminal to specific site directory
i.e. "cd [drupal_site_directory]/sites/[site_one]/ "
use usual drush command to install modules i.e. "drush dl [module_name]"
Hope this might help you guys also.
.

Resources