After following these instructions
I still get:
Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpeg()
Checking php_info, GD is enabled already in my php 7.0 installation... any clues?
I had an Ubuntu 14.04 and after doing a release upgrade to 16.04 everything went nuts, and even after apt-get install php7.0-gd it is not working :(.
Edit:
Actually I see this on my info: GD imaging In module authors, but there is no actual GD section on the php_info() output, so something seems to be wrong with the process I followed and even tho I apt-get install php7.0-gd, it is not completely enabled? I'm checking.
Ok, so stupid me, I thought module was enabled because apt-get went fine and I saw that GD imaging line on the php_info() output.
But actually the php_gd2 module was not enabled on my php.ini file, after double checking that and restarting apache everything works fine... sorry about that.
Related
imageantialias doesn't seem to work using PHP 5.
PHP Fatal error: Call to undefined function imageantialias()
The packages php5-gd and libjpeg62 were already installed and I even installed php5-imagick and restarted apache. Still I can't use the GD library under PHP 5.
I tried approaches that were described in forums and on StackOverflow, but I just can't get GD running. I am using the latest release (8.3) of Debian.
On additional research, php -m shows that gd is loaded. However, I didn't see the files libjpeg.so.* in /usr/lib. Maybe this is the problem?
Also, according to phpinfo, GD seems to be installed
How do I install GD for PHP 5?
Package php5-gd is working. Only imageantialias() is not implemented in the PHP packages in Debian Jessie. If you try any other function from the GD library it should work.
The reason behind php5-gd in Debian Jessie not providing that function is explained at bugs.debian.org (closed as "won't fix"). I don't understand it enough to give a summary.
Not in the scope of the question and because of that I won't quote it here, but you may be interested in it anyway: In the same bug report someone wrote down a solution that can be found at forums.debian.net.
This issue at the official dglib repo may be of interest, too: https://github.com/libgd/libgd/issues/115
I was running a very outdated version of PHP version 5.3.3. So I updated it to 5.6.16. However since I've updated I am getting the following error when I try to view my Wordpress site:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I understand that the reason for this error is because the mysql extension is not being loaded by PHP but I am unsure as to what to do to get this? I've checked my php.ini file and uncommented this line
extension=msql.so
restarted my apache server and no luck!
The Code I am using to check if it is enabled is:
if (extension_loaded('mysql') or extension_loaded('mysqli')) {
echo "Loaded";
}else{
echo "Not Loaded";
}
when I run php -m in my terminal I see mysql is not listed.
Could anyone help me out with getting this to work.
I've also tried running this command yum install php-mysql but I get this error:
Finished Dependency Resolution
Error: php56w-common conflicts with php-common-5.3.3-46.el6_6.i686
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Thanks
Have you tried yum install php56w-mysql?
That should install the 5.6 version of the MySQL libraries. It looks like yum is trying to install the 5.3 version by default. Out of curiosity, what OS is this you are installing on, it might be a little out of date.
I face an awkward problem:
Call to undefined function http_negotiate_language()
on a fresh installed server (ubuntu raring)
PECL correctly installed, php.ini updated
PECL modules are loaded without errors
and:
var_dump(extension_loaded('http')); // return true, everything is fine
I must miss something but what ?
You got version 2 of pecl_http, which dropped the function-style API. The supported call is now http\Env::negotiateLanguage (see the negotiateLanguage docs).
You can either update your code or try to run
# pecl uninstall pecl_http
# pecl install pecl_http-1.7.6
to downgrade.
I have been trying to install memcached on an ubuntu server and I followed a lot of tutorials over the internet. I am using 32-bit ubuntu 12.04, php version 5.4.7, xampp server 1.8.1 which are all 32-bit versions. In the end, I followed the tutorial in the below link and I installed all the things listed with no error.
http://stevelove.org/2009/09/30/how-to-install-php-memcached-on-an-ubuntu-server/
The only problem I have is that when I installed memcached using "sudo pecl install memcached" command, the extension couldn't be added to php.ini file. Then I used phpinfo() to learn which php.ini file I am using and added extension=memcached.so to the ini file. When I restarted xampp server, php.ini file doesn't work and it tries to download the pages. In the php error log, I get this error.
[30-May-2013 16:42:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/memcache.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
Since I couldn't enable the extension, even though memcached is listed as installed with php -m command, I get Class memcached not found error when I try to execute my php code.
Can someone please help me with this issue?
Maybe because you installed the server but not the extension, try
sudo apt-get install php5-memcached
ps: memcache != memcached
Firstly, thank you for your answer Mohammad. I know that memcache is not memcached and as I said, when I list modules, memcached seems installed (not memcache) but when I use phpinfo(), memcached is not listed.
It turns out that even though I installed memcached, problem was xampp installation. I removed lampp and php5 installed in ubuntu and purged everything I installed. Then I installed xampp with development packages and re-installed libmemcached etc. It works fine now.
If there is anybody having similar problem, I can explain in detail.
I get this error when i try to run following command
sudo pecl install mongo
Error:
...php_mongo.c:22:10: fatal error: 'php.h'
file not found
#include <php.h>
^
1 error generated.
make: *** [php_mongo.lo] Error 1
ERROR: `make' failed
I am new to MAC, please help me to resolve this and get Mongo Working with PHP.
I have installed MacPorts and autoconf
It seems, that you did not install the xampp "Developer Package", required to build additional php extension. You can download the "Developer Package" from:
http://www.apachefriends.org/en/xampp-macosx.html#849
This has already been answered.
Please follow the processes outlined in this answer - Install PECL on Mac OS X 10.6.
I followed the process outlined here http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/, referenced by the above Stackoverflow link and the process for install pear, followed by pecl and subsequently -
sudo pecl install mongo
works perfectly on OSX Lion.
You may need to modify the extensions in /etc/php.ini, however, this is explained in the output after you install the php mongo driver.
It took me the whole day to find this answer, I had tried everything, but this worked finally:
sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
I found this article very helpful. Saved a lot of time after I wasted a lot of time to check other links. I did for MAMP and think will work for XAMPP too.
The thing is MAMP does not ship with all PHP sources to compile pecl mongo file and create mongo.so. All what you need is download php for respective version you are using. I was using php version 5.6.10. I checked php.net site that was having 5.6.13 version. I downloaded sources for this version from PhP.net. Executed "sudo pecl install mongo" again and it worked.