Kohana_Exception [ 0 ]: GD is either not installed or not enabled, check your configuration - kohana-3

i am getting the following exception in kohana 3
Kohana_Exception [ 0 ]: GD is either not installed or not enabled, check your configuration
please advise.

You need to install GD for your PHP installation. I'm going to assume you're using the PHP packages from the Ubuntu, etc ... repositories in which case you need to install php5-gd.
sudo aptitude install php5-gd
Then restart Apache
sudo /etc/init.d/apache2 restart
If not then you need to consult the documentation for the software you use.

Related

Upgrade to php 7 and apache 2.4 from php 5.3 and apache 2.2 in Amazon EC2

I have a legacy system in which Apache 2.2.34 (linux) is installed along with php 5.3.29 (CLI).
I just want to upgrade my apache to 2.4.x so that I will be able to use php 7.
I have tried searching for the same but majority of sites provide solution for CentOS or Ubuntu. I'm new to Linux so I'm a bit confused when applying the same on Amazon EC2 instance.
That would be really helpful if someone can provide me a step by step process to do the upgrade process. I just need to upgrade the server and I can do the configuration accordingly.
After some more googling, I have found the steps I have taken to upgrade. Hope that helps anyone looking for the same:
Login to your Linux instance and perform the regular system updates first
$ sudo yum update
Stop the running web server
$ sudo service httpd stop
Create backup of the existing httpd by using command:
$ sudo cp -a /etc/httpd /etc/httpd.bak
Remove any existing PHP packages
$ sudo yum remove php*
Remove old web server installs
$ sudo yum remove httpd*
Update yum package repository
$ sudo yum clean all
$ sudo yum upgrade -y
Install Apache 2.4
$ sudo yum install httpd24
Install PHP 7 packages
$ sudo yum install php70 php70-mysqlnd php70-imap php70-pecl-memcache php70-pecl-apcu php70-gd
Install a new version of mod_ssl
$ sudo yum install mod24_ssl
I also needed to reconfigure /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/ssl.conf in order to enable SSL and pretty permalinks.
Finally all I needed to do is start my web server
$ service httpd start
That's it.
Do retain that the solution by MrGoogle will reset any configuration in existence in the hpptd service.
You will probably need to reconfigure some settings...
I had to reconfigure mod_rewrite and .htaccess File for apache:
https://devops.ionos.com/tutorials/install-and-configure-mod_rewrite-for-apache-on-centos-7/

Unable to install PostgreSQL 9.5/PostGIS 2.3 on CentOS 7

On my CentOS 7 (x86_64) machine, I am trying to install PostgreSQL 9.5/PostGIS 2.3 via PostgreSQL's yum repository, using this tutorial.
According to the tutorial, when I proceed to the second step.
sudo rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
It says:
Retrieving http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
Preparing... ################################# [100%]
package pgdg-centos95-9.5-3.noarch (which is newer than pgdg-centos95-9.5-2.noarch) is already installed
Then, I try to see which packages are available in this rpm:
sudo yum list | grep pgdg95
I get,
libevent.x86_64 2.0.22-1.rhel7 #pgdg95
python-babel.noarch 1.3-1.rhel7 #pgdg95
python-jinja2.noarch 2.8-7.rhel7 #pgdg95
python-markupsafe.x86_64 0.23-11.rhel7 #pgdg95
Which is not according to the step number 3 in the installation tutorial. Can someone please suggest me what's wrong with the installation or are there any alternative ways to install PostgreSQL 9.5/PostGIS 2.3?
Please make sure you have both pgdg and EPEL repositories installed by running sudo yum repolist. If EPEL is not in the list, just install it sudo yum install epel-release.
Please refer to this ANSWER.
Check yum list postgres*
If you see desired packages it is great.
If you still don't see desired packages then follow given steps in given answer,
# vi /etc/yum.repos.d/CentOS-Base.repo
# yum localinstall http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
# yum list postgres*
If you check step two, we can see it does local install after this local installation, you should be ideally able to see desired list.
Hope it helps !

Unable to yum install anything on RHEL

