CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 ODBC connection Problem

Print topic Send  topic

Author Message
Pep Johnsonn
Posted: 05/05/2005, 11:59 PM

Hello everybody, I am using CCS studio (latest version) in a php project
entirely built from CCS.
I want to connect to a mysql database, I set up the connection, tested it
up, and works ok.
Then, I create a php "hello world" page, upload it to my hosting provider
and index.php saying "hello world" comes out without any problem.

Then I build a grid, a simple one, calling the table "articles" and the
field "article_name" from the mysql db ---> upload the files to the server
and....

"Warning: mysql_pconnect(): Access denied for user:
'myusername@myhostingprovider.com' (Using password: YES) in
/home/whatever/public_html/php/db_mysql.php on line 99
Database error: pconnect(66.35.36.xxx:3306, myusername, $DBPassword) failed.
MySQL Error: 0 ()
Session halted."

I have changed some of the info in the "warning" no to reveal my identity if
possible.

-- I am able to connect and retrieve data with excel, access...etc without
any problem.
-- please, note that in CCS I can connect to the mysql without problems
"test connection ok", but if I build a grid or something related to the db,
then this problem arises.
-- tech info: my hosting uses php 4.3.10, mysql 4.0.23-standard, apache
1.3.33 unix and perl 5.8.4

What I am doing wrong?

Should you need more info, please contact me and I will be glad to give it
to you.

Thanks in advance

peterr


Posts: 5971
Posted: 05/06/2005, 1:17 AM

This doesn't look like CCS question.
Please check MySQL documentation:
http://dev.mysql.com/doc/mysql/en/access-denied.html
And:
http://www.google.com/search?hl=en&q=mysql_pconnect+%22...or+user%22+3306
http://www.google.com/search?hl=en&lr=&q=mysql_pconnect...ied+for+user%22
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Pep Johnsonn
Posted: 05/06/2005, 1:58 PM

Thanks, searching google right now, but still, isnīt it weird that I can
connect through excel or access and not through CCS?? Looks like it is a bad
parameter in my code or something, but to my opinion, with CCS, not mysql...
As I said in the first post, I can connect and retrieve data from the mysql
database with, for instance, excel 2003.
Hasnīt this happened to anyone before?
I can see that your are yessoftware staff, I am thinking of opening a ticket
and give you full access to the database (username, password...etc) and give
you my projectīs code, to see if you can connect by yourself from there...

I will keep you guys informed....

Thanks for your help again!!!
Pep Johnsonn
Posted: 05/06/2005, 2:21 PM

I have found this and I am trying it right now,
http://forums.codecharge.com/posts.php?post_id=56300
I will keep you posted.

Thanks again
peterr


Posts: 5971
Posted: 05/06/2005, 3:26 PM

Quote :
searching google right now, but still, isnīt it weird that I can
connect through excel or access and not through CCS??

In your 1st post you wrote that you can use CCS with your database without any problems, for example you were able to build a grid. Therefore everything is OK with CCS and it is connecting to your database the same way as Excel does. Not a problem there.
You also wrote that the problem happens only after you upload the files to the server. Thus you're no longer using CCS (on your server) and the problem happens in your Web application, not CCS.
This issue is purely a problem with your Web application (PHP program) not able to connect to your database. There is absolutely no relation of this error to CCS. You can just use the standard troubleshooting that MySQL recommends. Check your password, permissions, etc.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 05/06/2005, 3:29 PM

Quote :
I have found this and I am trying it right now,
http://forums.codecharge.com/posts.php?post_id=56300
I will keep you posted.

That problem was different and that user could not connect to a database from CCS. However, you didn't indicate any problems with using CCS with your database. As you first wrote CCS worked OK for you, only your application doesn't.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 05/06/2005, 3:47 PM

So, here is sample MySQL connection test from MySQL manual http://us3.php.net/mysql_select_db :
<?php  
  
$link = mysql_connect('localhost:3306', 'login', 'password');  
if (!$link) {  
die('Not connected : ' . mysql_error());  
}  
  
// make foo the current db  
$db_selected = mysql_select_db('db_name', $link);  
if (!$db_selected) {  
die ('Can\'t use foo : ' . mysql_error());  
}  
echo 'Connected successfully';  
mysql_close($link);  
  
?>

You can upload this code to your server and test if it can connect to your database. Only replace 'login', 'password' and 'db_name' with your own values.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Pep Johnsonn
Posted: 05/06/2005, 3:49 PM

Thanks for your help again.
Well, yes CCS says ok at the connection test ( I am connecting directly to
that server, the remote server where I upload the files, not locally), but
the "live page" or "live page in browser" when I want to see how the page
performs keeps giving me that error;
so, connection test with the remote server ok but not the live page. It
gives an error in line 99...db_mysql.php. I am pretty sure that the
usernames and password are ok...(the "test connection" is ok!!!!) however
the grid does not do well...I am going to try to build another database
taking a table from one of the examples ("intranet" database for instance)
to see if the database that I used is somehow corrupt or something, and also
checking google and my web hosting company.

I will keep you posted,

Thanks again
peterr


Posts: 5971
Posted: 05/06/2005, 3:53 PM

Finally, I noticed that you named your topic wrong which means that you are missing something. Thus let me explain that your error message is not related to ODBC and your ODBC works just fine.
Your error message states: "mysql_pconnect(): Access denied for user:"
And "mysql_pconnect()" means that you are not using ODBC on your server (and you probably don't need to).
If this was an ODBC problem then your error message would start with "odbc_pconnect()"

Hope this helps.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
peterr


Posts: 5971
Posted: 05/06/2005, 4:00 PM

Quote :
so, connection test with the remote server ok but not the live page.
Yes, but those two things are not related. CCS uses "Design connection" while your PHP application uses "Sever connection" settings. So just because you have a correct password in your Design connection, doesn't mean that you have the correct password set in your Server connection settings...
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Pep Johnsonn
Posted: 05/07/2005, 1:19 PM

Peterr, I deeply appreciate your help. I will try all those advices as soon
as I have some time, I will keep you posted.

Thanks again!!!!



"peterr" <peterr@forum.codecharge> wrote in message
news:5427bf6fad9425@news.codecharge.com...
>
Quote :
so, connection test with the remote server ok but not the live
> page.
> Yes, but those two things are not related. CCS uses "Design connection"
> while
> your PHP application uses "Sever connection" settings. So just because you
> have
> a correct password in your Design connection, doesn't mean that you have
> the
> correct password set in your Server connection settings.
> _________________
> Peter R.
> YesSoftware Forums Moderator
> For product support please visit http://support.yessoftware.com
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright Đ 2003-2004 by UltraApps.com  and YesSoftware, Inc.