Add mod_mysql, mod_xml and mod_zlib to apache - mysql

I was in the process of Anahita installation - a platform for social networking. In its requirements there is a line which says:
Apache 2.0+ (with mod_mysql, mod_xml, mod_zlib) or Nginx
You can find its main website here and its installation guide here
I installed apache2 (ubuntu 14.04) but when I go to /etc/apache2/mods-available there are no mod_mysql, mod_xml or mod_zlib.
how should I add these modules to apache?
I couldn't find them in modules.apache.org

When they talk about "mod_mysql, mod_xml, mod_zlib" they are not talking about Apache modules but rather about php extensions also sometimes called modules. Go to php.ini and enable mysql, xml-rpc and zlib. Depending on your platform and php distribution you may need to download correct libraries and configure the PATH to your php and mysql.

Related

How to install the DAML SDK in a Ubuntu VM, which doesn't have the internet connection?

Unable to install the "da-cli-114-7582c1a0bd-linux.run" file in my Ubuntu VM. The setup is failing while checking the latest version check.
I have downloaded the latest DAML SDK setup file "da-cli-114-7582c1a0bd-linux.run" and copied the same into my Ubuntu VM through local network connection. When I try to install the .run file, the setup trying to connect to the internet for latest version check. But I am not allowed to use internet in the application servers/VMs. Because of this restriction the setup is getting failed and I am unable to complete the DAML SDK installation.
Is it possible to get the DAML SDK setup as a .tar file? If we have tar file, then it will be easy to complete the setup manually.
Installing the SDK using the .run files in an environment without an internet connection is not easy. It might be possible to install it in an environment with internet and then tar up the folder ~/.da, extract it back into place in the VM and put ~/.da/bin.
However, there is a new SDK assistant in the works (called daml, not da), which can be installed using curl -sSL get.daml.com | sh. If you look at the content of the installation script, you can see that all it really does is downloading a tar-ball from GitHub releases, un-tars it and calls an install.sh script within. That's probably the easier way to get the SDK into an offline environment at this point.
However, the documentation for the new daml assistant is not on docs.daml.com yet. It will be shortly, but in the meantime you can read it on GitHub.

Configuring apache 2.4 with php 5.6.32 configuring with source in linux

I have installed httpd 2.4, downloaded .tar.gz and configured as:
./configure --with-apr=/tmp/apr-1.6.3 --with-apr-util=/tmp/apr-util-1.6.1 --enable-so && make && make install (my apr and apr-util are at /tmp location)
also I have installed php 5.6.32, downloaded tar.gz and configured as:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-fpm && make && make install
Problem is I am unable to add the fpm handler, any direction what should I do.
Should I proceed with how its described in redhat developer guide or apache wiki for FPM
Thanks in advance and correcting me, if I am doing some/lots of thinh wrong :)
Why trying to build from sources when binary packages exists in various repositories ?
Yes the PHP Configuration Tips gives you correct way to use FPM (as the Apache wiki in the SetHandler way).
The linked howto is for CentOS 7, but works for CentOS 6 using the httpd24 Software Collections.
Alternative solution is to use a 3rd party repository, such as "remi", see the Wizard instructions.

How can I test my locally stored webpages?

I have my HTML pages locally stored on my Mac. I already bought the domain and the hosting service. There's a way with which I can test these local webpages so that I can see how they render on different devices? I have heard about local server for testing or using devices via USB attached to the PC. Is there not a more standard and unified way to testing them? It can be everything (software, online services, ...) I'm not interested in emulators/simulators.
If you have only html and/or Javascript code:
Open it with your browser, it will be enough
If you have PHP code:
Install a local web-server (Ex: Apache)
If you have MySQL code:
Install a MySQL server
Usually, installing Mamp (or an equivalent for Android/iOS) is enough to do every basic things. It will provide you SQL and PHP server
Hope it helped you
Creating a local server: Node.js and BrowserSync
I've found a very simple way to test webpages (in my case, HTML5 pages) that are saved in PCs memory so that we could test them directly into all the different devices available, without using simulators/emulators.
The solution is creating a local server using two great totally free tools: Node.js and BrowserSync. Before writing this answer, I tried this solution on my own, and I was completely satisfied of the result! You can find the source for this answer at JavaScript Kit.
Here you are the main steps:
Install Node.js (verify if Node.js is correctly installed with the node- v command from the terminal);
Install BrowserSync using npm install -g browser-sync directly from the terminal. Be careful you need root permissions (I simply used sudo npm install -g browser-sync);
Run BrowserSync:
Navigate to your target directory (the one which contain the static files used to create the website, that's the HTML (and CSS) files) using the command line (to make an example, it could be cd folderA/folderB);
Create a local server inside that directory, with browser-sync start --server.
These are the main steps, but you can directly read the solution from the original source I linked some lines before.

phpstorm cannot find class ZMQContext

Hi I'm creating project according to Tutorial on Ratchet website.
I installed zeromq version 0.3.0 through composer in phpstorm.(I checked if I installed right zeromq with phpinfo() and also with php-m in terminal)
In file post.php I cannot create new object of class ZMQContext(). - php storm cannot find this class.
I found the same issue on stackoverflow but solution is for linux.I'm using win.
When I want to use this in code: use React\ZMQ. - I don't see there class ZMQContext
Thanks for answer.
You can get PHPStorm to auto-complete code that uses the ZMQ PHP extension.
Save this stub file: https://gist.github.com/Mikulas/c22e44a918c7af5de5e6
I saved it (on OSX) under /Applications/PhpStorm EAP.app/Contents/plugins/php/lib/extensions/zmq.php
Then go to PHPStorm > Preferences > Languages & Frameworks > PHP > include path and add that extensions folder.
Now go back to your file and you'll see PHPStorm auto-completing stuff from the ZMQ extension.
Have fun! I hope you'll find this useful.
It looks like you've installed the PHP PECL extension. You also need to install the ZeroMQ library on your system that ext-zmq will use. If you're an a Debian based system try sudo apt-get install libzmq-dev or a RH based system sudo yum install zeromq zeromq-devel.

about mysql installation in a LAMP environment

When I build a LAMP environment in ubuntu-12.10,
first I installed mysql by mysql-5.5.12.tar.gz,but it told me that it can not find configure
file,it was here:
root#tryandchange-QTH6:/usr/local/src# cd mysql-5.5.12
root#tryandchange-QTH6:/usr/local/src/mysql-5.5.12# ./configure --prefix=/usr/local/mysql
bash: ./configure: 没有那个文件或目录(not exists the document or the file)
who can tell me why?Or tell me that a good way to build a LAMP environment,
but not 'apt-get install'.
XAMPP has downloadable Linux binaries, you just download, extract and run /path/to/xampp/xampp start - I'd recommend those as the easiest way to set up a LAMPP stack.
Link to XAMPP for Linux
Obviously by eschewing the use of apt, you are working with the knowledge that your apache/php/mysql will become obsolete and you will have to work to keep them secured and up-to-date.