The error text is :
sasql_connect(): The SQLAnywhere client libraries could not be loaded. Please ensure that libdbcapi_r.so can be found in your LD_LIBRARY_PATH environment variable.
I get this error when I run the code as a Laravel Job. However, SQL Anywhere connection is successful if I write a controller function.
I think, if there was a problem about my SQL Anywhere installation, I would face the same error in the controller function.
I am trying to find a solution for 3 days without hope.
All replies will be helpful.
Thanks.
I found a solution. The problem was not about php versions. It was because supervisor (I use it for monitoring queued jobs). I set environment variable in /etc/supervisor/conf.d/my-worker.conf environment=LD_LIBRARY_PATH=/opt/sqlanywhere17/lib64 After updating supervisor ("supervisorctl update") everything worked well.
Related
last year i have purchased an encrypted script wich run two crons jobs, a month ago crons stop working and i have talk to the hosting company they said its script problem , The PHP cron file works fine without any errors when visited by browser, the script provider told me that this issue should be fixed by hosting service and refuse to help !
here the command used it run every 10 MIN /home/username/public_html/cron/cron.php
cPanel Version 64.0 (build 24)
Apache Version 2.4.25
PHP Version 5.6.30
my question is it true upgrading the PHP version will affect cron job and how can i solve this?
thanx
In short, yes, upgrading PHP can effect your scripts -- the crons aren't run by Apache or PHP; the crons run from the OS level.
Your PHP upgrade is most likely affecting the crons in one of two ways:
The upgrade was large, like PHP5.6 to PHP7.0 and there's a deprecation warning somewhere (which will output in the crons' log) or the script is running some code that's now fully deprecated; most likely a query or a class/method named after a reserved word. Your logs will have more info, just make sure you have debugging turned on, otherwise your errors will be suppressed.
The new PHP settings from the upgrade have disabled some of the allowed rules from an older PHP version, such as getting away with empty or unassigned variables, and now your script is running into errors (ie. using a variable that doesn't exist, such as $_REQUEST['something'], which would have been empty but now returns an error that effects the rest of the script).
To fix this you need to know what the problem is. The easiest way is to access the log files that crons often create. If you don't get that with your host, ask them for it, or ask them to send you a copy of the error that's being created -- a quick Google on the error will tell you what the problem is. But without knowing more about the script or the error log, you probably won't get a better answer.
old command is working its just me i did copy past from my old backup and i forget the PHP at the firts off command ! nothing has changed the command should be like that exp : php /home/username/public_html/cron/cron.php
I have a VPS running centos 7 in which I have installed Postgresql-9.3. It was running fine for the last one year. Now, when I need to take a backup using pg_dump it is not working. It was working. I used
pg_dump -d <role_name> > <backup_file_name.sql>
It doesn't show any errors. But there is no backup file being created.
SQL Queries are working fine.
Also my project (based on Yii framework) is unable to connect with the database anymore. Shows
CDbException
CDbConnection failed to open the DB connection: could not find driver
It all suddenly happened and I am stuck.
None of the logs give me any hint. Where should I check to find out a solution?
As for second question - seems like you are missing php-postgress drivers, exactly as error message says. You can try installing them back, as described in this question: How do I enable php to work with postgresql?
As for the first - I think that you updated or removed some important packages from your system. Also it could be upgrade consequences.
Firstly forgive me if my terminology isn't entirely accurate. I have only limited knowledge on this subject, but will best try to convey the problems we are having. My server administrator is trying to deploy php 5.5.9 on a live server. Originally the intention was to install php 5.4.x, but we opted for the latest version instead (a manual compile is required regardless due to the o/s)
The O/S is OpenSuse 12.1 and the server is a Plesk server (Plesk Version 11.0.9) with Apache 2.2.1. This particular o/s does not have the ability to update php automatically so everything has to be done manually. Since we didn't want to risk screwing up the server (currently running with php 5.3.8), we opted to install a second version of php alongside the current one. The instructions we followed are outlined here: http://kb.parallels.com/en/114753
After numerous failed attempts due to missing libraries during compilation, we were finally able to compile php 5.5.9 without error and then proceeded to run tests with 'make test'
Unfortunately, the test results came back with 32 failures and 20% of the total tests were skipped. A total of 13011 tests were done, 10410 of which were completed. The TEST SUMMARY can be downloaded from here: http://uploaded.net/file/v6ug55l8
Anyway, deciding we might aswell give it a try, we applied the changes as indicated in the first link above to the vhost.conf. However, it didn't work, and the vhost then returned Internal Server Errors for every page regardless of script or extension. The errors logs sadly do not indicate any errors, only a whole ton of internal server errors recorded by mod_security. We did notice a huge number of these in the error log: Warning: SuexecUserGroup directive requires SUEXEC wrapper. But, it doesn't seem to be related, as the same error goes back several weeks.
So, we're stuck without any idea what to do next. Our next attempt will be to try and compile a php 5.4.x instead, as perhaps something is bumping heads with 5.5.9...
Any and all advice will be appreciated. As per the opening statement, I'm not an expert here, so if you need any additional information about the machine and it's server, feel free to ask. Thankyou for your attention!
Problem solved. The vhost's CGI-BIN needed to be CHMOD 755 and not 775.
Trying to install Joomla 2.5.7 but I can't get past the Pre-Installation Check as it says: Database support: No
I've got mysql (5.5.24) and php (5.3.15) installed manually on a Linux machine (I don't want to use LAMPP). I've done this a few times before and checked everything is the same with my other working machines in terms of the packages and the php.ini file. I can also access the mysql fine.
Any suggestions on what I can try? Is there a way to find out what check it is failing on?
Argh! I did miss a package. A pretty vital one at that: php-mysql. Don't forget to restart web server.
Joomla checks what databases are supported by testing each type for a connection. One possible issue is that the way you have things set up the owner of the installation process does not have permission to use the databases.
Ooops sorry I didn't see that you had soled
Most CMS come with a sql database setup files. These files must be added to your mysql data. Or tables and users must be manually created.
Have you done this?? If not check manual for details.
http://linuxinternetworks.com/how-to-install-joomla-in-linux/
Comment, after trying, I am reading it too.
I am running a LAMP server for my development environment on Ubuntu 11.10.
I installed pear's DB (I know its deprecated, but this Google maps API class requires it)...
I have installed it, but now every time I try to load this "HelloWorld" map I'm testing on, I get an error message DB Error: not found.
I checked my dsn string and it looks good, I changed the database table to the correct table I am using, etc.
Apache error log doesn't report anything for this problem.
Has anybody run into a similar problem, or have any ideas what the problem could be?
If you need to see any code, I'll post it...
The database driver you're using cannot be found. Check if you're using the correct one.