$ ./migrate-cron.php
PHP Fatal error: PDFlib error: Version mismatch in wrapper code in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library './gd.so' - ./gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library './imap.so' - ./imap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library './ldap.so' - ./ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library './mysql.so' - ./mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library './pgsql.so' - ./pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library './readline.so' - ./readline.so: cannot open shared object file: No such file or directory in Unknown on line 0
The file executes just fine - it even uses mysql. All those extensions are located in the /usr/lib/php/extensions directory. How do I tell my command-line script where to look for them? Is it something with php.ini that I have to fix up (include_path maybe?)
Thanks!
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Well, my php.ini file doesn't load those extensions (I think) - the string 'gd.so' is nowhere to be found. I did find a variable called 'extension_dir' that was set to './'. I changed that to '/usr/lib/php/extensions/' and got a bunch more errors:
PHP Warning: Function registration failed - duplicate name - gd_info in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - imagearc in Unknown on line 0
....
and so on for every function in gd, ldap, and mysql.
I can run command line scripts on every other server where I work, and don't get any errors like this. However, those PHP installations don't have a php.ini file at all.
Any ideas?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
I have a feeling you have another PHP ini file lying around and it's already doing the extension initialization, so what's happening is PHP is attempting to re-initialize it (thus the function failed registrations).
That's what I thought too, but if there is another php.ini file, my server doesn't know where it is. This is what I get from calling 'locate' after running 'updatedb'
I think you're right that those .so files are being referenced elsewhere because when I call the script from whithin the /usr/lib/php/extensions/ directory, I get those 'function registration failed' errors.
There are no extensions being loaded automatically using the extension=extension_name.so format. Could these extensions be called from anywhere else?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.