You are not logged in.

#1 2011-11-15 20:15:19

Shake 'n' Bake
Member
From: Albany, NY
Registered: 2011-11-15
Posts: 6
Website

[Solved] PHP Will not Load Extensions

I'm trying to install Gallery 3 and no matter what I do, it always tells me that PHP is missing the iconv and JSON extensions.  Additionally, phpMyAdmin tells me that PHP is missing the mysqli extension.  I've tried commenting and uncommenting the extensions in question several times in php.ini (the full path is /etc/php/php.ini, in case there is some other php.ini) and I've restarted Apache about a million times.  I have also restarted the whole computer several times. 

The problem is that all these extensions are uncommented in php.ini, and thus should be loaded.  I have run the command "php -m" to see what extensions are running.  I get everything that should be there, except the problem extensions, iconv, JSON and mysqli.  I don't know if it makes a difference, but before the list, it tells me this: "PHP:  syntax error, unexpected END_OF_LINE, expecting '=' in /etc/php/php.ini on line 2".  So that means iconv, JSON, and mysqli have not been loaded.  mysqli used to work, obviously, because I just started getting the message from phpMyAdmin.  I have been googling since last night trying to solve this problem and I have gotten no relevant results.  Any help you could give would be greatly appreciated.  Thank you.

Last edited by Shake 'n' Bake (2011-11-19 15:34:29)

Offline

#2 2011-11-18 04:14:42

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

Re: [Solved] PHP Will not Load Extensions

How did you install iconv? I had to install it on my server as it is needed by Piwik, I compiled my own package using a pkgbuild and got the source from gnu.org. I had no issues with php picking it up.

You may already know of it but this wonderful wiki page covers the installation of a LAMP stack pretty well. It could be worth using it as a reference to make sure you got all your configs right.

Offline

#3 2011-11-18 21:54:01

Shake 'n' Bake
Member
From: Albany, NY
Registered: 2011-11-15
Posts: 6
Website

Re: [Solved] PHP Will not Load Extensions

That's probably the problem then.  I went to this page about iconv on php.net: http://us3.php.net/manual/en/iconv.requirements.php.  It says that I need libiconv.  I assume since it's not working I'll have to download that.  Any insight on JSON?  Thanks for the reply.  I was about ready to wipe out ans start over.

Offline

#4 2011-11-18 22:38:29

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: [Solved] PHP Will not Load Extensions

Iconv and json are part of our php package. There is no need to build anything from source here. Just enable these modules in php.ini. You simply have an syntax error in php.ini as it is telling you. If in doubt start over from the php.ini that was shipped with the package.

Offline

#5 2011-11-19 04:02:01

Shake 'n' Bake
Member
From: Albany, NY
Registered: 2011-11-15
Posts: 6
Website

Re: [Solved] PHP Will not Load Extensions

Solved the problem.  It was the syntax error causing all the problems.  The first line of the file was time[PHP].  I changed it to just [PHP] and now it's working just fine.

Offline

#6 2011-11-19 05:38:35

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [Solved] PHP Will not Load Extensions

Shake 'n' Bake, please mark this thread as [SOLVED] by editing the title of your first post.


To know or not to know ...
... the questions remain forever.

Offline

#7 2011-11-19 15:35:13

Shake 'n' Bake
Member
From: Albany, NY
Registered: 2011-11-15
Posts: 6
Website

Re: [Solved] PHP Will not Load Extensions

Sorry about that.  I was looking for a "mark as solved" button or drop down.

Offline

Board footer

Powered by FluxBB