<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mssql &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/tag/mssql/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Sat, 03 Jul 2021 16:20:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>PHP 7 on CentOS 7 with PHP-FPM</title>
		<link>https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm-2/</link>
					<comments>https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm-2/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Sun, 07 Jun 2020 20:46:37 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 5.6]]></category>
		<category><![CDATA[PHP 5.6.3]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[systemd]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=1053</guid>

					<description><![CDATA[<p>Most of the yum repositories don&#8217;t include PHP7.0.X on current releases for the time being. So if you need PHP7.0.X, you need to compile and build it for your self. I decided to put all required packages to the compilation, so most probably you wouldn&#8217;t need additional packages, just a quick tip, if you need [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm-2/">PHP 7 on CentOS 7 with PHP-FPM</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most of the yum repositories don&#8217;t include PHP7.0.X on current releases for the time being. So if you need PHP7.0.X, you need to compile and build it for your self. I decided to put all required packages to the compilation, so most probably you wouldn&#8217;t need additional packages, just a quick tip, if you need additional packages you can install via pecl or pear tools.</p>
<h3>Which PHP configure options should I use before compiling?</h3>
<p>If you ever need to get the list of modules installed in your current PHP, type the following command via console:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">php -m</pre>
<p>So, take a list of your current configuration and check the configure list below in order to have a compatible compilation to your existing older version of PHP.</p>
<p>Advice: First of all, you should consider removing PHP packages from your server before compiling PHP, but be aware your codes will be visible till you install the compiled version to your server, consider shutting down your apache server for a while.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">yum erase php*</pre>
<p>Before downloading the code, install &#8220;Development Tools&#8221; by typing:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">yum groupinstall "Development Tools"</pre>
<p>and install other related header files:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum install wget httpd-devel libtool-ltdl-devel libxml2-devel \
bzip2-devel net-snmp-devel openssl-devel pcre-devel \
curl-devel gd-devel mysql-devel libxslt-devel \
postgresql-devel gmp-devel systemd-devel</pre>
<p>Download &amp; install libmcrypt</p>
<pre class="brush: shell; gutter: true; first-line: 1">cd /usr/src
wget http://downloads.sourceforge.net/project\
/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
tar zxvf libmcrypt-2.5.8.tar.gz 
cd libmcrypt-2.5.8
./configure -libdir=/usr/lib64
make
make install</pre>
<p> </p>
<p>Download &amp; extract PHP 7.0.4 release:</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget http://php.net/get/php-7.0.4.tar.gz/from/this/mirror
mv mirror /usr/src/php-7.0.4.tar.gz
cd /usr/src/
tar zxvf /usr/src/php-7.0.4.tar.gz 
cd php-7.0.4
./configure \
 --with-apxs2 \
 --with-curl=/usr/local/lib \
 --with-config-file-path=/etc \
 --with-config-file-scan-dir=/etc/php.d \
 --with-pic \
 --with-gd \
 --with-gettext \
 --with-jpeg-dir=/usr/local/lib \
 --with-freetype-dir=/usr/local/lib \
 --enable-sockets \
 --with-kerberos \
 --with-openssl \
 --with-mhash \
 --with-mcrypt=/usr/local/lib \
 --with-mysqli=/usr/bin/mysql_config \
 --with-pdo-mysql=/usr \
 --with-pdo-pgsql=/usr \
 --with-pcre-regex=/usr \
 --with-pear \
 --with-gmp \
 --with-pgsql \
 --with-png-dir=/usr/local/lib \
 --with-xsl \
 --with-zlib \
 --with-zlib-dir=/usr/local/lib \
 --with-iconv \
 --with-libxml-dir=/usr \
 --enable-bcmath \
 --enable-calendar \
 --enable-exif \
 --enable-ftp \
 --enable-gd-native-ttf \
 --enable-soap \
 --enable-sockets \
 --enable-mbstring \
 --enable-zip \
 --enable-wddx \
 --enable-shmop \
 --with-libdir=lib64 \
 --disable-debug \
 --with-bz2 \
 --enable-gd-native-ttf \
 --enable-xml \
 --with-snmp=/usr \
 --enable-json \
 --with-fpm-user=apache\
 --with-fpm-group=apache\
 --enable-fpm \
 --with-fpm-systemd
</pre>
<p>Make &amp; Install by typing:</p>
<pre class="brush: shell; gutter: true; first-line: 1">make
make install
cp php.ini-production /etc/php.ini
</pre>
<p>Run the following to enable systemd service for PHP:</p>
<pre class="brush: bash; gutter: true; first-line: 1">cat &lt;&lt;&lt; '
[Unit]
Description=The PHP FastCGI Process Manager - VeriTeknik
After=syslog.target network.target

[Service]
Type=notify
PIDFile=/var/run/php-fpm.pid
ExecStart=/usr/local/sbin/php-fpm --nodaemonize \
--fpm-config /etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target
' &gt; /usr/lib/systemd/system/php-fpm.service
systemctl enable php-fpm
</pre>
<p>Get rid of obsolete settings:</p>
<pre class="brush: shell; gutter: true; first-line: 1">sed -i 's#;date.timezone =.*#  date.timezone = "Europe/Istanbul"#' /etc/php.ini
sed -i 's#upload_max_filesize =.*#upload_max_filesize = 200M#' /etc/php.ini
sed -i 's#post_max_size =.*#post_max_size = 200M#' /etc/php.ini
cat &lt;&lt;&lt; ' include=/etc/php-fpm.d/*.conf [global] pid = \ 
/run/php-fpm/php-fpm.pid error_log = /var/log/php-fpm/error.log \
daemonize = no ' &gt; /etc/php-fpm.conf
mkdir /etc/php-fpm.d
</pre>
<p> </p>
<p>You need to create the appropriate user account the fpm process will run on, as a sample, we use <strong>plugged</strong> as a user:</p>
<pre class="brush: shell; gutter: true; first-line: 1">useradd plugged
chmod 755 /home/plugged</pre>
<p>create the php-fpm process config for the specific site:</p>
<pre class="brush: shell; gutter: true; first-line: 1">cat &lt;&lt;&lt; '
[www]
listen = 127.0.0.1:9001
 
listen.allowed_clients = 127.0.0.1
listen.owner = plugged
listen.group = plugged
user = plugged
group = plugged
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35

slowlog = /var/log/php-fpm/www-slow.log
 
catch_workers_output = yes
 
php_admin_value[error_log] = /home/plugged/logs/mphp_error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /home/plugged/session
' &gt; /etc/php-fpm.d/plugged.conf

mkdir /run/php-fpm/
mkdir /var/log/php-fpm/
touch /var/log/php-fpm/error.log
mkdir {/home/plugged/logs/,/home/plugged/session}
chown -R plugged:plugged /home/plugged
systemctl start php-fpm
sed -i 's/DirectoryIndex index.html.*/  DirectoryIndex index.html index.html.var index.php/' /etc/httpd/conf/httpd.conf</pre>
<p>please let us know if you find any mistake</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm-2/">PHP 7 on CentOS 7 with PHP-FPM</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1053</post-id>	</item>
		<item>
		<title>PHP 7 on CentOS 7 with PHP-FPM</title>
		<link>https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm/</link>
					<comments>https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Wed, 18 Sep 2019 20:57:42 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 5.6]]></category>
		<category><![CDATA[PHP 5.6.3]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[systemd]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=1076</guid>

					<description><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP7.0.X on current releases for the time being. So if you need PHP7.0.X, you need to compile and build it for your self or you need to add additional repos to yum, which will be much more easier and much more flexible to update later. So, on a [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm/">PHP 7 on CentOS 7 with PHP-FPM</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP7.0.X on current releases for the time being. So if you need PHP7.0.X, you need to compile and build it for your self or you need to add additional repos to yum, which will be much more easier and much more flexible to update later. So, on a clean installed server proceed with the installation of Epel and Remi repos, in case you don&#8217;t have wget, also install it:</p>
<pre class="brush: bash; gutter: true; first-line: 1">yum install epel-release
yum install net-tools, bind-utils # optional life savers 
rpm -Uvh http://mirror.veriteknik.net.tr/remi/enterprise/remi-release-7.rpm
yum install php70-php-fpm php70-php-cli php70-php-gd php70-php-json \
php70-php-mbstring php70-php-mcrypt php70-php-mysqlnd php70-php-xml
yum install nginx</pre>
<p>&nbsp;<br />
Please note that if you need additional PHP packages, you can search them with the following command:</p>
<pre class="brush: bash; gutter: true; first-line: 1">yum list php70-*
#Available Packages
#php70-php-opcache.x86_64
#.
#.
#php70-php-pecl-crypto.x86_64
#php70-php-pecl-geoip.x86_64 
#php70-php-pecl-imagick.x86_64
#php70-php-pecl-memcache.x86_64
#php70-php-pecl-xdebug.x86_64
#php70-php-pgsql.x86_64
#php70-php-soap.x86_64
#php70-php-xmlrpc.x86_64
#..
# and to install a package you desire, type the name:
yum install php70-php-pgsql
</pre>
<p>Run the following to enable systemd service for PHP-FPM:</p>
<pre class="brush: bash; gutter: true; first-line: 1">systemctl enable php70-php-fpm
systemctl enable nginx</pre>
<p>Disable SELINUX, set to disabled:</p>
<pre class="brush: bash; gutter: true; first-line: 1">vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
<strong>SELINUX=disabled</strong>
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted</pre>
<p>type SHIFT+ZZ to save and exit, and for the time beign type setenforce 0 to disable SELINUX temproray.<br />
Next step is to get rid of obsolete settings:</p>
<pre class="brush: shell; gutter: true; first-line: 1">sed -i 's#;date.timezone =.*# &nbsp;date.timezone = \ 
"Europe/Istanbul"#' /etc/opt/remi/php70/php.ini
sed -i 's#upload_max_filesize =.*#upload_max_filesize = \
200M#' /etc/opt/remi/php70/php.ini
sed -i 's#post_max_size =.*#post_max_size = \
200M#' /etc/opt/remi/php70/php.ini

</pre>
<p>You need to create the appropriate user account the fpm process will run on, as a sample we use <strong>plugged</strong> as a user:</p>
<pre class="brush: shell; gutter: true; first-line: 1">useradd plugged
chmod 755 /home/plugged
mkdir /home/plugged/{logs,public_html,session}
touch /home/plugged/logs/{mphp_error.log,php-fpm-slow.log}
chown -R vtt:vtt /home/plugged/public_html/</pre>
<p>create the php-fpm process config for the specific site:</p>
<pre class="brush: shell; gutter: true; first-line: 1">cat &lt;&lt;&lt; '[plugged] 
listen = 127.0.0.1:9001
listen.allowed_clients = 127.0.0.1 
listen.owner = plugged 
listen.group = plugged 
user = plugged 
group = plugged 
pm = dynamic 
pm.max_children = 50 
pm.start_servers = 5 
pm.min_spare_servers = 5 
pm.max_spare_servers = 35 
slowlog = /home/plugged/logs/php-fpm-slow.log 
catch_workers_output = yes 
php_admin_value[error_log] = /home/plugged/logs/mphp_error.log 
php_admin_flag[log_errors] = on 
php_value[session.save_handler] = files 
php_value[session.save_path] = /home/plugged/session ' \
&gt; /etc/opt/remi/php70/php-fpm.d/plugged.conf
</pre>
<p>Turn on PHP-FPM by typing:</p>
<pre class="brush: shell; gutter: true; first-line: 1">systemctl start php70-php-fpm.service
</pre>
<p>If it fails to start, you can check the logs by typing<br />
systemctl status php70-php-fpm.service</p>
<p>Also please check the service is running by typing netstat so if the port is open, you should see that:</p>
<pre class="brush: shell; gutter: true; first-line: 1">netstat -tulpn | grep php-fpm
#tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      908/php-fpm: master 
#tcp        0      0 127.0.0.1:9001          0.0.0.0:*               LISTEN      908/php-fpm: master 
</pre>
<p>please let us know if you find any mistake</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm/">PHP 7 on CentOS 7 with PHP-FPM</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/php-7-on-centos-7-with-php-fpm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1076</post-id>	</item>
		<item>
		<title>PHP 5.4.44 on CentOS 6.7</title>
		<link>https://www.veriteknik.net.tr/en/php-5-4-44-on-centos-6-7/</link>
					<comments>https://www.veriteknik.net.tr/en/php-5-4-44-on-centos-6-7/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Mon, 31 Aug 2015 23:53:03 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 5.6]]></category>
		<category><![CDATA[PHP 5.6.3]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=1011</guid>

					<description><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP5.4.X on current releases for the time being. So if you need PHP5.4.X, you need to compile and build it for your self. I decided to put all required packages to the compilation, so most probably you wouldn&#8217;t need additional packages, just a quick tip, if you need [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-5-4-44-on-centos-6-7/">PHP 5.4.44 on CentOS 6.7</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP5.4.X on current releases for the time being. So if you need PHP5.4.X, you need to compile and build it for your self. I decided to put all required packages to the compilation, so most probably you wouldn&#8217;t need additional packages, just a quick tip, if you need additional packages you can install via pecl or pear tools.</p>
<h3>Which PHP configure options should I use before compiling?</h3>
<p>If you ever need to get the list of modules installed in your current PHP, type the following command via console:</p>
<pre class="brush: bash; gutter: true; first-line: 1">php -m</pre>
<p>So, take a list of your current configuration and check the configure list below in order to have a compatible compilation to your existing older version of PHP.</p>
<p>Advise: First of all, you should consider removing php packages from your server before compiling php, but beaware your codes will be visible till you install the compiled version to your server, consider shutting down your apache server for a while.</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum erase php*</pre>
<p>Before downloading the code, install &#8220;Development Tools&#8221; by tiping:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum groupinstall "Development Tools"</pre>
<p>and install other related header files:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum install httpd-devel libtool-ltdl-devel libxml2-devel bzip2-devel net-snmp-devel openssl-devel pcre-devel curl-devel gd-devel mysql-devel libxslt-devel postgresql-devel gmp-devel</pre>
<p>Download &amp; install libmcrypt</p>
<pre class="brush: shell; gutter: true; first-line: 1">cd /usr/src
wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
   tar zxvf libmcrypt-2.5.8.tar.gz 
   cd libmcrypt-2.5.8
   ./configure -libdir=/usr/lib64
   make
   make install</pre>
<p>&nbsp;</p>
<p>Download &amp; extract php 5.4.44 release:</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget http://php.net/get/php-5.4.44.tar.gz/from/this/mirror
mv mirror php-5.4.44.tar.gz
tar zxvf php-5.4.44.tar.gz
./configure \
 --with-apxs2 \
 --with-curl=/usr/local/lib \
 --with-config-file-path=/etc \
 --with-config-file-scan-dir=/etc/php.d \
 --with-pic \
 --with-gd \
 --with-gettext \
 --with-jpeg-dir=/usr/local/lib \
 --with-freetype-dir=/usr/local/lib \
 --enable-sockets \
 --with-kerberos \
 --with-openssl \
 --with-mhash \
 --with-mcrypt=/usr/local/lib \
 --with-mysql=/usr \
 --with-mysqli=/usr/bin/mysql_config \
 --with-pdo-mysql=/usr \
 --with-pdo-pgsql=/usr \
 --with-pcre-regex=/usr \
 --with-pear \
 --with-gmp \
 --with-pgsql \
 --with-png-dir=/usr/local/lib \
 --with-xsl \
 --with-zlib \
 --with-zlib-dir=/usr/local/lib \
 --with-iconv \
 --with-libxml-dir=/usr \
 --enable-bcmath \
 --enable-calendar \
 --enable-exif \
 --enable-ftp \
 --enable-gd-native-ttf \
 --enable-soap \
 --enable-sockets \
 --enable-mbstring \
 --enable-zip \
 --enable-wddx \
 --enable-shmop \
 --with-libdir=lib64 \
 --disable-debug \
 --with-bz2 \
 --enable-gd-native-ttf \
 --enable-xml \
 --with-snmp=/usr \
 --enable-json 
</pre>
<p>Make &amp; Install by typing:</p>
<pre class="brush: shell; gutter: true; first-line: 1">make
make install
cp php.ini-production /etc/php.ini
</pre>
<p>Get rid of obsolete settings:</p>
<pre class="brush: shell; gutter: true; first-line: 1">sed -i 's#;date.timezone =.*#  date.timezone = "Europe/Istanbul"#' /etc/php.ini
sed -i 's#upload_max_filesize =.*#upload_max_filesize = 200M#' /etc/php.ini
sed -i 's#post_max_size =.*#post_max_size = 200M#' /etc/php.ini
</pre>
<p>Don&#8217;t forget to add respective extension to httpd.conf:</p>
<pre class="brush: shell; gutter: true; first-line: 1">echo "AddType application/x-httpd-php .php" &gt;&gt; /etc/httpd/conf.d/php.conf
echo "AddType application/x-httpd-php-source .phps" &gt;&gt; /etc/httpd/conf.d/php.conf</pre>
<p>and a final configuration:</p>
<pre class="brush: shell; gutter: true; first-line: 1">sed -i 's/DirectoryIndex index.html.*/  DirectoryIndex index.html index.html.var index.php/' /etc/httpd/conf/httpd.conf</pre>
<p>please let us know if you find any mistake</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/php-5-4-44-on-centos-6-7/">PHP 5.4.44 on CentOS 6.7</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/php-5-4-44-on-centos-6-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1011</post-id>	</item>
		<item>
		<title>PHP5.6.3 on CentOS 6.6 with MSSQL Support</title>
		<link>https://www.veriteknik.net.tr/en/build-php5-6-on-centos-6-6-with-mssql-support/</link>
					<comments>https://www.veriteknik.net.tr/en/build-php5-6-on-centos-6-6-with-mssql-support/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Wed, 03 Dec 2014 22:49:22 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 5.6]]></category>
		<category><![CDATA[PHP 5.6.3]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=972</guid>

					<description><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP5.6.X on current releases for the time being. So if you need PHP5.6.X, you need to compile and build it for your self. Advise: First of all, you should consider removing php packages from your server before compiling php, but beaware your codes will be visible till you [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/build-php5-6-on-centos-6-6-with-mssql-support/">PHP5.6.3 on CentOS 6.6 with MSSQL Support</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP5.6.X on current releases for the time being. So if you need PHP5.6.X, you need to compile and build it for your self.</p>
<p>Advise: First of all, you should consider removing php packages from your server before compiling php, but beaware your codes will be visible till you install the compiled version to your server, consider shutting down your apache server for a while.</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum erase php*</pre>
<p>Before downloading the code, install &#8220;Development Tools&#8221; by tiping:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum groupinstall "Development Tools"</pre>
<p>and install other related header files:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum install httpd-devel libtool-ltdl-devel libxml2-devel openssl-devel pcre-devel curl-devel gd-devel mysql-devel libxslt-devel</pre>
<p>Download &amp; install libmcrypt</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
   10  tar zxvf libmcrypt-2.5.8.tar.gz 
   11  cd libmcrypt-2.5.8
   12  ./configure 
   13  make
   14  make install</pre>
<p>Download FreeTDS source, don&#8217;t use yum to install freetds-devel!</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget ftp://ftp.freetds.org/pub/freetds/current/freetds-current.tar.gz
tar zxvf freetds-stable.tgz
cd freetds-0.91/ #in my case
./configure --prefix=/usr/local/freetds --enable-msdblib
make
make install
cp include/tds.h /usr/local/freetds/include
cp src/tds/.libs/libtds.a /usr/local/freetds/lib
echo "/usr/local/freetds/lib" &gt;&gt; /etc/ld.so.conf
echo "export FREETDSCONF=/usr/local/freetds/etc/freetds.conf" &gt;&gt; /etc/profile
ln -s /usr/local/freetds/lib /usr/local/freetds/lib64</pre>
<p>Download &amp; extract php 5.6.3 release:</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget http://php.net/get/php-5.6.3.tar.gz/from/this/mirror
mv mirror php-5.6.3.tar.gz
tar zxvf php-5.6.3.tar.gz
cd php-5.6.3
./configure \
        --with-apxs2 \
        --with-curl=/usr/local/lib \
        --with-gd \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-freetype-dir=/usr/local/lib \
        --with-kerberos \
        --with-openssl \
        --with-mhash \
        --with-mcrypt \
        --with-mysql=/usr \
        --with-mysqli=/usr/bin/mysql_config \
        --with-pdo-mysql=/usr \
        --with-pcre-regex=/usr \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xsl \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --with-iconv \
        --enable-bcmath \
        --enable-calendar \
        --enable-exif \
        --enable-ftp \
        --enable-gd-native-ttf \
        --enable-soap \
        --enable-sockets \
        --enable-mbstring \
        --enable-zip \
        --enable-wddx \
        --with-libdir=lib64 \
        --with-mssql=/usr/local/freetds</pre>
<p>Make &amp; Install by typing:</p>
<pre class="brush: shell; gutter: true; first-line: 1">make
make install
cp php.ini-production /etc/php.ini
sed -i 's/;date.timezone =.*/  date.timezone = "Europe/Istanbul"/' /etc/php.ini</pre>
<p>Don&#8217;t forget to add respective extension to httpd.conf:</p>
<pre>echo "AddType application/x-httpd-php .php" &gt;&gt; /etc/httpd/conf.d/php.conf
echo "AddType application/x-httpd-php-source .phps" &gt;&gt; /etc/httpd/conf.d/php.conf</pre>
<p>and a final configuration:</p>
<pre>sed -i 's/DirectoryIndex index.html.*/  DirectoryIndex index.html index.html.var index.php/' /etc/httpd/conf/httpd.conf</pre>
<p>please let us know if you find any mistake</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/build-php5-6-on-centos-6-6-with-mssql-support/">PHP5.6.3 on CentOS 6.6 with MSSQL Support</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/build-php5-6-on-centos-6-6-with-mssql-support/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">972</post-id>	</item>
		<item>
		<title>Build PHP5.5 on CentOS 6.4 with MSSQL Support</title>
		<link>https://www.veriteknik.net.tr/en/build-php5-5-centos-6-4-mssql-support/</link>
					<comments>https://www.veriteknik.net.tr/en/build-php5-5-centos-6-4-mssql-support/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Fri, 25 Oct 2013 01:24:27 +0000</pubDate>
				<category><![CDATA[LINUX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP 5.5.5]]></category>
		<category><![CDATA[PHP5.5]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=883</guid>

					<description><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP5.5.X on current releases for the time being. So if you need PHP5.5.X, you need to compile and build it for your self. Advise: First of all, you should consider removing php packages from your server before compiling php, but beaware your codes will be visible till you [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/build-php5-5-centos-6-4-mssql-support/">Build PHP5.5 on CentOS 6.4 with MSSQL Support</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Most of the yum repos doesn&#8217;t include PHP5.5.X on current releases for the time being. So if you need PHP5.5.X, you need to compile and build it for your self.</p>
<p>Advise: First of all, you should consider removing php packages from your server before compiling php, but beaware your codes will be visible till you install the compiled version to your server, consider shutting down your apache server for a while.</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum erase php*</pre>
<p>Before downloading the code, install &#8220;Development Tools&#8221; by tiping:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum groupinstall "Development Tools"</pre>
<p>and install other related header files:</p>
<pre class="brush: shell; gutter: true; first-line: 1">yum install httpd-devel libxml2-devel openssl-devel pcre-devel curl-devel gd-devel mysql-devel libxslt-devel</pre>
<p>Download &amp; install libmcrypt</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
   tar zxvf libmcrypt-2.5.8.tar.gz 
   cd libmcrypt-2.5.8
   ./configure 
   make
   make install</pre>
<p>Download FreeTDS source, don&#8217;t use yum to install freetds-devel!</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget ftp://ftp.astron.com/pub/freetds/stable/freetds-stable.tgz
tar zxvf freetds-stable.tgz
cd freetds-0.91/ #in my case
./configure --prefix=/usr/local/freetds --enable-msdblib
make
make install
cp include/tds.h /usr/local/freetds/include
cp src/tds/.libs/libtds.a /usr/local/freetds/lib
echo "/usr/local/freetds/lib" &gt;&gt; /etc/ld.so.conf
echo "export FREETDSCONF=/usr/local/freetds/etc/freetds.conf" &gt;&gt; /etc/profile
ln -s /usr/local/freetds/lib /usr/local/freetds/lib64</pre>
<p>Download &amp; extract php 5.5.5 release:</p>
<pre class="brush: shell; gutter: true; first-line: 1">wget http://us2.php.net/get/php-5.5.5.tar.gz/from/this/mirror
mv mirror php-5.5.5.tar.gz
tar zxvf php-5.5.5.tar.gz
cd php-5.5.5
./configure \
        --with-apxs2 \
        --with-curl=/usr/local/lib \
        --with-gd \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-freetype-dir=/usr/local/lib \
        --with-kerberos \
        --with-openssl \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr \
        --with-mysqli=/usr/bin/mysql_config \
        --with-pdo-mysql=/usr \
        --with-pcre-regex=/usr \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xsl \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --with-iconv \
        --enable-bcmath \
        --enable-calendar \
        --enable-exif \
        --enable-ftp \
        --enable-gd-native-ttf \
        --enable-soap \
        --enable-sockets \
        --enable-mbstring \
        --enable-zip \
        --enable-wddx \
        --with-libdir=lib64 \
        --with-mssql=/usr/local/freetds</pre>
<p>Make &amp; Install by typing:</p>
<pre class="brush: shell; gutter: true; first-line: 1">make
make install
cp php.ini-production /etc/php.ini
sed -i 's/;date.timezone =.*/  date.timezone \= "Europe\/Istanbul"/' /etc/php.ini</pre>
<p>Don&#8217;t forget to add respective extension to httpd.conf:</p>
<pre>echo "AddType application/x-httpd-php .php" &gt;&gt; /etc/httpd/conf.d/php.conf
echo "AddType application/x-httpd-php-source .phps" &gt;&gt; /etc/httpd/conf.d/php.conf</pre>
<p>and a final configuration:</p>
<pre>sed -i 's/DirectoryIndex index.html.*/  DirectoryIndex index.html index.html.var index.php/' /etc/httpd/conf/httpd.conf</pre>
<p>please let us know if you find any mistake</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/build-php5-5-centos-6-4-mssql-support/">Build PHP5.5 on CentOS 6.4 with MSSQL Support</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/build-php5-5-centos-6-4-mssql-support/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">883</post-id>	</item>
		<item>
		<title>Installing MS SQL Module to PHP on DirectAdmin</title>
		<link>https://www.veriteknik.net.tr/en/installing-ms-sql-module-to-php-on-directadmin/</link>
					<comments>https://www.veriteknik.net.tr/en/installing-ms-sql-module-to-php-on-directadmin/#respond</comments>
		
		<dc:creator><![CDATA[Mustafa Emre Aydın]]></dc:creator>
		<pubDate>Fri, 23 Aug 2013 06:32:00 +0000</pubDate>
				<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[LINUX]]></category>
		<category><![CDATA[directadmin]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=831</guid>

					<description><![CDATA[<p>If you need to connect to an MS Sql Server remotely from your DirectAdmin server via php, you need to rebuild PHP with necessary components. Get the latest stable release of FreeTDS and install it. cd /root wget ftp://ftp.astron.com/pub/freetds/current/freetds-current.tgz tar -xvzf freetds-current.tgz cd freetds-dev.0.92.377 ./configure --prefix=/usr/local/freetds make make install Now we should tell Direct Admin&#8217;s [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/installing-ms-sql-module-to-php-on-directadmin/">Installing MS SQL Module to PHP on DirectAdmin</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you need to connect to an MS Sql Server remotely from your DirectAdmin server via php, you need to rebuild PHP with necessary components. Get the latest stable release of FreeTDS and install it.</p>
<pre class="brush: bash; gutter: true; first-line: 1">cd /root
wget ftp://ftp.astron.com/pub/freetds/current/freetds-current.tgz
tar -xvzf freetds-current.tgz
cd freetds-dev.0.92.377
./configure --prefix=/usr/local/freetds
make
make install</pre>
<p>Now we should tell Direct Admin&#8217;s custom build that we want the MS Sql libraries installed using freetds.Edit the file :/usr/local/directadmin/custombuild/configure/ap2/configure.php5 add</p>
<pre class="brush: bash; gutter: true; first-line: 1">--with-mssql=/usr/local/freetds \</pre>
<p>to anywhere in the file. If you&#8217;re adding it the to end of the file, don&#8217;t add the <strong>\</strong> at the end, instead add to the end of the line &#8220;before&#8221; the last line. Now go to custombuild and build the new PHP.</p>
<pre class="brush: bash; gutter: true; first-line: 1">cd /usr/local/directadmin/custombuild
./build clean
./build php d</pre>
<p>Check if MS Sql is intalled.</p>
<pre class="brush: actionscript3; gutter: true; first-line: 1">php -m|grep mssql
mssql</pre>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/installing-ms-sql-module-to-php-on-directadmin/">Installing MS SQL Module to PHP on DirectAdmin</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/installing-ms-sql-module-to-php-on-directadmin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">831</post-id>	</item>
	</channel>
</rss>
