phpmyadmin quota limit error - php

I have been using phpmyadmin to manage databases for a few projects I am working on. I have very basic knowledge so sorry if this is a stupid question but today I have got this error, which I'm not sure how to solve.
"Your web browser does not support local storage of settings or the quota limit has been reached, some features may not work properly for you. In Safari, such problem is commonly caused by "Private Mode Browsing"."
I am unable to use phpmyadmin now as this pops up every time I try to access any tables or databases.
Is anybody able to tell me how to fix this?

Related

Fatal error: Uncaught PDOException: SQLSTATE[] SQLDriverConnect: 0 (80% of the time it does work)

Information
One of my customers was using the following setup for their webapplication:
IIS: via IP (not url) by default port 80;
PHP v5.3 (and yes the company that helped them went for PHP with IIS);
Access as database (data.accdb), version Microsoft 364 for companies;
ODBC as a connection between PHP and the Access database. To make this available Microsoft Access database engine 2016 (English), version 16.0.5044.1000 was installed;
This customer mostly works with a custom made (frontend) application in Access (app.accdb) that works with the data.accdb for data. Beside that they need the webapplication for managing some of the data by employees of them that are on the road a lot (and are not always able to take over the server and work with the Access application).
The Problem
A couple of weeks back there was an Microsoft-365 update (v16.0.13231.20262) and apparently they had automatic updates still enabled. From the moment the update was done the ODBC connection wasn't working anymore.
After trying a lot of stuff I decided to change IIS to WampServer to see if that changed anything (it was a better setup than with IIS). The webapplication was working again but from time to time we got the following error by PHP:
Fatal error: Uncaught PDOException: SQLSTATE[] SQLDriverConnect: 0 in *.php on line 13
PDOException: SQLSTATE[] SQLDriverConnect: 0 in *.php on line 13
Line 13 in that PHP file is:
$this->con = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=" . DATABASE_PATH);
Obviously the path is working cause like 80% of the time the webapplication is working fine. From time to time it just gets stuck. When I restart the services of WampServer it all works fine again.
What have I tried
From this point on I started looking for possible problems by looking at Event Viewer and logs (access.log, apache_error.log, php_error.log) and I came to the following list:
Attacks from bots
For the attacks from bots we got requests like this:
AH02811: script not found or unable to stat
At first I tried to Deny from IP to make sure they couldn't be the problem but there were so many IP addresses it didn't fix anything. I made sure the customer changed to working with an url instead of the IP address of the server. I made WampServer so that the default port 80 was only working via local. We obviously still get the requests but it gets denied by the client:
AH01630: client denied by server configuration: C:/wamp/www/
I'm still not a 100% sure I can exclude this from the list of potential problems cause of the timeline of the error with like 10-15 attacks before that like I just mentioned.
Because the customer is working with the Access application on the same Access database (as the webapplication) I feel like this could be a problem as well.
Potentially it could be like the previous one (number 2) but then for multiple requests via the webapplication.
Yesterday I decided to create a timeline with all the logs/events to see if I could see (with multiple error moments) where the problem was coming from. But the timeline doesn't make anything concrete or exclude any of the potential problems. An example of one of the timelines:
FRIDAY 9-OCT
11:51:36 Attack
12:01:30 Attack
12:30:09 Attack
13:04:16 Attack
13:21:53 Attack
14:30:31 Attack
14:30:31 Attack
15:52:53 Attack
16:06:15 Requests from IP 1
16:07:34 Requests from IP 2
16:07:53 Requests from IP 3
16:08:10 Error
16:08:21 Error
16:08:24 Error
16:08:30 Error
16:08:34 Error
16:08:35 Error
16:10:37 Restart WampServer
16:10:53 Error
16:15:12 Restart WampServer
I'm stuck at this point and just can't seem to find the cause of the problem. I know I could change the ODBC to OleDB but that means I need to rewrite the whole webapplication and that's at the moment just not an option. My expertise is not this setup/PHP so that doesn't help in this matter.
Somewhere I thought going for an other port would maybe exclude the attacks so I could make sure the webserver would not do anything with port 80, but it seems a lot of hassle for a long shot.
Yesterday I created a task that restart WampServer every 3 hours and when there is a specific event (Log:Application, Source:Application Error, Event ID:1000). This seems to work for now, bit combersome, but yeah, I had to do something to make it workable-ish for now.
Concluding
It's possible I forgot some of the steps I did and tried in this whole story, cause it was just too much to remember. If there are logs needed of more information I would love to hear it. Thank you in advance for reading this Wall of Text and thinking about or helping with potential solutions!

Joomla on Azure Web App - performance issues

I'm trying to get Joomla running on Azure Web Apps but the performance is terrible. 3-5 second response time no matter what operation I'm doing.
Tried the Bitnami VM and it runs much much smoother, so the problem is obviously in the web app. Have tried both Cleardb and the internal mysql preview db and both give the same laggy result. It doesn't matter what sized machines I run on, they all lag.
The only thing I haven't tried is upgrading the Cleardb database from the free tier to the paid ones, simply because my subscription doesn't allow it. Since I see the same performance issue with the internal mysql db this should not matter.
My guess is that this is an issue with PHP and IIS. Anyone with similar experience, and possibly a solution?

