PHP 5.2.11 Update Problem [closed] - php

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I just updated PHP 5.2.0 to 5.2.11 and now I am getting loads of errors when calling PHP :(
I downloaded source and used the same ./configure line from old phpinfo then did make install.
The errors I'm getting are below, anyone have any ideas how to sort out this mess please?
This is on RHEL 5.2
PHP Warning: PHP Startup: dbase: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: dom: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: gd: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: imap: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mbstring: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: xmlreader: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: xmlrpc: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: xmlwriter: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/xsl.so' - /usr/lib/php/modules/xsl.so: undefined symbol: dom_node_class_entry in Unknown on line 0

Problem solved - just had to ditch a load of ini files in /etc/php.d
Maybe not the best solution, I'm not sure if I've now lost some functionality, but everything I need it to do works so it's fine.

I'm going to wager that those modules were installed via pecl, as opposed to compiling them along with php. Do you have options like --with-pdo, --with-pdo-mysql in your ./configure line? If not, then all this stuff could have been installed (which includes compilation and linking against PHP) via pecl after the initial PHP compile.
What happens if you upgrade each via pecl?
pecl upgrade <modulename>

Related

How to install SSH2 for PHP5.6

I need to install SSH2 to my PHP5.6. So as I read this accepted answer I downloaded zip from here then coppied php_ssh2.dll and php_ssh2.pdb to php/ext and libssh2.dll to Windows/system32. And after Apache restart and SSH2 call it throws me this error:
PHP Warning: PHP Startup: ssh2: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
Warning: PHP Startup: ssh2: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
How can I solve it? Thanks you.

EasyPHP 16.1.1 installation causes PHP warnings

Installed EasyPHP 16.1.1 on Windows 10 but when launching, I get the following errors:
[core:warn] [pid 10808:tid 580] AH00098: pid file C:/Program Files (x86)/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418vc11x86x160806141849/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
PHP Deprecated: Comments starting with '#' are deprecated in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php5624vc11x86x160810035427\php.ini on line 877 in Unknown on line 0
PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mbstring: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php5624vc11x86x160810035427\ext\php_pdo_pgsql.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\php\php5624vc11x86x160810035427\ext\php_pgsql.dll' - The operating system cannot run %1.\r\n in Unknown on line 0
PHP Warning: PHP Startup: sockets: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
and some other errors.
I'm assuming this is because I have older versions of EasyPHP/PHP/MySQL on my drive but was not able to figure out how to properly uninstall them. What is going on and what needs to be done to get the new version to work properly?

PHP Module warning

I ran the command php –I and I received the following warning:
Warning: PHP Startup: ▒=!: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
As you can see it doesn't give me the module name, how can I discover the module name?
Modules installed
-bash-3.2$ php -m
Warning: PHP Startup: ▒=!: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[PHP Modules]
ctype
curl
date
dom
filter
gd
hash
iconv
json
ldap
libxml
mcrypt
mhash
mysql
oci8
openssl
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
As you can see from running the php -m I get the error again, but no insight to what module it might be.

PHP crashes when I run a script

Whenever I try to run a PHP script on the command line, it crashes imediately. I get this errors:
Xdebug requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
Warning: PHP Startup: imap: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: gettext: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: yaz: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: pgsql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Fatal error: Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
This is the PHP part of my .profile.
# make sure we use MAMP version of php and other binaries
export PATH=/Applications/MAMP/bin/php/php5.3.14/bin/:$PATH
# make sure we use MAMP version of mysql and other binaries
export PATH=/Applications/MAMP/Library/bin:$PATH
# make sure we are using the same php.ini as MAMP PRO
export PHPRC='/Library/Application Support/appsolute/MAMP PRO/conf/php.ini'
# make brew doctor happy
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
This has been working for months without problems. But leatly I updated to Maverik and had to update XCode and lots of homebrew stuff. After all I thought all my PHP stuff is comming from MAMP and should not be related to this.
Any ideas?

How to get PHP command line to work with PDO?

I want to work with PDO, through PHP command line.
It works perfect through the PHP web API, but not through the command line.
But when I execute the command: php test.php, it says unknown class PDO.
I think it has something to do with the thread-safety difference.
Because, when I execute the above command, the following warnings come: -
F:\shema\htdocs>php test.php
PHP Warning: PHP Startup: soap: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: sockets: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Fatal error: Class 'PDO' not found in F:\shema\htdocs\test.php on line 2
PHP version: 5.2.9-2, downloaded from
here.
OS: Windows Vista
If the problem is with the modules, where do I get the thread safe modules for those modules?
Your PHP and your modules were compiled with different thread-safety (turned "on" in PHP, turned "off" in the modules). Grab the correct non-thread-safe (or "nts") build of PHP to match the modules you're trying to use and your problem should clear up.
Ah, you see
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=1
Thread safety mismatch. You need to get the ones with thread safety turned on.
You have an error defining extension_dir in your php.ini. Try to put there absolute path.

Categories