frankthefixer
Posts: 52
|
| Posted: 10/29/2007, 7:35 PM |
|
I 'm using xampp, mysql-phpadmin, codecharge 3 to create locally, ..published on the web- and am getting root @ login failures on the web, but am good locally. I don't want to use root as a user and have created a user that's tight on both sides, tests well in connections, and matches up in the design and server views on the connection, along with db names and hosts as well- I don't have root set as a user anywhere in mysql for the db i'm working with or in the codecharge settings, connections, but I must be missing something because the web keeps failing with Access denied for user 'root'@'localhost' . Do I have to change or add an account on the apache side somewhere locally for code sake? I just started using xampp. any help is greatly appreciated. I've used cc3 sucessfully in the past with odbc straight up to the host, but can't seem to get away with that much these days.
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 10/29/2007, 8:50 PM |
|
frankthefixer
Is the location of your db server set to localhost on your published web site??
|
 |
 |
wkempees
|
| Posted: 10/30/2007, 1:40 AM |
|
Study the Project Connection settings.
Your are doing almost everything right.
Except:
Design and server setting are within a Server Profile (1), the settings you
need to give
to be able to use design and see live pages. These settings will be ODBC to
your local xampp MySQL for the Design part, and MysQL or MySQLi to your
local xampp MySQL for the Publish Part.
Now, to publish not localy but to your remote server (FTP) you would need to
create a second server profile.
Call it whatever you want and give that profile the same settings as the
first for the Design bit, but give it the correct credentials for the Server
bit.
Then publish, CCS will do the ftp bit and write the correct common.php.
You will be notified by CCS everytime you switch profiles.
That's all there is to it.
Others might find it nicer to manualy edit the common.php and do all theftp
by hand.
It is not.
go fix her!
Walter
|
|
|
 |
frankthefixer
Posts: 52
|
| Posted: 10/30/2007, 4:40 AM |
|
thank you both for your replies-
the publishing part seems to go well- it's when I visit the login page, sucessfully login, and am returned to the grid page that I have the problem
mambo- the location for local and the web host is a sub of localhost- i made a directory under htdocs and am publishing locally to xampp\htdocs\directory\ - on the web i have \directory from the root- the login page comes up fine on the web, it's after login in, when I'm forwarded to the return page I get blocked. also, I am using odbc for the local, but nowhere am i using root as a user- niether in the odbc connection, nor the publishing
wkempees- I have two server profiles- one for the local publishing, and one for ftp to the web server. the two profiles have allowed it to publish locally where I want, and on the web where i want- and it actually does that with no problems as the files do go where I've been telling them to go.
the files seem to make it to their proper places, as I do get the login and am able to login because it tries to re-direct me to the grid page, but that's when it fails with the root login failure. Why does it try to go in as root, instead of the username I have propagated
thanks again guys for any help- it is appreciated
I also noticed (this may be irrelevant) that when I made a table name change, I had to recreate several new cc projects several times before it saw the new name- and then even when it did, and I dropped a grid in, and published, it was still looking for the old table name
oh, I should mention this project is simply a login, with a grid+search as the return-
|
 |
 |
