Re: php code review and help
| From: | Aziz Saleh | Date: | Mon, 24 Feb 2014 19:26:19 +0000 |
| Subject: | Re: php code review and help | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322977@lists.php.net to get a copy of this message | ||
On Mon, Feb 24, 2014 at 2:21 PM, PIYUSH DAS <das.piyush2009@gmail.com>wrote:
> SIR, THIS IS A DOWNLOADED VERSION FROM A WEBSITE AND MESSAGE IS AT STATED
> IN THE WEBSITE
>
>
> On Tue, Feb 25, 2014 at 12:46 AM, Aziz Saleh <azizsaleh@gmail.com> wrote:
>
>>
>>
>>
>> On Mon, Feb 24, 2014 at 2:10 PM, PIYUSH DAS <das.piyush2009@gmail.com>wrote:
>>
>>> username and password used are correct to my knowledge the initial
>>> developer told me that the file as attached needs to be edited. the error
>>> as shown is Warning: mysqli_connect() [<a
>>> href='function.mysqli-connect'>function.mysqli-connect</a>]:
>>> (28000/1045):
>>> Access denied for user 'Karthik'@'localhost' (using password: YES)
>>> in
>>> C:\wamp\www\lib\db.php on line *897*
>>>
>>>
>>> On Tue, Feb 25, 2014 at 12:36 AM, Aziz Saleh <azizsaleh@gmail.com>wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Mon, Feb 24, 2014 at 1:26 PM, PIYUSH DAS <das.piyush2009@gmail.com>wrote:
>>>>
>>>>> sir,
>>>>> i am still facing the problem, i am at a very early learning stage
>>>>> and am not able to understand properly, I am sending you the file as
>>>>> attachment kindly see and help if possible.
>>>>>
>>>>>
>>>>> On Mon, Feb 24, 2014 at 11:49 PM, Aziz Saleh <azizsaleh@gmail.com>wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 24, 2014 at 1:16 PM, PIYUSH DAS <das.piyush2009@gmail.com
>>>>>> > wrote:
>>>>>>
>>>>>>> Kindly consider the following code
>>>>>>>
>>>>>>> function dbOpen()
>>>>>>> {
>>>>>>>
>>>>>>>
>>>>>>> $this->_dbCon=mysql_connect($this->_dbhostName,$this->_dbUser,$this->_dbPwd)
>>>>>>> or die ("Could not connect DB");
>>>>>>> mysql_select_db($this->_dbName,$this->_dbCon) or die ("Could
>>>>>>> not
>>>>>>> select
>>>>>>> DatabaseClass");
>>>>>>> }
>>>>>>>
>>>>>>> i am getting an error
>>>>>>> Warning: mysql_connect() [<a
>>>>>>>
>>>>>>> href='function.mysql-connect'>function.mysql-connect</a>]: Access
>>>>>>> denied
>>>>>>> for user 'Piyush'@'localhost' (using password: YES)
>>>>>>> in
>>>>>>> C:\wamp\www\lib\db.php on line*897*Call Stack
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> PIYUSH DAS
>>>>>>> LUCKNOW
>>>>>>> 9648916741/9208275121
>>>>>>>
>>>>>>
>>>>>> The password is incorrect.Insure that the password variable
>>>>>> $this->_dbPwd is correct.
>>>>>>
>>>>>> Also if this is something new you are coding, I would advise you use
>>>>>> PDO or MySQLI instead.
>>>>>>
>>>>>> Aziz
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> PIYUSH DAS
>>>>> LUCKNOW
>>>>> 9648916741/9208275121
>>>>>
>>>>
>>>> Please keep all emails towards the mailing list and never send out your
>>>> mysql credentials to the public.
>>>>
>>>> Are you sure that the username and password you have are correct? Can
>>>> you try the username and password on PHPMyAdmin (or any other db management
>>>> software you are using) and see if that works.
>>>>
>>>> Aziz
>>>>
>>>
>>>
>>>
>>> --
>>> PIYUSH DAS
>>> LUCKNOW
>>> 9648916741/9208275121
>>>
>>
>> Sorry not seeing the issue here that the developer is talking about. Why
>> not have that developer tell you what needs to be modified?
>>
>
>
>
> --
> PIYUSH DAS
> LUCKNOW
> 9648916741/9208275121
>
Try changing localhost to 127.0.0.1 and see if that helps.
If the username and password in that file are correct, it could be a server
issue. Contact your host to see if they can figure it out. Could be
permission issues.
*Please click on reply-all when replying to the emails.*
Aziz