This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Connection problem, second attempt

Discussion around this tutorial for symfony 1.0.x

Connection problem, second attempt

by tm1978 » Thu Mar 19, 2009 9:15 pm

I am going to describe all steps I have done...maybe someone sees what is missing/wrong.

1. checked out the project
2. renamed the folder trunk to askeet
3.

edited askeet/propel.ini (createUrl, url,output.dir)

propel.targetPackage = lib.model
propel.project = askeet
propel.database = mysql
propel.database.createUrl = mysql://mysql5.hosting.de
propel.database.url = mysql://db228544_11:youanswer@mysql5.hosting.de/db228544_11

propel.mysql.tableType = InnoDB
propel.schema.validate = false
propel.addGenericAccessors = true
propel.addGenericMutators = true
propel.addTimeStamp = false

; directories
propel.home = .
propel.output.dir = /kunden/228544_80469/webseiten/askeet

4. properties.ini says:


name=askeet


host=localhost
port=8042
user=root
dir=/kunden/228544_80469/webseiten/askeet

but I dont know whether the port is necessary/shoud be changed?

4.5 changed PHP to PHP5 in the script

5. i have renamed SYMFONY to symfony so that and chmod 777 so I could do a ./symfony clear-cache

6. ./symfony propel-build-all - which ran successfully

7. access of / does not work in the browser - /index.php works but with an "
Oops! An Error Occurred
The server returned a "500 Internal Server Error". error.

The log file says "Mar 19 20:06:47 symfony [err] {sfException} No connection params set for symfony in ...."

:(~ :-(~ :sad:


8. I have created databases.yml inside of askeet/config:

all:
propel:
class: sfPropelDatabase
param:
phptype: mysql
host: mysql5.hosting.de
database: db228544_11
username: db228544_11
password: youanswer

now i get this error:

{sfException} [wrapped: connect failed [Native Error: Access denied for user [url=mailto:'root'@'local3']'root'@'local3'[/url]

However, grep -iR "local3" does not find any files with local3 apart from the log file...
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am

Re: Connection problem, second attempt

by weaverryan » Thu Mar 19, 2009 10:23 pm

Hey-

To debug, go to the url /frontend_dev.php instead of index.php - that'll help you get rid of some of those errors.

You have 2 issues (at least).

First, the fact that you can't go to /, but instead have to go to /index.php is a problem. This is a server setup problem of some sort. Be sure that you have the .htaccess file in the web folder. Also be sure that your host allows for mod_rewrite.

Second, as you noted, your database configuration is screwed up. The problem, at least at this point, isn't in your propel.ini file, but in your databases.yml file. First, be sure that you've cleared your cache. Next, repost your databases.yml file, but use the proper "code" tags around the contents here on the forum so that we can see that your file is properly spaced (spacing is crucial with YAML files).

That should get you started.

-Ryan
Ryan Weaver - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN

Re: Connection problem, second attempt

by tm1978 » Thu Mar 19, 2009 10:40 pm

Thanks for replying!

Well this script works....the index.php did not.

I have cleared the cache, then went to the dev frontend and then to the index.php, now it works.... :)~ :-)~ :smile:
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am

Re: Connection problem, second attempt

by tm1978 » Thu Mar 19, 2009 10:57 pm

So where is the sf folder with the js files?

Thanks again!
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am

Re: Connection problem, second attempt

by weaverryan » Thu Mar 19, 2009 11:08 pm

The easiest way to take care of the sf folder is to copy it from

Code: Select all
/lib/vendor/symfony/data/web/sf

to

/web/sf


You could also create a symlink from /web/sf to the other location.

-Ryan
Ryan Weaver - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN

Re: Connection problem, second attempt

by tm1978 » Thu Mar 19, 2009 11:24 pm

(I have started a new thead and removed this here)
tm1978
Junior Member
 
Posts: 24
Joined: Wed Mar 18, 2009 11:54 am