How to run extension=mongo.so in php.ini - php

I am using centos 6. I have installed mongoDB using yum install mongo-10gen mongo-10gen-server. I started the mongo server using /etc/init.d/mongod start. I then added extension=mongo.so to my php.ini. I then restarted my apache server with /etc/init.d/httpd restart, and all are ok. but mongo php-driver is not working properly. when I checked my php version with php version, I got an error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mongo.so' - /usr/lib64/php/modules/mongo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Could not open input file: version
How can I fix this problem?

Related

How to fix php artisan serve in Laravel 5.4

when I run the command
php artisan serve
it's run but it show to me this error
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_mysql.dll' - /usr/lib/php/20151012/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
This a PHP installation problem. I had this problem on my linux distro. Here's a few things you can do:
(Optional)
Uninstall PHP;
Reinstall PHP;
Edit php.ini . This is how you find path to edit php.ini on windows.
Now check if the above lines are uncomented:
extension=pdo.so
extension=pdo_mysql.so
If they are, its recommended to uninstall/reinstall PHP or manually install function on windows.
Remember to restart apache server after change php.ini file.

yaml xampp warning: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll'

I installed the recent versions of xampp for windows and yaml on my PC with windows 8.1 64bit.
The versions were
xampp-win32-7.0.9-1-VC14-installer.exe
php_yaml-2.0.0rc8-7.0-ts-vc14-x86.zip
I put the line of extension=php_yaml.dll to the end of php.ini file.
I copied php_yaml.dll to C:/xampp/php/ext folder.
I copied yaml.dll to C:/xampp/apache/bin folder.
phpinfo(); command displayed that yaml was enabled.
But bad warning still appeared on command prompt when typing php command:
$ php
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The spec
ified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The specified
module could not be found.
in Unknown on line 0
See it on screenshots:
How to fix it?
Add ;C:\xampp\apache\bin to PATH Windows environment variable.
I fixed mine by downloading the correct version of yaml. The yaml Version has to match the installed PHP version. Make sure that you match the thread-safe and non-thread-safe option with your PHP aswell.
How to check if your PHP is thread-safe

Problems loading Alternative PHP Cache (APC)

I have a VPS hosted by linode running ubunutu 12.04 LTS. I took a look at my error.log file and it looks like APC isn't loading.
I have
extension=apc.so
in my php.ini file and I've tried:
sudo apt-get purge php-apc
sudo apt-get install php-apc
but that didn't fix it. Here's the error I'm getting.
[28-Mar-2015 10:39:01 America/Los_Angeles] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/apc.so' - /usr/lib/php5/20121212/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
I found a copy of the apc.so file here:
/usr/lib/php5/20090626/apc.so
I tried changing the php.ini file to:
extension=/usr/lib/php5/20090626/apc.so
and restarted apache
sudo service apache2 restart
but got this error instead
[28-Mar-2015 10:56:43 America/Los_Angeles] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/apc.so' - /usr/lib/php5/20090626/apc.so: undefined symbol: zend_unmangle_property_name in Unknown on line 0

Unable to run Zorba 3.0 with PHP 5.5.9 on Windows 7

I have downloaded and installed Zorba 3.0 on my PC/Windows 7. I've already had Apache/2.4.7 and PHP/5.5.9 up and running.
I also have the following in my php.ini for Zorba:
include_path = ".c:\php\includes"
extension_dir = "C:\PHP\ext"
extension=zorba_api_php.dll
The zorba_api_php.dll is from C:\Program Files (x86)\Zorba XQuery Processor 3.0.0\share\php and I copy it to c:\PHP\ext folder.
When I restarted my Apache server I got the following error in the log:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\zorba_api_php.dll' - The specified module could not be found.\r\n in Unknown on line 0
I had checked my Zorba installation by running zorba.exe from DOS prompt:
C:>zorba -q 2+1
</code -->
3
It is working fine.
Thanks,

Warning, when I run a PHP script

When I run a php script in console, I'm getting a following warning:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/php_mcrypt.dll' - /usr/lib/php5/20090626/php_mcrypt.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/php_curl.dll' - /usr/lib/php5/20090626/php_curl.dll: invalid ELF header in Unknown on line 0
The PHP script is correct, because it works on other comuputers.
I have an Ubuntu and server apache2
Check your php.ini currently you are trying to load a windows extension on a linux server.
Have a look in the folder /etc/php5/apache2/ for any file with a name like mcrypt and see if it references a dll file. If so, delete that file and restart apache
If you have ubuntu then sudo apt-get install php5-mcrypt will enable mcrypt for you

Categories