I have a problem about php on centos. When I want to run php script I have problem like that below,
# php removespikes.php -R=/var/www/html/cacti-0.8.8a/rra/gyt_traffic_in.rrd
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/phpchartdir530.dll' -
/usr/lib64/php/modules/phpchartdir530.dll: cannot open shared object
file: No such file or directory in Unknown on line 0
How can I fix this problem?
Related
I cannot for the life of me figure out what triggered this, and no other post seems to cover it. Can of youshed some light and help me resolve this matter? I am suing homebrew for my php. How can I go back to business as usual via php71 or greater? I am using a mac.
THE FOLLOWING IS THE ERROR:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-intl/intl.so' - dlopen(/usr/local/opt/php71-intl/intl.so, 9): image not found in Unknown on line 0
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
Warning: Module 'mcrypt' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/etc/php/7.1
Loaded Configuration File: /usr/local/etc/php/7.1/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.1/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.1/conf.d/ext-intl.ini,
/usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini,
/usr/local/etc/php/7.1/conf.d/ext-opcache.ini,
/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini,
/usr/local/etc/php/7.1/conf.d/php-memory-limits.ini
So the short answer to this is, I ripped out Pear and pcel and anything else related to it I had just added, along with php71/Nginx and reinstalled php72/nginx (more os to be up to date as well), but once I symlinked it all restored to working form.
The real culprit here was pear, as I was originally trying to install xdebug, but pear/pcel took over my php setup and shit hit the fan!
We are no in a much better place, backtrace your steps like I did folks!
I am currently hosting on 1und1.de. my codes work on localhost but upon uploading it on the shared hosting server i got the following errors:
Warning: Unknown: open(C:\xampp\tmp/sess_bnt91ftgq6s4obn2684fud47p5, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\xampp\tmp) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_bz2.dll' - C:\xampp\php\ext/php_bz2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_curl.dll' - C:\xampp\php\ext/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mbstring.dll' - C:\xampp\php\ext/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_exif.dll' - C:\xampp\php\ext/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gd2.dll' - C:\xampp\php\ext/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_gettext.dll' - C:\xampp\php\ext/php_gettext.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysql.dll' - C:\xampp\php\ext/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_mysqli.dll' - C:\xampp\php\ext/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_openssl.dll' - C:\xampp\php\ext/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_mysql.dll' - C:\xampp\php\ext/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_pdo_sqlite.dll' - C:\xampp\php\ext/php_pdo_sqlite.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_soap.dll' - C:\xampp\php\ext/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sockets.dll' - C:\xampp\php\ext/php_sockets.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_sqlite3.dll' - C:\xampp\php\ext/php_sqlite3.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_xmlrpc.dll' - C:\xampp\php\ext/php_xmlrpc.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext/php_xsl.dll' - C:\xampp\php\ext/php_xsl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Warning: Cannot open 'C:\xampp\php\extras\browscap.ini' for reading in Unknown on line 0
What does these errors mean. does these errors have something to do with my hosting provider?
I had this error locally with this message:
Warning: Cannot open "\xampp\php\extras\browscap.ini" for reading in
Unknown on line 0
By changing this line of php.ini file :
browscap="\xampp\php\extras\browscap.ini"
to this:
browscap="C:\xampp\php\extras\browscap.ini"
the error has gone.
It looks as though you've probably copied your php.ini configuration file directly from your system to your hosting server. Don't do that. The data in your configuration file is specific to your XAMPP installation; this is not appropriate for the web server, and is causing these errors because the files referenced in your configuration do not exist on the server.
Sometimes people here are not as they could be...
For whatever reason, your php.ini is mis-configured.
One thing to note that all those missing files are actually Windows files (*.dll) on Linux these would likely be *.so files. I'm assuming your hosting on a Linux server.
First find your php.ini file. If you have command line access via SSH, you can try running:
php --ini
if not you make a simple script, call it test.php like so:
<?php
phpinfo();
?>
Upload the file and run it, something like:
http://www.yoursite.com/test.php
Among the information provided will be the path to php.ini
Once you find it, one option is to edit it and comment out all those extensions, by putting a ";" in front of the line.
Another option is to check if the *.so files exist. Look for them under /usr/lib/php. If they exist, edit your php.ini file to have all those extension end in .so instead of .dll
Finally, if they don't exist, you could install them by using apt-get or yum. An example:
sudo apt-get install php-mbstring
Yesterday I reinstalled my windows and after installed Apache and copied PHP from dir.
And now I can not get access to PDO MS SQL Server.
In my php.ini ; is absent:
extension=php_pdo.dll
extension=php_pdo_mssql.dll
and in D:\Program Files\PHP\ext dll files is exsist.
When I call PDO script from browser I have this error: could not find driver.
In Apache error.log:
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\Program Files\\PHP\\ext\\php_mssql.dll' - \xcd\xe5 \xed\xe0\xe9\xe4\xe5\xed \xf3\xea\xe
0\xe7\xe0\xed\xed\xfb\xe9 \xec\xee\xe4\xf3\xeb\xfc.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\Program Files\\PHP\\ext\\php_pdo_mssql.dll' - \xcd\xe5 \xed\xe0\xe9\xe4\xe5\xed \xf3\xe
a\xe0\xe7\xe0\xed\xed\xfb\xe9 \xec\xee\xe4\xf3\xeb\xfc.\r\n in Unknown on line 0
How can I fix this?
Thanks.
I have tried all the options I could so far find regarding to .dll error but it has not been able to resolve my issue.
Please does any one have an idea of how I can get php to load these dynamic libraries. I am using php 5.3.18, IIS 7 and SQL ServerExpress database and each time i run the phh.info i get lots of error logs like these.
I also noticed that I do not have these .dll files listed in the 'ext' sub-folder that is in my php folder. Please let someone help so that i can move on. I would appreciate every contribution here
[19-Nov-2012 08:44:14 America/Denver] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\PHP\ext\php_msql.dll' - The
specified module could not be found. in Unknown on line 0
[19-Nov-2012 08:44:14 America/Denver] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\PHP\ext\php_pdo_sqlsrv.dll' - The
specified module could not be found. in Unknown on line 0
[19-Nov-2012 08:44:14 America/Denver] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\PHP\ext\php_pdo.dll' - The
specified module could not be found. in Unknown on line 0
[19-Nov-2012 08:44:14 America/Denver] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\PHP\ext\php_sqlsrv.dll' - The
specified module could not be found. in Unknown on line 0
[19-Nov-2012 08:44:14 America/Denver] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\PHP\ext\php_dblib.dll' - The
specified module could not be found. in Unknown on line 0
[19-Nov-2012 08:44:14 America/Denver] PHP Warning: PHP Startup:
Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - The
specified procedure could not be found.
I am wondering if that could be the reason why my dropdown is not able to populate from the database
The interesting thing here is that my connection script works fine but the dropdown does not populate and i dont get any error
if you don't have those files in that folder you need to put them there. Search your drive to locate if they are at a different location.
I was receiving this same error. I downloaded a Dependency Walker program from www.dependencywalker.com and found that the php_pdo_sqlsrv.dll couldn't find php5.dll because I didn't have my php files in my system path. I added the php install to my path and the warnings went away.
I am running the following script on a cronjob...
cd /etc/parselog/
php run_all.php >/dev/null
and am getting the following errors:
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './mysql.so' - ./mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './mysql.so' - ./mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './mysqli.so' - ./mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './odbc.so' - ./odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo_mysql.so' - ./pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo_odbc.so' - ./pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo_sqlite.so' - ./pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Fatal error: Call to undefined function mysql_connect() in /etc/parselog/stats_downloads.php on line 5
However, when I run the same script from the command line, logged in- it works perfectly without error.
This is my $PATH string at the prompt:
$PATH = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
Any ideas or suggestions? I am certain when running the cronjob, it does not have a lib path or something included. I even tried adding the exact path
Tip 1: Ensure you have exactly the same $PATH in the cron job:
cd /etc/parselog/
export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
php run_all.php >/dev/null
Tip 2: Make sure all other environment variables match as well. Dump the environment with the command env, and add the corresponding exports to your cron job.
Generally when something fails during cron but runs on the command line it's permissions, working directory, or environment variables.
It looks like the php executable itself isn't loading the libraries, the problem might not be in your script.
When you run a script in a cron job, it is run in a limited shell with very few environment variables set. From your errors, it looks like it may be the LD_LIBRARY_PATH that needs to be set as the errors pertain to a bunch of shared libraries, but that is just a guess. It looks like the proper library paths for PHP are not being set up correctly in the cron script.
You can capture the environment used when running the cron script by adding the env command to the script and capturing the output. Compare this to the env output at the prompt and look for variations. Most likely they will be from commands issued in either your local or system profile or bashrc (or maybe even .login) files that set up library paths. I'd specifically look for paths and variables related to PHP since that seems to be your issue.
I had to deal with this issue several times on my last project and the basic solution is to:
determine the minimum environment needed to execute the script
create a short script that sets up the desired environment
add a call to the script from item 2 in the script launching your applications so that the environment is set up properly.
Test thoroughly to make sure you didn't miss anything :-).
When a cron job is run from the users crontab it is executed as that user. It does not however source any files in the users home directory like their .profile, .cshrc, or .bashrc or any other file. If you need cron to source (read) any file that your script will need you should do it from the script cron is calling. Setting paths, sourcing files, setting environment variables, etc.