I am on a new RHEL system.
I seem to be unable to be able to install anything package via yum install.
yum install nmap
The current repos in
ls /etc/yum.repos.d/
google-chrome.repo redhat.repo rhel-source.repo
What could be going wrong ?
OUTPUT OF YUM INSTALL:
$ sudo yum install nmap
[sudo] password for user:
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
No package nmap available.
Error: Nothing to do
Red Hat doesn't use the /etc/yum.repos.d directory for official packages so the answer won't be in there. It will use the subscription plugin placed in /etc/yum/pluginconf.d.
You mentioned that the RHEL host is new. You will need to make sure your subscription is valid or yum will fail silently.
You can use the subscription-manager list command to gain info regarding subscriptions.
Centos has done it for you.
Create a repo file in /etc/yum.repos.d as
vi /etc/yum.repos.d/myrepo.repo
Then paste this in this file:
[centos]
name=CentOS-7
baseurl=http://ftp.heanet.ie/pub/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://ftp.heanet.ie/pub/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
Saving it with wq! now run
yum repolist
Check if you can install any package (say nmap)
yum install nmap -y
Enjoy!!!
Try "searching" for the correct package name in the reps by using yum list
yum list nmap
I guess the correct package name and install command is:
yum install nmap.x86_64
You can also do a "yum search somename"
In my case, I was trying to install OpenJDK using yum; sudo yum install -y java-1.8.0-openjdk-devel but received an error message stating that a dependency was unavailable:
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.201.b09-1.el6_10 will be installed
--> Processing Dependency: pcsc-lite-devel(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64 (rhel-6-server-rpms)
Requires: pcsc-lite-devel(x86-64)
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************
I resolved this by following the suggestion please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf and then ran the yum command again. This time yum loaded a bunch of [previously disabled] repos and searched through them, finally reporting success and this message:
*******************************************************************
Dependency resolving was successful thanks to enabling these repositories:
rhel-6-server-optional-rpms
*******************************************************************
So there was no ignored *-devel repo, but still doing this worked. For clearance, the explicitly ignored repos are: ignored_repos=*debug-rpms *source-rpms *beta-rpms
..so that worked, but I'm still no wiser on the mechanics of this..
If you have OS image in your lab or any location you can try this for some RPMS
vim /etc/yum.repos.d/rhel.repo
[rhel]
name=rhel
baseurl=http://172.25.5.25/osimages/rhel7.2_64bit
enabled=1
gpgcheck=0
Then do yum clean all
baseurl is the location where your OS image is available. No subscription is needed, it is reusing your OS image
Try installing using:
yum install nmap-frontend
It worked for me on Red Hat Enterprise Linux Server release 7.7 (Maipo)
You can use the following line to test:
nmap 25 gmail-smtp-in.l.google.com

CentOS mod_fastcgi

I have server with installed CentOS 6.2 with nginx and php-fpm from remi repos
httpd also installed, but when I try to install mod_fastcgi yum sais that no pachage availiable
How I can install mod_fastcgi??? Googling different sites says that command
yum install mod_fastcgi
must install this package. But yum sais:
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* epel: mirror.cogentco.com
* remi: remi-mirror.dedipower.com
196 packages excluded due to repository priority protections
Setting up Install Process
No package mod_fastcgi available.
Error: Nothing to do
There don't appear to be any official packages for mod_fastcgi. It seems that RedHat would prefer that you use mod_fcgid, but it's missing an important feature, the ability to use an external FastCGI server process (not managed by Apache) such as PHP-FPM.
From http://www.garron.me/en/linux/apache-mpm-worker-php-fpm-mysql-centos.html, I found that
you can download unofficial mod_fastcgi RPMs from the RPMForge/RepoForge repository:
sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
sudo rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
sudo yum install mod_fastcgi
I have tested them lightly and they work for me.
You should be able to do an install from source. Try following the instructions here:
http://www.cyberciti.biz/tips/rhel-centos-fedora-apache2-fastcgi-php-configuration.html
I've successfully used these instructions on Centos.
install mod_fcgid from epel repository
# yum --enablerepo=epel info mod_fcgid
Available Packages
Name : mod_fcgid
Arch : x86_64
Version : 2.2
Release : 11.el5
Size : 58 k
Repo : epel
Summary : Apache2 module for high-performance server-side scripting
URL : http://fastcgi.coremail.cn/
License : GPL+
Description: mod_fcgid is a binary-compatible alternative to the Apache module mod_fastcgi.
: mod_fcgid has a new process management strategy, which concentrates on reducing
: the number of fastcgi servers, and kicking out corrupt fastcgi servers as soon
: as possible.

Getting Java JDK to compile on ubuntu

I'm trying to start working with Java, but so far haven't been able to get it on my machine properly. I'd really like to be able to compile from command line. After following the instructions here with no errors I can't compile with javac. Here's what I have so far:
When I enter:
$ java -version
I get:
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
When I run:
$ sudo apt-get install sun-java6-jdk
I get:
~$ sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
sun-java6-demo sun-java6-doc sun-java6-source
The following NEW packages will be installed:
sun-java6-jdk
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 17.4MB of archives.
After this operation, 55.7MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
sun-java6-jdk
Install these packages without verification [y/N]? y
Err http://us.archive.ubuntu.com hardy-updates/multiverse sun-java6-jdk 6-07-3ubuntu2
404 Not Found [IP: 91.189.88.140 80]
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/multiverse/s/sun-java6/sun-java6-jdk_6-07-3ubuntu2_i386.deb 404 Not Found [IP: 91.189.88.140 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
When I run:
$ /media/disk/School/java/hw1$ javac HelloWorldApp,java </pre>
I get:
The program 'javac' can be found in the following packages:
* java-gcj-compat-dev
* openjdk-6-jdk
* gcj-4.2
* kaffe
* ecj
* jikes-sun
* jikes-sablevm
* j2sdk1.4
* jikes-classpath
* jikes-gij
* gcj-4.1
* sun-java5-jdk
* jikes-kaffe
* sun-java6-jdk
Try: sudo apt-get install <selected package>
bash: javac: command not found
When I try to update (using sudo apt-get update) I get:
E: The method driver /usr/lib/apt/methods/https could not be found.
Has anyone else encountered this problem? Thanks in advance...
You can install the JDK on recent versions of Ubuntu by typing this command:
sudo apt-get install sun-java6-jdk
You might find this easier than attempting to set it up manually.
Try this:
Download the Java SDK into $HOME/archives (e.g., $HOME/archives/jdk-6u16-linux-x64.bin).
Extract Java into /opt (or another location if you do not want to use root). For example:
cd /opt
chmod 755 $HOME/archives/jdk-6u16-linux-x64.bin
sudo $HOME/archives/jdk-6u16-linux-x64.bin</code>
Create a symbolic link (to ease upgrades):
sudo ln -s jdk1.6.0_16 jdk
Edit $HOME/.bashrc
Append the following lines:
JAVA_HOME=/opt/jdk
PATH=$PATH:$JAVA_HOME/bin
Reload the environment variables:
source $HOME/.bashrc
You should now be able to compile programs.
I prefer this method to installing the managed package because uninstalling (or upgrades) never seems to remove all bits of the SDK flawlessly, and it seems to hinder installing multiple versions of the Java Software Development Kit on the same machine at the same time. I have had issues with apt-get and Java in the past. Also, this method allows me to be absolutely certain which version of Java is in use at any time.
If you are not comfortable using root and /opt, you can use your own account and $HOME/bin/jdk instead. Change the .bashrc file accordingly.
Remove any version of Java you previously had installed. You might need to restart your terminal session.
This works for all versions of Java since at least Java 1.2.
Usually you will find java in the PATH and not javac in a standard Ubuntu installation. This is primarily because of the gcj package that gets installed. Symlinks are also created that can be updated using the update-alternatives script.
After an installation of Sun JDK, you are required to update the symlink to java, and this is usually done via a command similar to the one below
sudo update-alternatives --config java
If hardlinks to the location of (Sun) java is not present, you can create it using a command similar to
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_07/jre/bin/java 300
In the case of javac, you can create a symlink, again using update-alternatives using:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_07/bin/javac 300
This will make javac available on PATH, just like java.
Of course, there is option of updating the PATH variable via a simple export or via changes to the shell configuration file.
I just ran into this problem while installing the html validator from http://validator.nu. To install sun-java6-jdk I had to add this repository: deb http://archive.canonical.com/ lucid partner
To complete the validator install, I had to set (export) my $JAVA_HOME to /usr/lib/jvm/java6-sun.
Do change "lucid" to whatever is appropriate for your Ubuntu edition.

Resources