Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 10-20-2009, 12:00 PM   #1
LQ Newbie
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
PHP Extension will not load


I been working on this issue for a couple days without success. PHP.ini will not load extensions. I am able to modify php.ini parameters successfully with the exception of the extensions. It would be appreciated if someone can shed some light on this issue.

check for multiply php.ini
restart apache

1. Environment:

CentoOS 5.2
PHP 5.11

2. dir
apache2= /usr/local/apache2
php = /usr/local/apache2/php
lib = /usr/lib which contains,,,

3. security
selinux =disable

4. php.ini (path directories and extensions)

; Paths and Directories ;

; UNIX: "/path1:/path2"
include_path = ".:/php/includes :/usr/share/pear:/local/PEAR :/usr/local/apache2/php/lib/pub :/usr/lib"

; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root =

; The directory under which PHP opens the script using /~username used only
; if nonempty.
user_dir =

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/"

; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On

; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; cgi.force_redirect = 1
; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request.
; cgi.nph = 1

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; cgi.redirect_status_env = ;

; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
; security tokens of the calling client. This allows IIS to define the
; security context that the request runs under. mod_fastcgi under Apache
; does not currently support this feature (03/17/2002)
; Set to 1 if running under IIS. Default is zero.
; fastcgi.impersonate = 1;

; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
; is supported by Apache. When this option is set to 1 PHP will send
; RFC2616 compliant header.
; Default is zero.
;cgi.rfc2616_headers = 0

; File Uploads ;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

; Fopen wrappers ;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

; Define the anonymous ftp password (your email address)

; Define the User-Agent string
; user_agent="PHP"

; Default timeout for socket based streams (seconds)
default_socket_timeout = 60

; If your scripts have to deal with files from Macintosh systems,
; or you are running on a Mac and need to deal with files from
; unix or win32 systems, setting this flag will cause PHP to
; automatically detect the EOL character in those files so that
; fgets() and file() will work regardless of the source of the file.
; auto_detect_line_endings = Off

; Dynamic Extensions ;
; If you wish to have an extension loaded automatically, use the following
; syntax:
; extension=modulename.extension
; For example:
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.

; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.

5. compile script
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/bin/mysql --prefix=/usr/local/apache2/php --with-config-file-path=/usr/local/apache2/php --enable-force-cgi-redirect --disable-cgi --with-zlib --with-gettext --with-gdbm --with-pear --enable-bcmath --enable-calendar --enable-ftp --enable-magic-quotes --enable-sockets --with-gd --with-curl --with-mcrypt=/usr/local/bin/mcrypt --enable-pdo=shared --with-pdo-mysql=shared --with-sqlite=shared --with-pdo-sqlite=shared

6. Output

<h2>PHP Extensions</h2>
<?print_r(get_loaded_extensions()); ?>

Array ( [0] => date [1] => libxml [2] => pcre [3] => zlib [4] => bcmath [5] => calendar [6] => ctype [7] => curl [8] => dba [9] => dom [10] => filter [11] => ftp [12] => gd [13] => gettext [14] => hash [15] => iconv [16] => json [17] => mcrypt [18] => mysql [19] => posix [20] => Reflection [21] => session [22] => SimpleXML [23] => SPL [24] => sockets [25] => standard [26] => tokenizer [27] => xml [28] => xmlreader [29] => xmlwriter [30] => apache2handler )

thx for your support
Old 10-22-2009, 04:39 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,825

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
What happens if you run:
/usr/local/apache2/php/bin/php -i|grep -i sqlite


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot load mcrypt extension. Please check your PHP configuration. RMLinux Red Hat 6 07-29-2010 03:18 PM
Cannot load mysql extension. camposomar Linux - Server 5 10-01-2009 04:32 PM
phpMyAdmin - Cannot load mySQL extension blizunt7 Linux - Software 3 10-09-2007 09:32 AM
SuSe 10 - PHPMyAdmin, Cannot Load PHP Session Extension mindjet SUSE / openSUSE 2 02-19-2006 10:39 AM
php cannot load mysql extension no_names_left Linux - Software 4 03-02-2005 07:31 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:35 PM.

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