LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-31-2012, 06:42 AM   #1
gemmajid
Member
 
Registered: Mar 2012
Location: Karachi
Distribution: Ubuntu, RedHat, CentOs,
Posts: 104

Rep: Reputation: Disabled
Your PHP has to have MySQL extension enabled.


Hello Dear,

I was installing FrontAccounting software every thing goes right but when i access it through localaddress/account it shows me

"Your PHP has to have MySQL extension enabled."

Kindly let me know that how may i enable the extention it's really urgent.
 
Old 05-31-2012, 09:29 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Are you running FrontAccounting on a local server? Have you installed php-mysql (or whatever package is appropriate for your system)? Have you told PHP to load the MySQL modules via php.ini? https://wiki.archlinux.org/index.php/LAMP#MySQL, while Arch-specific, has lots of useful information on how to configure it properly once you've got it installed.
 
Old 05-31-2012, 09:49 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
In your php.ini file (it should be somewhere in /etc (possibly in /etc/httpd but you may have to look for it), there are sections that enable MySQL. Use a text editor and look for mysql in that file (there are comments at each indicating whether or not to enable them; you remove a leading semicolon to enable, for example
Code:
[Pdo_mysql]
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/pdo_mysql.cache_size
pdo_mysql.cache_size = 2000     (the semicolon was removed here)

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=       (and from here)
You must have the extension enabled:
Code:
; These are the extensions that are available for use on this PHP build.
; If you do NOT need any of these extensions, you should comment them out.
; That will probably increase both your security and performance.
<some extensions listed>
extension=iconv.so
extension=ldap.so
extension=mbstring.so
extension=mysql.so
extension=mysqli.so
extension=openssl.so
extension=pdo.so
extension=pdo_mysql.so
<some more extensions listed>
Of course your PHP installation must have been compiled to include MySQL functions (it usually is on most distributions -- yours may vary, however, and you need to check it). You may -- may -- need to build and install PHP from source if it was not configured to include MySQL. If necessary, you can execute PHP standalone; create a file, phpinfo.php with this content
Code:
<?php
phpinfo();
?>
then execute it with
Code:
php phpinfo.php | grep -i mysql | more
You should see a lot of stuff that includes the string mysql, most importantly
Code:
MySQL Support => enabled
Client API version => mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $
mysql.allow_local_infile => On => On
mysql.allow_persistent => On => On
<plus a lot of other stuff>
If that's not there, your PHP installation was not compiled with MySQL enabled and you'll need to build PHP with MySQL enabled or find a package for your distribution that does have it enabled. That's not a trivial task, so check and make sure (with phpinfo.php as described) before you undertake building PHP from source.

Hope this helps some.
 
Old 06-01-2012, 01:51 AM   #4
gemmajid
Member
 
Registered: Mar 2012
Location: Karachi
Distribution: Ubuntu, RedHat, CentOs,
Posts: 104

Original Poster
Rep: Reputation: Disabled
Thanks alot guys.

The issue is resolved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] OpenSSL PHP extension have to be enabled to use extension repository system. jsaravana87 Linux - Server 2 09-09-2011 12:00 AM
php cannot load mysql extension no_names_left Linux - Software 4 03-02-2005 07:31 PM
PHP difference between --without-mysql and extension=mysql.so progressdll Linux - Software 0 10-14-2004 07:44 AM
Mysql Php Extension SilentK Linux - Newbie 11 06-11-2004 08:47 AM
PHP does not show mysql as an extension Linix Linux - Newbie 7 01-31-2004 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration