Comments (12)
This is a PHP script, so it does not really has anything to do with browsers. If you have a database problem, then this is not caused by the user, the browser or mac os x. Please check your database login credentials
from huge.
I have tested it on two computers. Both with Mac OS X. Both had Chrome, Safari and Firefox installed. The only problems occurred within the Safari web browsers, with the error 'Database connection problem.'. On all other browsers on the same machine where no problems at all. I checked my server environment and PHP Version 5.3.17 is installed.
phpInfo(); @ http://phpinfo.antagonist.nl/
from huge.
But everything in this script happen on the server, as PHP is a server-side language. It's totally irrerevant on which OS/browser the users comes to your site. Can you provide more info ?
from huge.
I do understand php is running server side and I program in php myself since it came out. I just used the very basic version of your script - which I'm very thankful for - and the bug is probably related to Safari itself. Its just strange that the error occurs only in the Safari browser on OS X. I upgraded both machines with the latest Safari to check if it still exists and it did.
I have put the index.php file in the root of the site and used the if else construction to show part of the site when logged in. All in the same file and I'm sure everything is setup right.
$login = new Login(); // create a login object
// show negative messages
if ($login->errors) {
foreach ($login->errors as $error) {
//echo $error;
$error_msg = $error;
}
}
if ($login->isUserLoggedIn() == true) { // USER IS LOGGED IN
echo ' all the way to '
} else { // USER NOT LOGGED IN
echo ' all the way to '
}
I can send you the website and login which I used your script in where the error occurred but I don't want to give out passwords of the website in the public domain.
from huge.
Can you provide more information ? Are you running your server on mac os x ? or is the user on mac os ? Do you have a other server (mac os x server tools ?) running on mac os x ? Can you debug this line by line and give more information ? Whatever you do there, the browser has nothing to do with the database connection in your php script. If you want some help please provide much more information... Have you changed something in the code (except the config.php) ?
from huge.
The server is at a hosting farm and is running Linux (Debian) with Apache, MySQL (5.5.28) / MySQLi (5.5.28) and PHP (PHP Version 5.3.17) - see http://phpinfo.antagonist.nl/ for full information from phpInfo();
I have no debugging tools running on my machine which is a Mac OS X 10.8.3. I have not encountered this problem on my own system running Safari version 6.0.4 (8536.29.13). I did test the website on two other client Mac OS X configurations running OS X 10.7.5 and Firefox, Chrome and Safari version 5.1 installed. One system is a Macbook pro 13 inch and the other is a Macbook pro 17inch. Both came up with the same problem.
I looked around in several groups and found one possible problem with a Keychain browser plugin which gives the same error in Safari but unfortunately also in Chrome. The solution provided tells the user that it is because of private browsing in Safari and Chrome. I can't test this solution now but will give an update when this worked.
from huge.
Nice answer! I'm currently setting up a clean Mac OS X virtual machine to reproduce this. I'll keep you updated. By the way, can you reproduce this with the browser plugin deactivated ?
from huge.
You're welcome and thank you for your time as well. As both Macbook pro's are test machines for web development there is no browser plugin installed. After each test they will be installed with a clean OS X and several browsers from an image.
from huge.
I just tried to reproduce this with MAC OS X and Safari 6, Firefox and Chrome (in a fresh, clean, professional virtual machine). The result is: Everything runs perfectly, like it should run. See the screenshot below. Btw you just said something about a browser plugin, but one comment later you said you don't use browser plugins. So what's exactly the status ?
Btw i think the problem is something else. Maybe you simply used a wrong URL in safari, or you have some strange configurations on your system ? Can you please try the following: simply create a php file that opens a mysqli connection and then run this file via safari. let's see what happens.
from huge.
I mentioned everything running fine on my Mac OS X 10.8.3 machine which was running almost the same specs as you do. Its the Safari 5.1 browser running on a 10.7.5 OS X config which shows this error and not the Safari 6.0.4. I think it is indeed a Safari 5.1 bug as I did a fresh config and followed the instructions over here: http://support.agilebits.com/kb/browser-extensions/problem-with-database-error-in-safari-51. No problems anymore after following these instructions on the same machine as before.
from huge.
Ah okay, i just overread this little "not" in that sentence ;) ! So, to sum this all up: The error "Problem with database" has NOTHING TO DO WITH the php-login script's database (!). The database mentioned here is the internal database of apple's safari browser (where your bookmarks, history, etc are saved), which seems to make problems when surfing with "private" tabs/windows, like mentioned in the link dellai just posted. Interesting problem, gentlemen!
There's no bug in the login script. Yeah!
from huge.
Do a var_dump of the $_REQUEST object when it breaks. Safari must be
modifying that somehow.
Or do inspect element and look at the post data being sent to the server in
each case.
On Fri, May 17, 2013 at 12:54 PM, dellai [email protected] wrote:
I mentioned everything running fine on my Mac OS X 10.8.3 machine which
was running almost the same specs as you do. Its the Safari 5.1 browser
running on a 10.7.5 OS X config which shows this error and not the Safari
6.0.4. I think it is indeed a Safari 5.1 bug as I did a fresh config and
followed the instructions over here:
http://support.agilebits.com/kb/browser-extensions/problem-with-database-error-in-safari-51.
No problems anymore after following these instructions on the same machine
as before.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-18073148
.
from huge.
Related Issues (20)
- [QUESTION] PostgreSQL HOT 4
- MySQL connection error HOT 3
- [NOTE] bootstrap.sh HOT 1
- ❤ ! HOT 1
- Changes for Postgres
- Calling model on view?
- Session validation improvement
- Q
- Configuration files
- Configuration files HOT 5
- New user registration issue
- A question about data sent to the view from the controllers HOT 1
- in the encryption.php file HOT 1
- Pagination Class
- Agregar AJAX al proyecto
- Trying to get in touch regarding a security issue HOT 4
- ErrorController redeclaration HOT 2
- PHP code analizing does not work. HOT 3
- Connection problems with MySql (MariaDb)
- Contact details
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huge.