Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PDO not working in

Featured Replies

Using XP Pro

I have PDO working with this version:

----------------------------

The Uniform Server 8.4.0

Apache 2.4.1

MySQL 5.5.21-community

PHP 5.4.0

phpMyAdmin 3.4.10.1

eAccelerator 1.0-svn427

APC 3.1.7

UniController

----------------------------

 

tried updating to:

----------------------------

The Uniform Server 8.4.0

Apache 2.4.3 VC10 - OpenSSl 0.9.8x

MySQL 5.5.29-community

PHP 5.4.11

phpMyAdmin 3.5.5

eAccelerator 1.0-git42067ac7e2

APC 3.1.14

Xdebug 2.2.1

UniController

----------------------------

 

now with test connect script I'm getting:

----------------------------

Server port: 3306

Connecting to mysql Database... Connected successfully

Connecting to mysqli Database... Connected successfully mysqli

 

PDO connect array:

Array ( [db] => Array ( [driver] => mysql [host] => localhost [dbname] => test [username] => test [password] => q4w3e2r1 ) )

 

SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

----------------------------

 

Any Ideas why?

I have dragged and dropped the db, manually added the db,

Double checked the all the ini files and compared them with a program to the earlier version ini's

 

deleted and resetup the server a least 8-9 times...

 

PDO will not work but if I switch back to old version it works...

 

Also tried replacing the extensions with the older versions in php.

 

And tried other usernames in mysql and tried connecting as root...

Still won't work...

  • 10 months later...
  • Author

Just went back to using PDO from mysqli and figured it out... When I added the array to start the PDO I forgot the ' quotes around the dsn and un/pw

The quotes need to be there.

$db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8', 'username', 'password');

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.