Wordpress "Connection lost. Saving has been disabled" Error only when posting to Amazon EC2

This is happening everytime I try to write/submit new post to my wordpress site hosted on Amazon EC2 micro instance.
Error I get "Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case."
I started getting this error when I upgraded to Wordpress 4.0, as suggested on stackoverflow I downgraded to 3.9, it went fine for a month but again this problem has resurfaced.
I get connection lost and it is always followed by
"Error establishing a database connection"
My local host works absolutely fine(with exactly same site), never giving an error. It has to do something about Wordpress + Amazon.
I don't think it has to do anything with the Swap Memory or anything like that because I can easily make a post using Microsoft Word. Plus my site is fairly new with just 2 to 5 users at a time.
Please help me, this is annoying. I have to restart the server every time to get rid of this.
To be able to diagnose your problem, we would need more details
Where is running your database ? Is it on the same EC2 instance, another one or RDS ? What instance type are you using ?
A likely cause is a database memory problem. On t2.micro instances, there is not enough memory to keep the OS, the database and the web server running at the same time.
You'll have to create a swap file and add it to the OS (see "Stopping MSQL from crashing" in https://gist.github.com/rozeykex/7882972)

phpMyAdmin Hosted in Azure problems

I created my phpMyadmin in Windows Azure which only allows 1 MySQL database for free users.
After creating a phpMyAdmin I linked MySQL Database Resources to another Website.
In this website I try to login my accounts registered to the database.
At first it goes smooth and seems there is no problem, but as i try to continue accessing the website which retrieves details from the linked MySQL Database Resources, The website returns and error of..
User 'b48a56f527c793' has exceeded the 'max_user_connections' resource (current value: 4)
But after a while 3-5mins the connection is good again.
At first I think the Windows Azure just tries to limit traffic but is it really that real cause of the problem or did i made mistake in setting up my phpMyAdmin in Windows Azure?
How to fix that error?
Big thanks in advance!
When you use MySQL on Azure you have to know is it provided by ClearDB, and the free tier is very limited. You can check the limitations here. For example you only have 4 concurrent connections limit, which is quite restrictive.
As a suggestion - never use mysql_pconnect in your scripts, but always use mysql_connect and always kill your connection when you don't need it anymore (i.e. when you retrieve the data).
I'm not 100% sure, but I think default installation of phpMyAdmin uses mysql_pconnect, which might keep idle connections as a resource from these 4 you have.
If you are using ClearDb on Azure which is the default option, ClearDb has really tight limit for simultaneous connections. Check it here:
https://www.cleardb.com/store/azure

Connecting to SQL Server very slow

I have a standard php app that uses SQL Server as the back-end database. There is a serious delay in response for each page I access. This is my development server, so its not an issue with the live setup, but it is really annoying for working on the system.
I have a 5 - 8 second delay on each page.
I am running SqlServer 2000 Developer Edition on a Virtual Machine (Virtual PC).
I have installed SqlServer on my development machine but get the same delay.
I have isolated the issue to the call to mssql_connect (calling mssql_pconnect has no effect)
It is a networking issue on how I have set up (or not set up, since I didn't really change default config) SQL server. It's not a strictly a programming issue but I thought I might get some valuable feedback here.
Can anyone tell me if there is a trick, specific set of protocols, registry setting, something that will kill this delay?
I was also experiencing a 5-10 second delay on every connect, using the official Microsoft SQL drivers for PHP (as suggested by #gaRex) - none of the answers posted here solved it for me.
As suggested by #ircmaxell, my problem was a DNS issue - and the solution was to edit the \windows\system32\drivers\etc\hosts file (your local local host file) and add the name of my own machine to it.
In the "system properties" dialog, find the "computer name" of your machine - then add a line like 127.0.0.1 my-computer to your local host file.
For me, the delay occurred once more, on the following attempt to load the page - after that, it was super fast, no delay at all.
Note that this problem may occur even on a physical machine, not only on a VM.
I came across network issues when running virtual pc, everything network related is slow, try adding this entry on your registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Create new DWORD value named DisableTaskOffload and set its value to 1.
Restart the computer.
It worked for me, source.
Is it perhaps a DNS issue? I know that MySQL does a reverse DNS lookup on each login (not each connection). If you don't have a reverse dns record for your server (or your dns is slow) it can cause a major delay at login. There's an option in MySQL to disable that. I'm not sure about SQL Server, but I'd assume it may be doing something similar...
I remember the same problem, but forgot, how we have solve it.
To clarify please specify exact connect strings, your SQLserver versions and also try to start this old good utility c:\WINDOWS\system32\cliconfg.exe, which is also can bring some light.
Yes, I know, it's from 2k, but guys at m$ don't like to create client tools from scratch.
Also try to get "right" mssql client dlls for PHP.

Categories