|
|
|
| Re: This is how I installed symfony in godaddy.com [message #17611 is a reply to message #11096 ] |
Sun, 10 December 2006 17:48   |
ratow Messages: 4 Registered: December 2006 Location: Brazil |
Junior Member |
|
|
Hello,
Thanks to this thread I managed to install Symfony 0.6.3 on godaddy. It's working perfectly, but I was unhappy with the /web/ in the beggining of URLs. So, after quickly analyzing how those URLs were generated, I did a tiny patch that essentialy ignores what subdirectory Sympfony is in. It is applied against sfWebController.class.php and can be found here or attached to this post. It was tested on version 0.6.3, but should work on the latest one.
Also, to activate it, the option no_relative_url (new) in settings.yml must be on:
prod:
.settings:
no_relative_url: on
My .htaccess file then became this:
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} /stats
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} !/web/
RewriteRule ^(.*)$ web/$1
# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"
The above rules appends web/ to the beginning of every URL and so makes others internal directories invisible, with the exception of /stats, the web statistics directory.
This is far from a perfect solution, I guess, but it works for me. Some more info on how I installed and programmed Symfony can be found on my blog.
I hope this is useful to someone.
Cheers!
Ricardo Lipas Augusto
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22208 is a reply to message #17611 ] |
Wed, 21 February 2007 19:29   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
I go error 'can not find sfCoreClass.php' I had to edit config/config.php to point to the correct absolute
path.
Still the web site does not work for me.
I get
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
I removed everything from the cache and refreshed the page. I see that Symfony builds in the cache folders like /cache/backend/prod/modules/autoProject/actions
/cache/backend/prod/config
with a couple of PHP files
So it does something.
I try link web/backend.php/project which works in my local setup
Is there any log file to look into ?
thank you
[Update] http://www.opencoredb.com/web/index.php shows Ok page
Symfony Project Created Congratulations! You have uccessfully created your symfony project.
[Update 1]
Looks like i have to fix mySQL data base first
[Updated on: Wed, 21 February 2007 19:39] http://www.gomyplace.com
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22211 is a reply to message #22208 ] |
Wed, 21 February 2007 20:06   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
I think I fixed mySQL settings
phpMyAdmin works with the data base and tables look allright
I am really stalled here
http://www.gomyplace.com
|
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22228 is a reply to message #22212 ] |
Wed, 21 February 2007 23:04   |
ratow Messages: 4 Registered: December 2006 Location: Brazil |
Junior Member |
|
|
Hi larytet,
the development backend seems to be enabled (_dev):
http://www.opencoredb.com/web/backend_dev.php/project
It gives a nice backtrace of what happened. To me it's giving the error: "connect failed [Native Error: Lost connection to MySQL server during query]"
Looks like your MySQL connection is not setup properly.
You should check your config/databases.yml file and see if everything is correct (host, port, database, username, password, etc..)
You can find these under the mysql icon on the control panel. The default MySQL port is 3306.
--
Ricardo Lipas Augusto
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22238 is a reply to message #22228 ] |
Thu, 22 February 2007 08:57   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
yes, thank you, I see now. I fixed the passwords and now I get new error
http://www.opencoredb.com/web/backend_dev.php/project
[PropelException]
[wrapped: Could not execute update [Native Error: Unknown system variable 'NAMES'] [User Info: SET NAMES utf8] [User Info: Array]]
stack trace
* at ()
in SF_ROOT_DIR/lib/symfony/vendor/propel/Propel.php line 484 ...
481. try {
482. $con = Creole::getConnection($dsn);
483. } catch (SQLException $e) {
484. throw new PropelException($e);
485. }
486. self::$connectionMap[$name] = $con;
487. }
* at Propel::getConnection('propel')
in SF_ROOT_DIR/lib/model/om/BaseProjectPeer.php line 157 ...
I commented line
# encoding: utf8 # Default charset for table creation
and now link http://www.opencoredb.com/web/backend_dev.php/project works
Thank you
http://www.gomyplace.com
|
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22253 is a reply to message #11096 ] |
Thu, 22 February 2007 11:06   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
Switch on your symfony logging temporarily in this front controller and see if anything is dumped in your prod log?
Remember Palestine
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22270 is a reply to message #22253 ] |
Thu, 22 February 2007 12:23   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
I enabled (?) logging in the file logging.yml I did not discover anything new.
I modified backend.php
define('SF_DEBUG', true);
and this is what I get
[PropelException]
[wrapped: connect failed [Native Error: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)] [User Info: Array]]
stack trace
* at ()
in SF_ROOT_DIR/lib/symfony/vendor/propel/Propel.php line 484 ...
481. try {
482. $con = Creole::getConnection($dsn);
483. } catch (SQLException $e) {
484. throw new PropelException($e);
485. }
486. self::$connectionMap[$name] = $con;
487. }
* at Propel::getConnection('propel')
in SF_ROOT_DIR/lib/model/om/BaseProjectPeer.php line 157 ...
but http://www.opencoredb.com/web/backend_dev.php/project works just fine with the same (?) SQL server settings
Where should I enable the log and where do I find the log file
[Updated on: Thu, 22 February 2007 12:25] http://www.gomyplace.com
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22278 is a reply to message #11096 ] |
Thu, 22 February 2007 12:40   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
No, that's the debug toolbar. Go to apps/(appname)/config/logging.yml and set "active: on" against the front controller you are using (probably 'prod').
Remember Palestine
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22280 is a reply to message #22278 ] |
Thu, 22 February 2007 12:44   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
I think I know what the problem is
propel settings - local SQL server.
I will probably write step by step instructions how to setup Symfony in the goDaddy servers. The whole mySQL business was tricky at least for me.
http://www.gomyplace.com
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22284 is a reply to message #22280 ] |
Thu, 22 February 2007 13:06   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
Ok, works
http://www.opencoredb.com/web/backend.php/project
Thank you.
This is the trick (at least trick for me)
databases.yml
prod:
propel:
param:
host: xxx.secureserver.net # SQL server
username: sqlDatabaseUserName
password: sqlDatabaseUserPassword
all:
propel:
class: sfPropelDatabase
param:
phptype: mysql # Database vendor
hostspec: xxx.secureserver.net # SQL server
database: sqlDatabaseName # in my case = sqlDatabaseUserName
username: sqlDatabaseUserName
password: sqlDatabaseUserPassword
port: 3306
# encoding: utf8 # I had to comment this line
persistent: true # Use persistent connections
propel.ini
propel.targetPackage = lib.model
propel.packageObjectModel = true
; Next line is probably does not matter
propel.project = sym_00
propel.database = mysql
propel.database.createUrl = mysql://xxx.secureserver.net/
propel.database.url = mysql://xxx.secureserver.net/
propel.addGenericAccessors = true
propel.addGenericMutators = true
propel.addTimeStamp = false
propel.schema.validate = false
; directories
propel.home = .
; Next line depends on the web site name, see config.php
propel.output.dir = /home/content/o/p/e/opencoreadmin/html
config.php
$sf_symfony_lib_dir = '/home/content/o/p/e/opencoreadmin/html/lib/symfony';
$sf_symfony_data_dir = '/home/content/o/p/e/opencoreadmin/html/data/symfony';
[Updated on: Thu, 22 February 2007 13:18] http://www.gomyplace.com
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22285 is a reply to message #11096 ] |
Thu, 22 February 2007 13:16   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
I think this comes about because your MySQL database does not support "SET NAMES" - check the version you are running and then examine the docs to see if it is supported:
http://dev.mysql.com/doc/refman/5.0/en/charset-connection.ht ml
If not then you may not be able to store utf-8 data in your database (which may not be important to you).
[in reference to your post #22238]
[Updated on: Thu, 22 February 2007 13:18] Remember Palestine
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #22286 is a reply to message #22285 ] |
Thu, 22 February 2007 13:21   |
larytet Messages: 31 Registered: February 2007 |
Member |
|
|
SET NAMES is not supported indeed. I tried to execute SET NAMES from phpMyAdmin and got
Error
SQL query:
SET NAMES utf8
MySQL said: Documentation
#1193 - Unknown system variable 'NAMES'
I need only English, so may be it is not important. I did not look up this error yet.
I appreciate your help
http://www.gomyplace.com
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #33486 is a reply to message #11096 ] |
Wed, 15 August 2007 22:42   |
Serengeti Messages: 4 Registered: August 2007 |
Junior Member |
|
|
I am trying to install symfony onto my Deluxe Linux hosting account at GoDaddy. I have just been told that I need a Dedicated Hosting account and that my current shared hosting will not work.
Please advise to where I can find the PEAR files to relocate into my symfony folder. I installed PHP and PEAR locally. I'm not sure where to find the folders in the first 2 steps.
1) PEAR_DIR/data/symfony
2) PEAR_DIR/symfony
I know where my PEAR directory is. I found the /data/ folder. Not sure where the symfony folder is within the PEAR folder, or why it would be there in the first place.
Maybe I'm not fully understanding.
[Updated on: Thu, 16 August 2007 05:56]
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #33573 is a reply to message #11096 ] |
Fri, 17 August 2007 14:56   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
|
You don't need PEAR on the remote server. Have you tried freezing your project?
[Updated on: Fri, 17 August 2007 14:57] Remember Palestine
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #33584 is a reply to message #33573 ] |
Fri, 17 August 2007 20:33   |
Serengeti Messages: 4 Registered: August 2007 |
Junior Member |
|
|
Well after a few brick walls, I figured out that I needed to install symfony locally. I'm new to this whole scene and that part was not included into the steps above.
I am having another problem. My GoDaddy account puts me right into the public_html folder. I do not see the folders that are one level above (stats, etc.).
I have started a new hosting account at A2, one of the companies listed on this site. I am eagerly awaiting completion of the setup of that account. I also set up a WAMP server on my local computer last night.
I haven't even started a project yet. I was just trying to set up the environment. I'm used to working on a live server and falsely assumed that symfony worked the same.
[Updated on: Fri, 17 August 2007 20:34]
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #34988 is a reply to message #11096 ] |
Wed, 05 September 2007 21:23   |
pravams Messages: 7 Registered: September 2007 Location: Bangalore |
Junior Member |
|
|
i was able to install symfony successfully on godaddy by the process which im_simpleboy told. Thanks to him.
But there is a problem which i have been facing since many days.
My site is say www.example.com but after installing symfony i can access the modules by the url www.example.com/web/ and not by www.example.com
Can anyone help me with this. Or do i need to change my hosting server or something ?
thanks
pravams
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #35119 is a reply to message #34988 ] |
Fri, 07 September 2007 00:57   |
ratow Messages: 4 Registered: December 2006 Location: Brazil |
Junior Member |
|
|
My first reply up there (4th on this thread) explains how I managed to get rid of the /web/ on GoDaddy. It was for the 0.6.3 version but I recently found that the patch still works on the 1.0 version.
I'm still using it on my website, actually.
Feel free to contact me if you need help with the patch.
|
|
|
|
| Re: show only blank page [message #35695 is a reply to message #35653 ] |
Sun, 16 September 2007 15:41   |
ratow Messages: 4 Registered: December 2006 Location: Brazil |
Junior Member |
|
|
Your problem does not seems to be the .htaccess file.
The page is garbled because it is not pointing to the correct CSS and Javascript files. Looking through the page source I found that the variable SCRIPT_NAME is incorrect:
SCRIPT_NAME: /web/milwell.com_dev.php/main
The right value would be '/web/milwell.com_dev.php' I think. This explains the wrong links but I don't know why this is happening. I noticed you are using godaddy ad-supported hosting, which could be different from the paid one, in this respect.
This ticket describes a problem very similar to yours. Maybe it helps.
|
|
|
|
| Re: This is how I installed symfony in godaddy.com [message #39123 is a reply to message #11096 ] |
Fri, 09 November 2007 07:59  |
navteniev Messages: 1 Registered: November 2007 |
Junior Member |
|
|
I'm trying to deploy a symfony app on GoDaddy. Dropped it into a directory to which I mapped the subdomain, http://staging.artcriesout.com. With the following .htaccess file
AddHandler x-httpd-php5 .php
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !web\/.*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/$1
# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ main_staging.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/main_staging.php [QSA,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 404 "<h2>Page not found</h2>"
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"
If you actually go to the site http://staging.artcriesout.com you will get a page. If you click on the Submit Work you should be directed to the submission module create action. The url is http://staging.artcriesout.com/submission/create . If you use the link you'll get a 404. If the link is changed to http://staging.artcriesout.com/submission/create/ note the extra /. This page load fine. Both of these links load fine on my dev box, which is using the same .htaccess file. Any one have a guess as to why this would be happening?
[Updated on: Fri, 09 November 2007 08:00]
|
|
|