PHP PEAR GoogleMapsAPI DB Error: not found - php

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.

Related

phpMyAdmin (MAMP): Error while working with template cache: Unable to write in the cache directory

First post! I am working on a client site, trying to get their website going on a local Apache server on my Mac using MAMP. Am jumping thru hoops and this one has me stumped. I've imported the site, created the database and am trying to connect to it thru phpAdmin. I can get into the initial DB structure screen just fine, but when i click on the desired database, i get the following error:
"Error in processing request. Error code 500. Error text: Internal Server error (rejected). It seems the connection to your server has been lost. Please check your network and server statistics".
I also get an error on the lower part of the screen:
"Error while working with template cache: Unable to write in the cache directory (/Applications/MAMP/tmp/phpMyAdmin/twig/3f)."
I checked the apache_error.log and mysql_error_log.err and they are both clean. However, the php_error.log shows the issues:
"[16-Jul-2021 07:58:22 Europe/Berlin] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to write in the cache directory (/Applications/MAMP/tmp/phpMyAdmin/twig/3f).' in /Applications/MAMP/bin/phpMyAdmin/vendor/twig/twig/src/Cache/FilesystemCache.php:61"
(and there's a stack trace that i can paste in if necessary....)
I've done some fairly extensive research and two things are suggested.
(1) the most common theory is that it is a permissions issue. I've checked and given read/write privs to the world thru the whole chain of directories in the path listed above (/Applications/MAMP/tmp/phpMyAdmin/twig/*). This does not solve the problem.
(2) it is recommended to download a more recent version of phpMyAdmin (just upgrade to the latest and greatest and all will be well!). I also did this, followed the instructions and got the error saying that i needed to be on php version 7.1.3 or later. As near as i can tell, there is no other option between my version (4.9.7) and the next (and current one) 5.1.1. So that didn't work for me either.
I'm currently at php version 5.6.40 on this client site and upgrading is a no-go for me (at least right now).
My environment is:
MAMP 6.3
PHP 5.6.40
MySql 5.7
phpMyAdmin version: 4.9.7 (the upgrade that i attempted above was to version 5.1).
I've been unable to find any other options. Can anyone help me out? I'm relatively new to PHP, but a pretty experienced software developer overall.

Laravel sql anywhere connection error in ubuntu apache

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.

postgres pg_dump not working

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.

MongoDB connects through terminal, but not via PHP?

I just started messing with MongoDB and everything is working great so far. I've installed the Mongo Server and the mongo.so PHP extension on my local XAMPP server (Mac).
I've managed creating a new admin user, and a new regular user using mongo in the terminal .
When trying to authenticate with that user via the Terminal or via MongoHub it would work just fine, but if I'd try to login throw RockMongo or just my own PHP script, it would always fail.
My guess is something is wrong with my PHP module perhaps? Any opinions?
Edit (Some more info):
When connecting with wrong information I would actually get a thrown MongoMongoConnectionException.
When I'm connecting with the correct information I'd get an empty page, or when trying with curl it would just return curl: (52) Empty reply from server
Mongo installed on the server is v1.3.0
Because of these two things I think this might be a messed up module. Anyone knows of this situation ?
Try the following way to connect to mongodb. It worked for me.
$m = new Mongo("mongodb://username:password#host:port");
By Default mongo port is 27017. You can also check that your php is thread safe & VC is same as the mongo_php extension. Sorry for my english.
I got on the #mongodb irc channel over at Freenode and get assisted by the very helpful and nice Derick who developed the PHP Module.
Eventually the problem was a faulty installation by MacPorts. I downloaded the latest Mongo driver 1.3.0 sources from http://pecl.php.net/get/mongo-1.3.0.tgz, manually compiled it and everything is working fine now.
Thanks to anyone who tried to help.

Enable MsSQL PDO driver on LAMP w/ PHP5.3.6

I've been googling and searching SO for the better part of an hour, and fail to find a good answer. I'm a server admin noob here, so I'm sure this is not too difficult, but I sure don't know what to do.
Info:
Running PHP5.3.6 on an Apache server, using WHM/cPanel as the server admin GUI
I'm trying to connect to a client's MsSQL database, and alas, get the following error:
Fatal error: Call to undefined function mssql_connect()
So I start googling, see that perhaps that's not the best function to use anyway. Alright, so I look at PHPinfo for PDO support:
PDO drivers sqlite, sqlite2, mysql
How on earth do I get mssql to show up in that list, so I can do something like the following:
$dbh = new PDO("mssql:host=host.name;dbname=name", 'user', 'pass');
I can't seem to google my way out of this one. Any thoughts?
You can uncomment the "extension=php_pdo_mssql.dll" line in php.ini if you have access to it.
If it still doesn't work, you might want to try this (once again, only if you have access to it):
ntwdblib.dll - The most common issue is that you do not have the
ntwdblib.dll file installed in your PHP directory (where php.exe is,
or sometimes placing it in the ext directory works as well). This
library can be found with your Enterprise Manager dll's or in your SQL
servers system32 folder. It's generally best to take the file from the
server where SQL Server is installed -quoted from
http://www.helpspot.com/helpdesk/index.php?pg=kb.page&id=13
If you are doing this on some kind of rented hosting (IE: Shared Hosting) you may need to contact the support from the hosting provider to get them to enable it if you can't get it to work.
http://us.php.net/mssql also has a lot of information. The installation is what I just stated above, but the user comments address a lot of more unique situations and provide more detail.

Categories