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 11-22-2009, 01:53 AM   #1
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Rep: Reputation: 15
Missing php extension directory: where is "./" directory?


I'm using CentOS 4.2. I compiled PHP 5.2.11 on Apache 2.2.14, using the following prefixes:
Quote:
--prefix=/usr/local/apache2/php
--with-config-file-path=/usr/local/apache2/php
When I opened php.ini, it says extension_dir = "./". Since my prefix is /usr/local/apache2/php/, I assume ./ means the same directory as the prefix dir. So I put an .so module in /usr/local/apache2/php/, and tried to use it (it was php_mapscript.so module, by the way).

And then I failed. Both dl('php_mapscript.so') and extension = "php_mapscript.so" just did not work.

Oddly, when I change the extension dir to /usr/local/apache2/php/, both "dl" and "extension =" works flawlessly. So it seems "./" does not point to PHP prefix.

Where does "./" point to, then? It seems PHP root directory is not the same with its prefix.

By the way, here's the complete ./configure switches:
Quote:
./configure \
--prefix=/usr/local/apache2/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-pgsql=/usr/local/pgsql/bin \
--disable-cgi \
--with-config-file-path=/usr/local/apache2/php \
--with-openssl \
--with-kerberos \
--with-zlib \
--with-bz2 \
--with-curl \
--enable-dbase \
--with-gd \
--with-xsl \
--with-mysql \
--with-pdo-mysql \
--with-gettext \
--with-pear \
--with-regex=system
I know I could simply use "extension = /usr/local/apache2/php/". I just wonder what directory does PHP point by "./".
 
Old 11-22-2009, 03:31 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you have compiled php using --prefix=/some/path, then the extension_dir is located in /some/path/lib/php/extensions/no-debug-non-zts-XXXXX (where XXXXX depends on php version).
To find the default extension_dir, you can run:
Code:
php-config --extension-dir
Cheers

Last edited by bathory; 11-22-2009 at 03:50 AM.
 
  


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
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". HELP! badgerbox76 Linux - Newbie 35 03-08-2007 02:27 AM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". badgerbox76 Linux - Games 13 01-11-2006 04:47 PM
suse ati driver "Xlib: extension "XiG-SUNDRY-NONSTANDARD" missing" madcow007 Linux - Hardware 0 03-06-2004 02:53 PM

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

All times are GMT -5. The time now is 08:56 AM.

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