I have mysql_connect running with no problem on my site...
I have a script that i'm running from a CRON job, and here it decides to not work, and output these two errors:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/ssh2.so' - /usr/lib64/php/modules/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0
Fatal error: Call to undefined function mysql_connect() in /home/mysite/public_html/phpMySQLAutoBackup/files/schema_for_export.php on line 22
Yes, I'm using phpMySQLAutoBackup
Any ideas? This befuddles me...
The time I got one of these (Unable to load dynamic library ...) I was missing a module. In your case my guess would be that you're missing "libssh2"
Similar to PHP Errors on a cronjob, works fine at prompt
Check your $PATH, permissions, & any environment variables...
Related
Ok, so when I run my php file it gives me this error:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_sockets.dll'
In my php.ini file, I've added the line "extension=php_sockets.dll" but it still gives me this error. I've searched many ways of solving this problem but they didn't work.
I've noticed someting in the error. It said this:
C:\xampp\php\ext\php_php_sockets.dll.dll (The specified module could not be found.))
Why does it say php_php_socketsdll.dll? How can I fix this?
I try to use the trader_macd() function in PHP. But it always returns bool(false). I tried different parameters, values for the array but i always get the same. PECL is enabled and the function answers but i never get a good calculation.
Anyone knows if this is an issue of the trader.so extension or from my code?
$values = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27);
$macd = trader_macd($values, 12, 26, 9);
var_dump($macd);
Thanks!
I found the issue. Apache was sending an error message
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/trader.so' - /usr/lib/php5/20131226/trader.so: cannot open shared object file: No such file or directory i$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/trader.so' - /usr/lib/php5/20131226/trader.so: cannot open shared object file: No such file or directory i$
There were two modules installed at the same time. On in 20131226 and one in 20121212. So i removed the oldest and it works like a charm!
I am having a problem with a small class project. I have installed XAMPP, created the table that I need, loaded my *.sql database in it, but my project can't run because of some PHP issues I guess.
I had the $_SESSION problem, which I found a solution to, but then...
I am getting the famous:
Fatal error: Call to undefined function mysql_connect() in C:\xampp\htdocs\gabi\telk\DbSql.inc.php on line 11
But I can't bypass the problem. I have read other threads on this problem here but neither of them solves the problem for me.
Here is my code that is inside the DbSql.inc.php :
http://codepad.org/ToGmPB26
Check in your php.ini file if you have the line:
extension=php_mysql.dll
And it's not commented (with the ; in the line start)
I have notice I started getting this error message in my error log:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php
/extensions/no-debug-non-zts-20060613/pdf.so' - /usr/local/lib/php/extensions
/no-debug-non-zts-20060613/pdf.so: cannot open shared object file: No such file
or directory in Unknown on line 0
The error goes into the log every time you open the main page but everything seems to be working. Does anyone have any ideas what might cause this error to occur, I have been change the code in the past few days but when read back though I can't find anything that could be the cause.
there's nothing on the page that I have changed for when it initially loads but i have changed things in areas where I have if (isset...etc.
Any possible suggestions are appreciated. what type of command might this error message be caused by?
It appears your PHP installation is configured to load http://www.php.net/manual/en/intro.pdf.php and cannot find it.
Remove its respective extension entry in php.ini or fix the path or ensure the file exists if you require it.
I entered the following command through plesk (control panel) crontab, to run a php file once an hour:
php httpdocs/cron/script.php
And I am getting the following 2 error messages (once an hour, to my email):
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/http.so' -
/usr/lib/php/modules/http.so: cannot open shared object file: No such file or directory in
Unknown on line 0
PHP Warning: require_once(): open_basedir restriction in effect.
File(../include/functions.php) is not within the allowed path(s):
(/var/www/vhosts/basedomain.com:/tmp) in /var/www/vhosts/example.com/httpdocs/cron/script.php
on line 2
PHP Warning: require_once(../include/functions.php): failed to open stream: Operation not
permitted in /var/www/vhosts/example.com/httpdocs/cron/script.php on line 2
PHP Fatal error: require_once(): Failed opening required '../include/functions.php'
(include_path='.:') in /var/www/vhosts/example.com/httpdocs/cron/script.php on line 2
Note: Line 2 has require_once(../include/functions.php);
I realized these are 2 different issues. I tried solving each separately and they are both still with me. Any help would be appreciated. Thanks
When you run PHP like this, configuration set in Plesk-specific and Apache-specific places like vhost.conf doesn't apply.
Since your script is already inside httpdocs, why don't you just use wget/curl to invoke the script through HTTP? Something like /usr/bin/curl http://yoursite.com/cron/script.php 2>&1. Might want to consider some additional validation (IP limiting, htpasswd auth) to make sure random visitors (script kiddies) can't run it.
Please check below, maybe it will help you.
http://www.geeklog.net/forum/viewtopic.php?showtopic=28107