frankthefixer
Posts: 52
|
| Posted: 10/30/2007, 5:37 AM |
|
here's the exact error i get after sucessful login, while being directed to return page (grid)
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/mtsrecov/public_html/mtsreports/db_mysql.php on line 97
Database error: cannot connect to Database Access denied for user 'root'@'localhost' (using password: YES)
MySQL Error
Session halted.
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 10/30/2007, 7:51 AM |
|
last post: is server (remote) mysql 5? then use MySQL improved MySQLi.
As far as I can see, the mysql_pconnect is unable to resolve the password, and gives a standard warning in return, this could be the changes in password storage between MySQL 4 and 5. Although in my experience (vast) if mysql report back root@localhost, it is ectually instructed to logon using root.
So I would check again the settings for the server part of the Profile pointing at that server.
The Designtime settings should be equal to the designtime settings in the first (LOCAL) profile, ODBC etc.
If there are discrepancies in the directory structure (not completely clear from your post) in Server Profile 2 set a different basepath.
Table name changes: in project explorer, after (through Navicat or PhPMyAdmin) renaming table, rightclick Connection and choose Refresh. Then make sure that the renamed table is available when for instance creatin a new grid. If that is all well, thn go to existing Search/Grid/Form and through VisualQueryBuilder, choose the new table name
That should work.
I have actualy some time ago posted a wish asking for more parts of the project settings to be respective to the server profile used.
the fckeditor/template path for instance.
Hope you solve this soon, it can be done!
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 10/30/2007, 8:00 AM |
|
Maybe as an extra, this is how I do it:
I have a local directory \projects
In that I have a directory per project.
This is the base for CCS Project.
XAMPP\htdocs\project, for each project as a publish directory.
The generated project is then called using localhost\project, which is also the setting in Project Settings Publish and path to application.
The Design part of Connection, is using ODBC on the XAMP MySQL database for the project using the same user/pass as Navicat (my tool of choice) would use to address the database.
All development is done using this setup.
Only when ready to publish to the world, I create a second profile.
That has the setting that reflect the remote site.
In that profile Connection Design would be still ODBC to the XAMPP MySQL DB.
Server connection however is LOCALHOST (relative to the remote server) user and pass are the remote servers user and password.
Selecting this Second Profile, I check 'Publish all files ' and press F8.
The FTP session follows after generation, and when that is finished a call to www.nameofremotesite.tld suffices.
If any design flaws, I switch back to server profile 1, do all ammendments, test and switch back to Server Profile2 and publish making sure the 'publish all.....'is still on.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
frankthefixer
Posts: 52
|
| Posted: 10/30/2007, 8:35 AM |
|
Hmmm. I have to wonder how it's able to show and verify login at login.php but then not have rights to go from the login to the grid- both tables (the table feeding grid and the user table) are in the same db, using the same db user, with the same rights- why would the login page work but the grid page fail on user, shooting back what seems like an authentication issue. I gues I will just continue to delete and remake this project until something different happens or i die from stress and/or lack of sleep. all publishing and connection settings jive.
I did notice- not sure if it's relative, but when I go to my webhosts phpadmin page from the site control panel, i notice I have no privelges- perhaps because my account login for the host- which i use to login to the cpanel, has no equal in mysql? if it's indeed relative, I cant create an equal anyway because mysql at the host has a max limit username size of 7 char and the hosting company issued me a site login of 8 char- but it shouldn't matter because per the cc settings (except publishing) i'm going in as a mysql user, not the host user.
Ultimately though- if i put a junk user into the login.php it kicks back saying no known user- if i login with the right user it works then fails on visit to the retun page- that tells me that it's talking to the user table and hence the db- why would auth then fail on its way to the other table on that very same db?
|
 |
 |
