Centos6 PHP7 Install SPL_Types - centos6

I am running CentOS 6 and am trying to install the SPL_Types extension for PHP7. I have php7 up and running however, any time I do pecl install SPL_Types,
I get massive compiler errors and can't find a way around. Ubuntu users can fix the issue by installing libpcre3-dev, but this is not a valid package on CentOS 6. I have verified that pcre and pcre-devel are installed and the latest version. Does anyone have a solution to this?
EDIT 1: A full log when I run the sudo pecl install SPL_Types command: http://pastebin.com/QG3mFjaf

I got it figured out. For those who wish to know, I had to use a third party source to compile and install the extension, then I had to edit my php.ini file manually to add the new module.
https://github.com/esminis/php_pecl_spl_types
then once you have it, run the commands:
phpize --clean
phpize
chmod +x configure
./configure --prefix=/usr
make install
Then, edit your php.ini file and under the dynamic modules section, add
extension=spl_types.so
Restart the httpd service by doing
sudo service httpd restart
Then verify the new module is loaded with phpinfo().

Related

Is Passenger Deprecated for Nginx versions above 1.14?

I updated nginx from version 1.14 to 1.18 (Ubuntu) on Ubuntu 18.04.
Doing so appeared to break passenger. So I uninstalled and attempted to reinstall the Open Source Passenger version via the Passenger installation Ubuntu 18.04 instructions.
I got to this line:
sudo apt-get install -y libnginx-mod-http-passenger
Which throws this error
libnginx-mod-http-passenger : Depends: nginx-common (< 1.14.1) but 1.18.0-3ubuntu1+bionic1 is to be installed
Update I also attempted with the enterprise version. Following the enterprise version installation instructions, I received a similar error message:
libnginx-mod-http-passenger-enterprise : Depends: nginx-common (< 1.14.1) but 1.18.0-3ubuntu1+bionic1 is to be installed
I did attempt to research the issue and I found this issue on Phusion's GitHub as well as this more recent issue. It appears that what most people are doing is rolling back their nginx version to 1.14.
It is not deprecated, no. The problem is that the packaged module you are trying to install was made for an older Nginx version that is distributed through the system default repository. This appears in the installation guide that you've mentioned:
At this point we assume that you already have Nginx installed from your system repository.
What this means is that the following instructions assume that you have Nginx specific version (1.14.0 in your case) installed, for which the packaged module was built. This is emphasised in the new passenger documentation:
If you want to use our packaged Nginx module, you must use your distro's provided Nginx package. If for example you have the repo provided by NGINX setup, you will instead need to compile a dynamic module compatible with that Nginx.
The link in the last quote will bring you to the guide on how to compile a dynamic passenger module and enable it in Nginx configuration. I will not repeat the whole process to keep the answer short but the general approach is this:
Get passenger module for Nginx source code.
Get Nginx source code for the version you have installed.
Compile Nginx with the passenger module:
cd /path-to-nginx-source-dir
./configure --prefix=/opt/nginx \
--with-some-configure-flag \
--add-dynamic-module=$(passenger-config --nginx-addon-dir) \
--add-module=/path-to-some-other-nginx-module
make
sudo make install
Make Nginx to load the module by adding this line to nginx.conf:
load_module modules/ngx_http_passenger_module.so;
Personally, I'd rather chosen the 'nginx-behind-nginx' approach than building the module. That is you have Nginx any version you like but it runs as a reverse proxy for another Nginx with passenger enabled (Passenger Standalone). With an unnoticeable penalty to performance this will be much easier to maintain (install, update). See this guide for details.

Drupal - drush installation on mamp server

I have a drupal project, and I am trying to install drush for mamp server. I have run:
composer global require drush/drush:dev-master
In the directory of my project, but when I am trying to run:
drush status
I get:
command not found: drush
Follow information listed in : https://www.drupal.org/node/1674222
At the very least, you definitely did not carry these two steps out correctly, which symlink the "drush" binary.
cd /usr/bin
ln -s /Users/myusername/drush/drush
Replace /Users/myusername/ with the name of the directory where you unpacked Drush.
You may need to quit and restart Terminal after completing these instructions before running any drush commands.
http://youtu.be/TCg02d4am_Q for more details
If you're still having problems, I suggest following the instructions here: https://www.drupal.org/node/1674222 and reporting back, editting your answer to reflect the new error you get, so we can actually help you figure out what step of the install you're not running successfully.

How to install wkhtmltopdf patched qt without compiling?

