php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56875 Fail to install (Invalid library)
Submitted: 2006-03-04 15:34 UTC Modified: 2016-07-04 13:17 UTC
From: pavlos at psychology dot gr Assigned: cmb (profile)
Status: Closed Package: stats (PECL)
PHP Version: 4.4.1 OS: Gentoo Linux on PPC (mac mini)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pavlos at psychology dot gr
New email:
PHP Version: OS:

 

 [2006-03-04 15:34 UTC] pavlos at psychology dot gr
Description:
------------
Hello!
I am trying to install stats. 

When I restart Apache I get the error: 
PHP Warning:  Unknown(): Invalid library (maybe not a PHP library) 'stats.so'  in Unknown on line 0

I have tried to install with "pear install stats". 
Then I tried to install manually from CVS (phpize et al.). 

The error remains the same. 
I have tried both dl('stats.so') or extension=stats.so in php.ini. 
The error is either displayed or written in the apache error log.

Some info (could be irrelevant): 
gcc -v
gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)



Reproduce code:
---------------
pear install stats
echo "<?php dl('stats.so'); ?>" |php

Expected result:
----------------
nothing

Actual result:
--------------
Warning: dl(): Invalid library (maybe not a PHP library) 'stats.so'  in - on line 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-13 16:15 UTC] rashid at ds dot pg dot gda dot pl
windows builds from snaps.php.net have the same problem
 [2006-03-15 09:48 UTC] keke at keke dot dk
I have same problem.
Linux 2.6.14-gentoo-r5 on x86
Using PHP-5.0.5 and tried too PHP-5.1.2
doesn't make a differens.

PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'stats.so'  in Unknown on line 0
 [2006-03-25 07:17 UTC] cherry_avium at yahoo dot com
Here's the steps to fix the problem:
1. run phpize
2. edit generated Makefile
3. add -DCOMPILE_DL_STATISTICS to CPPGLAFS
4. make, make install

Or else
1. open statistics.c
2. remove the #ifdef and #endif in line 136-138 around ZEND_GET_MODULE(stats)

Or else, maybe, compile it staticly with php :D
 [2006-03-25 07:48 UTC] php at hristov dot com
Hi,
can you test changing COMPILE_DL_STATISTICS to COMPILE_DL_STATS
in statistics.c  and try to compile it again as a module without
touching anything else?
Thanks,
Andrey
 [2006-03-25 11:58 UTC] cherry_avium at yahoo dot com
Hi,

I have changed COMPILE_DL_STATISTICS to COMPILE_DL_STATS in statistics.c, then did make clean, make, and install the extension, and ran the standard deviation test, result is:
------------------------------------------------
string(11) "2.449489743" 
Warning: stats_standard_deviation() [function.stats-standard-deviation]: The array has zero elements in /var/www/sd.php on line 5
bool(false) float(2.1213203435596) ---Variance--- float(3.6) float(4.5) 
------------------------------------------------

So I guess it worked.
 [2006-04-09 12:28 UTC] bm_bkm at yahoo dot com
Same problem i get with php_stats.dll

i am trying it on pws
 [2006-04-09 14:27 UTC] php at hristov dot com
Do you have fresh dll? I think this was fixed few weeks ago, at least the Unix platforms, but the problem probably was caused by the same root.
 [2006-04-12 11:02 UTC] bm_bkm at yahoo dot com
I had used the latest but nothing happened.
 [2016-07-04 11:44 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-07-04 11:44 UTC] cmb@php.net
I assume this issue has already been resolved, hasn't it?
 [2016-07-04 12:58 UTC] pavlos at psychology dot gr
Oh yes, a very long time ago! The computer I mention in the bug has been broken since, and I am still using the math-stats library in every installation.
 [2016-07-04 13:17 UTC] cmb@php.net
-Status: Feedback +Status: Closed
 [2016-07-04 13:17 UTC] cmb@php.net
Thanks for the fast reply. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC