I read moodles documentation where it says that if the data root directory has to be in the site's public html folder ( Please see that i can not create it outside it since i dont have sufficient privileges as i am using a free account ). then you have to chmod it to 770 and also use htaccess to protect it.
Now i am creating the moodle inside my domain at folder /moodle/
and moodle uploads folder is /moodle-uploads/uploads/
and i have an .htaccess setup in /moodle-uploads/.htaccess
where its contents are
order deny,allow
deny from all
as specified on
http://docs.moodle.org/20/en/Creating_Moodle_site_data_directory
But still when i run the auto installer script it says the data root directory is not secure
This is not the best way of doing it but coding hack to just get rid of this error if you like try it..,
in moodle root go the install.php and if you are using 2.6 in line 341 or others versions search for is_dataroot_insecure() function and change it to false in the else if condition and try to install again,and that it..,
By default its going to give you warning for having it in the public html folder as according to the docs in the link you also provided.
Remember that by default moodle will issue a warning about moodle data
directories created inside the web directory, but otherwise this
directory can be located where you wish. You can later move or change
the location of this directory, but if you do, be sure to edit the
setting in the config.php file that sets this; e.g. if moodledata is
under a directory called data, then it would look like this:
As long as you have configured the dataroot location with the moodle data directory and placed your .htaccess file in that folder it should be fine.
i'm using moodle 2.4.1 and had a some problem. the solution open install.php file and search for statment
} else if (is_dataroot_insecure()) {
and disabled.
it's work for me
Related
I have installed the plugin 'Advanced Search Plugin Like Facebook Search' of younet and I noticed the error that application/modules/Core/externals/scripts/ynadvsearch.php is not found.
Then I checked the location and the file was there. So I uploaded a test.php file and typed the url in address bar then also I could not access the test.php page. But I am able to access all the js pages on that folder.
I have deleted the htaccess file of external folder. But the issue remains the same.
How can we fix this?
It's a little weird, usually /externals/scripts folder is used only for javascript-files (and all php-files - inside of /controllers folder).
File .htaccess inside of /externals folder contains a rule
<FilesMatch "\.avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">`
It means that *.php files are not allowed for access inside of this folder.
PHP programmer here. Boss wants me to create multiple wordpress websites that are symlink'ed back to a single parent wordpress directory. Each website resides in a separate Linux user account. In other words, one parent, many children copies, all residing in different /home/ accounts. I need help with my symlink strategy...
So far, for each new linux web account,
install the database
sed replace config values into a temp config file
mysql insert some config data
symlink????
a. every wordpress file ??
b. the entire public_html directory ??
If I alter the parent wordpress PHP code, I can place a "real" copy of the config file in the child user directory, above the symlinked public_html. So, I need only use one child symlink to the parent's public_html directory. BUT, apache returns a 500 error. How do I set up the permissions?
Permissions are the issue. Would chgrp work? Which group? What file mode? Or would I need to create a special group to accommodate the apache user, nobody?
Any help would be greatly appreciated. Code samples welcome :)
Problem's Cause (paranoid security, "switch-user" blocking):
PHP 5 Handler suphp
Suexec on
Problem's solution (DSO):
PHP 5 Handler dso
Suexec off
Performance optimization, added +FollowSymLinks at httpd.conf LINE 75:
<Directory "/">
Options All +FollowSymLinks
AllowOverride All
</Directory>
Each linux user must have a wp-content directory and a wp-config.php file. Don't forget to set writing permissions to the wp-content directory.
You can symlink the rest of the wordpress files to the global wordpress ones.
The global wordpress files must not be writable by the linux users.
This is very possible to do. I have actually written a detailed post explaining the process of symlinking the WordPress directory.
Basically the idea is to replace the wp-config.php file.
Download the repo for WordPress from github with this you can switch to newer or older version of WordPress with a simple command. "git checkout 3.7-branch"
Here is the complete set of instructions:
http://www.htmlgraphic.com/symlinking-wordpress-core-files-wordpress-skeleton/
I'm new to Twig and was wondering where I should place the Twig /templates directory.
I'm using composer and placing the /templates in the root directory where the index.php is and it gives me the following error message :
Message: The "/templates" directory does not exist.
File: /home/teo/SERVER/public_html/JSON_FOLDER/JSON2/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
Generally you put it anywhere not within your web root, that's the best practice. But if you have no access anywhere else, then the web root will have to do.
I'm not completely familiar with composer, but you'll probably want to specify a path that is relative to your web directory instead of an absolute directory like you've done already. That error shows that its trying to find a templates path in your server ROOT directory which is almost never going to be where you actually want it. Try just removing the leading slash in your config.
I have a site http://www.gingerlily.fr
i copy those file and create sub directory on root called test and uploaded the file to it
duplicated db and apply update for all base url db and other configurations. (http://www.gingerlily.fr/test)
but the problem is when i access http://www.gingerlily.fr/test
site i always show root urls and other js and images loads from root magento installation. i try a day for thi but no luck.
can anyone help me for this something wrong with httacess file or any other wrong with this ?
thank you
I have seen your http://www.gingerlily.fr/. Correct me if i am wrong your trying to duplicate your site to test directory. But in magento your can't copy and duplicate site like PHP /Html here your files of magento site need to be first install and you can replace your module and theme files.
My Goal
I want to modify wordpress project as per my needs. I also want to record the code difference i made in the project. That is my goal.
This is what i done so far
I installed recent version of tortoisesvn.
I'm using windows 7 and i have installed wampserver too
I created a folder called wordpress in C:/wamp/www
So C:/wamp/www/wordporess is now the absolute path of my
wordpress directory. I can able to access it via
http://localhost/wordpress
I right clicked on the wordpress directory and created checkout
using this repository url http://core.svn.wordpress.org/trunk/
Everything successful so far. I'm so confused about the next step
When i right click wordpress and open repository browser it actually list everything from http://core.svn.wordpress.org/trunk/ But i need an environment like trunk,tags,branches in my local directory. I tried by creating checkout on a empty directory(test) by applying url like http://localhost/test but i see some error like redirect cycle detected for url http://localhost/test
Can anyone help me? Thanks
In that case you need to do the checkout from the root and not from the trunk
like http://core.svn.wordpress.org
Advise you to read word press documentation for detail how they are maintaining there structure and other things.
Wordpress-Using_Subversion
Updating_WordPress_with_Subversion
I'm running into the same problem as well.
After some experiments I think it should be caused by following procedure:
( if test is a directory under your web root )
svn client remove the trailing slash for some reason. so for example if you type svn list http://localhost/test/ then the actual request url will be http://localhost/test ( no trailing slash! ).
The http server receive this request and found that test is not file but a directory. so it will send a redirect response to tell client to visit http://localhost/test/ ( has slash) .
the svn client go on step 1 so that finally causing infinite redirect loop....
You can try another non-exist directory like 'nonexist' or a file file to test as well which will returen "Unable to connect to a repository at URL 'http://localhost/nonexist' ..."
This can be fixed on the server side in Apache by setting DocumentRoot to something other than the path containing the SVN repositories (preferably an empty directory).