I'm using google cloud instance for host Odoo, somo reports print to pdf ok, but other with custom paperformat get the following error:
"The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display"
I google it, and to solve I need to compile wkhtmltopdf like this:
http://www.grobak.net/id/blog/how-fix-wkhtmltopdf-failed-error-code-6 but this proccess need 3 hs and I'm building a script to install google instances on the run with odoo dependencies.
the .deb package have a dependency broken
Anyone know other solution?
My system configuration is Ubuntu 14.04 and 64 bit. So, i am downloading according to that.
First you have to check your system OS name by
lsb_release -a
Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.
file /sbin/init
Download wkhtmltopdf patched with qt using below command
sudo wget -P Downloads https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
Here, replace "trusty" with your OS name and if 64 bit only then keep "amd64" like that , otherwise change it to "i386" and down load the deb file.
After that execute the following commands,
cd ~/Downloads
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
Now, check wkhtmltopdf version with below command,
wkhtmltopdf -V
Enjoy!!
After trying many ways I finally made it work.
First I removed all my previous installation by
sudo apt-get remove --purge wkhtmltopdf
sudo apt-get autoremove
Then I opened wkhtmltopdf.org and navigated into their Downloads > Archive. In Archive section I downloaded 0.12.1 .deb version by
wget <copy the link from website for the.deb file and paste it in terminal here>.
sudo dpkg -i <package name>
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
This is because odoo looks for wkhtmltopdf in /usr/bin directory otherwise gives IOError. I also set my webkit_path parameter in Odoo System Parameters to /usr/bin.
Thats it. Hope this helps
I was facing same issue with wkhtmltopdf 0.12.4
installed new version of wkhtmltopdf 0.12.6-1
follow below commands to install wkhtmltopdf 0.12.6-1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm #centos specific command

syslog-ng install finished without the needed files

I downloaded syslog-ng OSE from the site (version 3.4.0alpha3)
successfully run
./configure
make
make install
but I've got no /etc/syslog-ng.conf
nor /etc/init.d/syslog-ng
What might be the reason?
env is centos 6.3
This installs syslog-ng under /usr/local with your config as /usr/local/etc/syslog-ng.conf Please check./configure --help for options.
As far as I recall, there are init script examples in the source tree, but not automatically installed.

Amazon EC2 - PHP GD image library

I've got a brand new install of WordPress setup and activated a custom-built theme along with a good amount of plugins. In the posts, I have built it so the user can create a post, upload an image as a thumbnail and it will automatically resize the image to a custom size set in my functions.php file.
All this has been working on my local end (MAMP) correctly but when I tried making everything work on our Amazon EC2 server, the images do not resize to the size set. They resize by actual code but do not resize the actual image and save it in the new size.
Apologies if the question/subject is completely non-sense but I have little to no experience with Amazon EC2 servers and I have been placed into a situation where the person in charge of all the work within EC2 had to leave the project.
I'm assuming that this has to do with the GD library not being installed.. I created a test page with phpinfo() and didn't see a GD area on the results page.
How would I go about installing the library on my Amazon EC2 server? I just learned how to connect to the server via Terminal and that's all I've got for now.. so you get an idea of how much I know about the subject.
I'm guessing you have some type of Linux installed, probably Ubuntu or CentOS.
Ubuntu: sudo apt-get install php5-gd
CentOS: sudo yum install php-gd
You probably have to restart Apache afterwards: service httpd restart or service apache2 restart -- the names differ from distribution to distribution.
Let me know if this works!
In my case, I was getting error like there is version conflict between different versions of php-common when I entered "yum install php-gd" so I checked my php version using "php -v" in shell and then installed the corresponding gd using "yum install php56-gd" because I had php 5.6 installed in my machine.
Hope someone will get help from this.
Cheers
to avoid compatibility problems first do:
php --version
to know your php version
the answer is something in the form PHP X.Y.Z
so you have to take X, Y and do:
sudo yum install phpXY-gd
for instance if php --version says PHP 5.5.26
you will do:
sudo yum install php55-gd
In my case of ec2 server running Amazon Linux 2 with php version 7.2.24, following was the sequence:
sudo yum install php-gd
But event after repeat server restart with
sudo systemctl restart httpd
it was not working unless I rebooted with
sudo reboot
In Amazon Linux, we have to add the following line to the etc/php.ini file
extension=gd.so
Step 1: Install the package using following command
sudo yum install php-gd
Step 2: Include the following line to the etc/php.ini file
extension=gd.so
If the line is commented, then uncomment it.
Step 3: Restart the httpd service
sudo service httpd restart

Resources