Page 1 of 1

XAMPP creates "Connection_php_mysql.htm"

PostPosted: 05. December 2012 10:00
by PAL
XAMPP creates a folder called "C:\xampp\htdocs\myfoldername\Connections" which contains a single file called "positivecon.php'. When I try to access my test website, I get this Warning: mysql_pconnect(): Access denied for user 'positivegroup'@'localhost' (using password: YES) in C:\xampp\htdocs\myfoldername\Connections\positivecon.php on line 9

This is the contents of "positivecon.php":

1 <?php
2 # Filename="Connection_php_mysql.htm"
3 # Type="MYSQL"
4 # HTTP="true"
5 $hostname_positivecon = "localhost"
6 $database_positivecon = "positive"
7 $username_positivecon = "positivegroup"
8 $password_positivecon = "mypassword"
9 $positivecon = mysql_pconnect($hostname_positivecon, $username_positivecon, $password_positivecon) or trigger_error(mysql_error(), E_USER_ERROR;
10 ?>

I get this fatal error and cannot proceed with the testing of my website. I have found innumerable articles on the Internet that are almost identical to the contents above -- differing only with some other word instead of "_positivecon".

Is there some way around this difficulty to connect to the database? I have tried removing the "p" in the directive within the text "mysql_pconnect" but to no avail. I simply receive the same fatal error message.

Most frustrating! :( Some expert guidance would be greatly appreciated. :)

PAL in Thailand

Re: XAMPP creates "Connection_php_mysql.htm"

PostPosted: 05. December 2012 23:28
by hackattack142
I have never seen XAMPP create that folder or file before (at least from 1.7.3 and later).

Re: XAMPP creates "Connection_php_mysql.htm"

PostPosted: 06. December 2012 08:44
by PAL
Hello hackattack 142!

Interesting that you haven't seen the folder "Connections" and its single file "positivecon.php" elsewhere.

I say that because I have an earlier version of my test website in a different subfolder than "myfoldername" in C:\xampp\htdocs\ which does NOT contain a "Connections" folder! I therefore presumed (maybe incorrectly) that XAMPP was responsible for this new folder after a few additions were made to MySQL via phpMyAdmin. But I do confirm that the "Connections" folder DOES exist and that it was not put there by myself.

My present concern is that line 9 of the file inside "Connections" is denying access for the user "positivegroup" and therefore preventing me from continuing with the site's development.

I also found in my Internet searching many instances of other people having similar problems of being denied access to
"user" @ "localhost" (using password: YES), so I am not alone in the interference being caused by, I thought, the matter of persistent connections via php.

At any rate, I am hoping that some more experienced XAMPP users might be able to help me with my problem.

PAL in Thailand

Re: XAMPP creates "Connection_php_mysql.htm"

PostPosted: 06. December 2012 17:38
by Altrea

PAL wrote:At any rate, I am hoping that some more experienced XAMPP users might be able to help me with my problem.

Well, hackattack142 has said everything possible to that issue.
I use XAMPP since v1.4.13 (which was in year 2005, i hope that is experience enough) and have never seen such a folder or file created by XAMPP.

BUT searching for parts of that sourcecode results, that it is a commercial shop system called PowerStore.

We can't provide any support for third party scripts, sorry.

best wishes,

Re: XAMPP creates "Connection_php_mysql.htm"

PostPosted: 07. December 2012 07:38
by PAL
Thanks to hackattack 142 and Altrea for confirming that XAMPP wouldn't be responsible for the recent arrival of the "Connections" folder with its single file "positivecon.php" in my computer's C:\xampp\htdocs folder. I'm just getting started with XAMPP and the distribution I downloaded confirmed that XAMPP had installed itself correctly on my computer. I was happy about that. Since XAMPP is made up of MySQL, PHP, Perl, phpMyAdmin, and since both hackattack 142 and Altrea tell me that XAMPP is NOT responsible for creating "Connections\positivecon.php" under its own wing, then I have to deduct that one of the other components must have done so -- it couldn't have just popped out of thin air.

I may have put the blame on XAMPP due to my inexperience with the program. I apologize.

Unfortunately, the error message has come up -- here it is:

Warning: mysql_pconnect(): Access denied for "positivegroup" @ "localhost" (using password: YES) in C:\xampp\htdocs\mywebsite\Connections\positive.con.php on line 9. ( Even worse, it's a fatal error on top of that too! )

and I am at a loss of how to move ahead with any further development of my website via my computer.

Do you gentlemen have any suggestions as to how I can get over this hurdle. I'm all ears, but I really don't know which part of the XAMPP distribution package is preventing access to the database. The file positivecon.php contains the correct information for the hostname, database, username, and password that I have added into MySQL -- as can be seen in my original post. I just don't know how they are all connected, but the fact remains that XAMPP (and its components) is/are somehow preventing me from doing anything to continue with the development of my website.

What is further most disconcerting, is that I have come across many, many Internet postings with almost identical warnings as the one I received. Some positive suggestions for getting me on track would be greatly appreciated. What sleuthing do I need to know to move on?

Thanks in advance.

in Thailand

Re: XAMPP creates "Connection_php_mysql.htm"

PostPosted: 07. December 2012 22:49
by hackattack142
My first intuition would we to verify the credentials in the MySQL database users table itself. Make sure that user actually exists, has the password you expect, and it setup for localhost (if it is setup for % or other IP it will not work).