Technical issues faced during development

This page contains all technical issues faced during development of ezTask web components and its resolutions.

Deleting a file in Ubuntu does not allow, even root user too.

The solution is

chmod ugo+w filename

this failed – then:

chattr -i -a filename 

which was accepted – then

chmod ugo+w 

which was accepted

rm filename

wsgi module integration with python in virtual environment

Make sure python is installed with shareable on

Download python source

cd Python-3.5.0

./configure –enable-shared             –prefix=/usr/local             LDFLAGS=”-Wl,–rpath=/usr/local/lib”

Build wsgi using virtualenv python

Download wsgi source

cd mod_wsgi-4.6.2

./configure –with-python=/home/rbaisak/pyeztask1/bin/python3.5

sudo make install

And finally in wsgi.cnf file

WSGIPythonHome /home/rbaisak/pyeztask1/

WSGIPythonPath /home/rbaisak/pyeztask1/bin:/home/rbaisak/pyeztask1/lib/python3.5/

# create new app

WSGIScriptAlias /pyeztaskweb/ /var/www/pyeztaskweb/

in httpd.cnf, you can specify directory

<Directory “/var/www/pyeztaskweb”>

   Order allow,deny

   Allow from all

</Directory>

Start wsgi with own daemon process

If you want to start wsgi with own daemon process and virtual environment, then please make following changes in yours config file. I prefer to make changes in httpd.cnf file

WSGIDaemonProcess pyeztaskweb(project name) user={different than root who can access your virtual env} group={different than root who can access your virtual env} processes=2 threads=25 python-path=/var/www/pyeztaskweb/{your app path} python-home={virtual env home}
WSGIProcessGroup pyeztaskweb
WSGISocketPrefix run/wsgi //This is the location of socket file to be created

WSGIScriptAlias /pyeztaskweb /var/www/pyeztaskweb/test_wsgi.py process-group=pyeztaskweb application-group=%{GLOBAL}
WSGIScriptAlias /summarizer /var/www/pyeztaskweb/summary_wsgi.py process-group=pyeztaskweb application-group=%{GLOBAL}
WSGIPythonPath {refer above}

<Directory “/var/www/pyeztaskweb”>
Order allow,deny
Allow from all
</Directory>

Refer StackOverflow post