Drupal – How to set up WYSIWYG with image uploader

last revised: Aug 13, 2014

 

1. Download this : http://drupal.org/project/wysiwyg
2. Download this: http://www.tinymce.com/download/download.php (you might need to add the version 3.x)
3. Go to the folder /sites/all/ (ftp)
4. Inside “all”, create a directory called libraries and upload the uncompressed tinymce folder into it
x5. Back to the Wysiwyg parameters.  Configuration / Wysiwyg profiles

5. Download this: http://drupal.org/project/imce

6. Download this: http://drupal.org/project/imce_wysiwyg

7. Enable all 3 modules

8. Go to Modules/Wysiwyg, click configure and add buttons (specially IMCE)

9. Go to Modules/IMCE and configure profiles to other users than the admin if u want.

10. Go to Home » Administration » Configuration » Content authoring » Text formats and add ” <iframe> <img> <p>” to the Filtered Html allowed tags.

Voilà, youtube and images with filtered html 🙂

How to fix: php mail() function not working in CentOS 6

If you’re using SELinux, it’s its fault.
To check:
#getsebool -a | grep mail
If you find this turned off:
httpd_can_sendmail –> on
Just permanently add the expection with:
#setsebool -P httpd_can_sendmail 1

If you’re using postfix instead of sendmail:
In your php.ini, comment out the “sendmail_path” and add this:
sendmail_path = /usr/sbin/sendmail.postfix -t -i

How to fix the error “500 OOPS: cannot change directory:/home/”

You need to allow the user home dir @ SELinux.

 

[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# getsebool -a | grep ftp
allow_ftpd_anon_write –> off
allow_ftpd_full_access –> off
allow_ftpd_use_cifs –> off
allow_ftpd_use_nfs –> off
ftp_home_dir –> off
ftpd_connect_db –> off
ftpd_use_passive_mode –> off
httpd_enable_ftp_server –> off
tftp_anon_write –> off
[root@localhost ~]# setsebool -P ftp_home_dir on

How to change the DocumentRoot in XAMPP’s Apache

I wanted to change the DocumentRoot from /opt/lampp/htdocs to /home/USER/Dropbox/www.

Just change this:

 

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
# User nobody
# commented out by lampp compatibility check
#Group nogroup
#Group nobody
User YOURUSERNAME
</IfModule>

 

and that:

 

DocumentRoot “/home/USER/Dropbox/www”
<Directory “/home/USER/Dropbox/www”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/trunk/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
# XAMPP
Options Indexes FollowSymLinks ExecCGI Includes

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
#AllowOverride None
# since XAMPP 1.4:
AllowOverride All

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>