frankthefixer
Posts: 52
|
| Posted: 10/30/2007, 11:37 AM |
|
my host tried to help with this- he noticed that the db_mysql.php file did not have the variables set- i noticed it too, but all my other cc3 projects on the web dont have them defined either and they work just fine
class DB_MySQL {
/* public: connection parameters */
var $DBHost = "";
var $DBPort = "";
var $DBDatabase = "";
var $DBUser = "";
var $DBPassword = "";
var $Persistent = false;
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 10/30/2007, 8:42 PM |
|
frankthefixer
The configuration file is Common.php not the db_mysql.php file. If you need to make changes to the configuration parameters it should be in the Common.php file only.
|
 |
 |
wkempees
|
| Posted: 10/31/2007, 1:14 AM |
|
MamboB is sooo right!
But editing the common.php should not even be necessary if using the
serverprofiles!
What are the redirest settings on the Login page?
What is the structure of your application?
Are you combining several projects into one?
So many questions, PM if you would like to zip and mail.
Walter
|
|
|
 |
frankthefixer
Posts: 52
|
| Posted: 10/31/2007, 4:23 AM |
|
it's a simple project really- just a login to a search grid. I've done so many of these. I tried on several different hosts of mine laste night, including a vps- no luck. I've tried re-installing cc3- no luck. Results have varied from roo@locaslhost errors to the login page just sitting there. I've been using the cc application builder, as always. I noticed the builder left the return page of the login form blank, so I simply added the the ccs page for the search grid as a return. This is just amazing. I have dozens of functional online cc projects and they all work great. I'm going to try from my workstation in my office today- it also has cc3 and is whitelisted with my hosts. maybe I'll have better luck. thanks for following up guys.
|
 |
 |
DonP
|
| Posted: 10/31/2007, 12:11 PM |
|
One thing to try is to download and install a good MySQL manager such as
HeidiSQL (I highly recommend it) and try the same connection there. That
will tell you if the problem is in your CodeCharge Studio project or if it's
in the MySQL setup.
Don (DonP)
"frankthefixer" <frankthefixer@forum.codecharge> wrote in message
news:5472865acce345@news.codecharge.com...
> it's a simple project really- just a login to a search grid. I've done so
> many
> of these. I tried on several different hosts of mine laste night,
> including a
> vps- no luck. I've tried re-installing cc3- no luck. Results have varied
> from
> roo@locaslhost errors to the login page just sitting there. I've been
> using the
> cc application builder, as always. This is just amazing. I have dozens of
> functional online cc projects and they all work great. I'm going to try
> from my
> workstation in my office today- it also has cc3 and is whitelisted with my
> hosts. maybe I'll have better luck. thanks for following up guys.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
frankthefixer
Posts: 52
|
| Posted: 10/31/2007, 2:22 PM |
|
thanks for the tip- I'll try it. I've used navicat before and use access2mysql quite a bit- but the db side of my problem always seemed to be ok, with the few exceptions of "mysql has gone away" errors. I've had some progress on this particular issue, I've tried 3 hosts with no success, the fourth webhost worked- but they're not the host i wanted to use and already signed for this project. so i guess i'll sign up yet another host account and hope nothing changes. I really believe that's where the problems been. the only thing different about this successful host is that the mysql db names and dbusers dont have to be bigprefixcrap_whatever, they can just be whatever. i think that's why learning and using the whole xampp thing the other night didn't help- it's a good tool though
|
 |
 |
DonP
|
| Posted: 10/31/2007, 7:43 PM |
|
First, I don't work for HeidiSQL but I use it all the time. Navicat is
great for importing data into a MySQL database and was a lifesaver on a
recent project but HeidiSQL is a far better tool for managing MySQL itself.
It can be set up to any number or remote or local connections too and if you
had the defunct MySQL-Front v2.5 installed (NOT v.3.0), HeidiSQL can import
its settings as it was written by the same developer.
Maybe someone touched on this already and I don't have CodeCharge Studio
open as I write this but it seems to me that the project settings can be set
for specific PHP versions. Is it possible that it's set for a version that
your hosts do not support?
Don (DonP)
|
|
|
 |
frankthefixer
Posts: 52
|
| Posted: 11/01/2007, 3:38 PM |
|
the php versions matched up- either being 4 or 5 between the different hosts. not really sure what happened.
I checked out the heidisql - looks pretty good.- it also looks free which is always nice
|
 |
 |
RonB
Posts: 228
|
| Posted: 11/03/2007, 3:37 AM |
|
We use sqlyog. A great tool that includes managing your on line databases locally and data and structure synchronizing. We also use it to create jobs that pull data from other databases like oracle and sql server to mysql tables every hour. You can even create these jobfiles under windows and export them to linux. It's not free but cheap and is great to use.
Ron
|
 |
 |
frankthefixer
Posts: 52
|
| Posted: 11/03/2007, 3:01 PM |
|
I'll check it out- thanks for the tip- creating jobs for regular data uploads sounds like a nice feature
|
 |
 |
|