Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I used Zend Framwork with Digitalus CMS. I work with ubuntu for test/developping, the website work perfectly fine there. The problem is when I migrate the website to the IIS production server, I get those errors :

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'user'@'subdomin.domain.net' (using password: YES)' in D:\Domains\website.com\wwwroot\library\Zend\Db\Adapter\Pdo\Abstract.php:129
Stack trace:
#0 D:\Domains\website.com\wwwroot\library\Zend\Db\Adapter\Pdo\Abstract.php(129): PDO->__construct('mysql:adapter=P...', 'username', 'password', Array)
#1 D:\Domains\website.com\wwwroot\library\Zend\Db\Adapter\Pdo\Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#2 D:\Domains\website.com\wwwroot\library\Zend\Db\Adapter\Abstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect()
#3 D:\Domains\website.com\wwwroot\library\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES 'utf8...', Array)
#4 D:\Domains\website.com\wwwroot\application\Bootstrap.php(144): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES 'utf8...')
#5 D:\Domains\website.com\wwwroot\library\Zend\Application\Bootstrap\BootstrapAbstract.php(666): Bo in D:\Domains\website.com\wwwroot\library\Zend\Db\Adapter\Pdo\Abstract.php on line 144

I've made some change on the DataBase, but I'm pretty sure these change are not the source of those errors.

What can I do to correct those?

share|improve this question
1  
Your post lack some information. Do you use IIS or wampp? What difference between your test machine and your prod machine. To be sure to avoid this kind of error, I'm used to create a VM copy of the production machine, then I work on the VM, and when I need to migrate from test site to production site, no surprise. That's just an advice for your future web project ^^ –  Anarko_Bizounours Jul 5 '11 at 9:04
    
@Anarko_Bizounours Thanks for your advice my local machine is Ubuntu Apache and my shared host company using IIS. I completely sure my DB configuration is correct but i don't what was that. –  Achu Jul 5 '11 at 9:22
    
I wonder if you IIS have PDO installed. There is a easy way to find what your prod machine lack compared to your ubuntu. Create on your ubuntu a index.php with this code in it "<?php phpinfo(); ?>", do the same on your IIS. Then look what this prompt on ubuntu and IIS, maybe you'll find some package lacks on IIS. –  Anarko_Bizounours Jul 5 '11 at 9:26
    
@Anarko_Bizounours my host server not allow me to run that file it says "it is disable for security reason". –  Achu Jul 5 '11 at 10:26
    
weird, normally this should run without problem. I'm not really used to IIS, but it seems it's definitly from your IIS configuration. It's out of my expertise field. I'll try looking around to find some solution. –  Anarko_Bizounours Jul 5 '11 at 10:31

2 Answers 2

up vote 2 down vote accepted

Apparently PHP inform you that he can't access the database. The PDO get an error because he don't have access to the db.

All error come from the fact that you website can't access you db.

Do you have a rollback version? Try it, maybe the change you've made on the database screw this.

If the rollback don't work, then you must add an user with privileges to the website database, and use this user to connect in you php code.

Hope this will help you.

share|improve this answer

Check your application.ini, you need to define corresponding database credentials for both production and development section.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.