LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error installing PHP with Apache (undefined symbol: sqlite3ExprDelete) (https://www.linuxquestions.org/questions/linux-software-2/error-installing-php-with-apache-undefined-symbol-sqlite3exprdelete-852166/)

ShellyCat 12-24-2010 02:02 AM

Error installing PHP with Apache (undefined symbol: sqlite3ExprDelete)
 
Hello,

I installed Apache (configured for module support), and installed PHP (configured with apxs2 so Apache modules can be compiled) following the instructions at PHP.net.

Now I get this error when trying to restart Apache:

Quote:

Syntax error on line 54 of /usr/local/apache2/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: sqlite3ExprDelete
I will not be using "sqlite" for anything web-related (it is a requirement for some other software). How can I reconfigure or recompile PHP in order to get rid of this fatal error?

Apache version: httpd-2.2.17
PHP version: php-5.2.13

bathory 12-24-2010 03:45 AM

Hi,

Did you stop and start again apache, after installing the new php module?
The sqlite3 symbols are present despite if you add or no sqlite support in php. To get rid of them, you need to use "--without-pdo-sqlite --without-sqlite" in the ./configure options.

BTW, since you're compiling php from source why don't you use the latest 5.3.4. If you have to use php-5.2, you can compile the latest 5.2.16, but keep in mind that php stopped supporting version 5.2

Regards

ShellyCat 12-25-2010 03:41 PM

Quote:

Originally Posted by bathory (Post 4201907)
Hi,

Did you stop and start again apache, after installing the new php module?
The sqlite3 symbols are present despite if you add or no sqlite support in php. To get rid of them, you need to use "--without-pdo-sqlite --without-sqlite" in the ./configure options.

BTW, since you're compiling php from source why don't you use the latest 5.3.4. If you have to use php-5.2, you can compile the latest 5.2.16, but keep in mind that php stopped supporting version 5.2

Regards

Thanks!
Yes, in fact I restarted my whole system (because I discovered I will get 'cannot bind to port" errors until I restart).

That configuration option is exactly what I need! I will try it.

Re: php/apache versions: I'm not running a production server. This is my development machine, so I want the PHP version to be as close as possible to the server space I rent (5.2.x). Their Apache is even older (1.x) but that's a less critical issue, since I'm not using any advanced features of Apache.

ShellyCat 12-25-2010 06:11 PM

Restart your computer if you get "undefined symbol" errors.
 
Quote:

Originally Posted by bathory (Post 4201907)
The sqlite3 symbols are present despite if you add or no sqlite support in php. To get rid of them, you need to use "--without-pdo-sqlite --without-sqlite" in the ./configure options.

I want to report that this worked, but then I got another:
Quote:

undefined symbol: php_ini_opened_path
Googling it, the first approach I found was to do "make clean" before even configuring...but you can't do that with newer php. (It will tell you there is no target "clean.")

Then I decided I better try restarting my computer, just in case, before I drove myself crazy re-compiling yet again. It turns out that's all I really needed to do (at least regarding php_ini_opened_path); maybe I didn't need to re-configure and re-compile to get rid of the first undefined symbol, either. I don't know.

But since that configure option did get rid of the error, I wanted to report back that it did work.

However, I would advise anyone getting "undefined symbol" errors to restart their computers before trying other solutions. (I guess I'm just used to the assumption that you don't have to restart Linux...it's a generalization that's not always true!)


All times are GMT -5. The time now is 07:28 AM.