{"id":527,"date":"2009-07-03T08:04:13","date_gmt":"2009-07-03T15:04:13","guid":{"rendered":"http:\/\/xiehang.com\/blog\/?p=527"},"modified":"2009-07-03T08:12:22","modified_gmt":"2009-07-03T15:12:22","slug":"symfony-and-godaddy","status":"publish","type":"post","link":"https:\/\/xiehang.com\/blog\/2009\/07\/03\/symfony-and-godaddy\/","title":{"rendered":"Symfony and Godaddy"},"content":{"rendered":"

Though problems I’m going to discuss are for symfony 1.2, I guess it applicable to 1.0 and 1.1 as well.<\/p>\n

I finally got symfony works on godaddy shared hosting, I guess if I were running any sort of dedicated hosting, these problem could not have happened, as I have full control.<\/p>\n

The first problem hit me is PHP version, symfony needs PHP5, and godaddy supports PHP5 – good. However, it seems godaddy’s default PHP is still PHP4 so have to set alias to make sure symfony script is interpreted by PHP5 instead of PHP4:<\/p>\n

alias symfony=’\/usr\/local\/php5\/bin\/php \/path\/to\/symfony-1.2.7\/data\/bin\/symfony’<\/p><\/blockquote>\n

after this, I got the problem, saying:<\/p>\n

\/usr\/local\/php5\/bin\/php: Symbol `client_errors’ has different size in shared object, consider re-linking<\/p><\/blockquote>\n

and turned out it was because of mysql client lib problem – I don’t know the detail yet, but seems \/usr\/local\/php5\/bin\/php and \/web\/cgi-bin\/php5 are both linked to \/usr\/lib\/mysql\/libmysqlclient.so.15, which works for \/web one but not the \/usr one. I did some tests and found \/usr\/lib\/libmysqlclient.so.14.0.0 works perfect with \/usr\/local\/php5\/bin\/php, so put this into my .bash_profile:<\/p>\n

LD_PRELOAD=\/usr\/lib\/libmysqlclient.so.14.0.0<\/p><\/blockquote>\n

note that \/usr\/lib\/libmysqlclient.so.10.0.0 doesn’t work well as it’s too old to support modern (new) password encrypt\/authentication.<\/p>\n

By now I can use symfony do the development job, but problem are still there while I’m trying to browse from browser, the first thing is rewrite rules – these lines should be uncommented from web\/.htaccess:<\/p>\n

RewriteBase \/
\nRewriteCond %{REQUEST_URI} \\..+$
\nRewriteCond %{REQUEST_URI} !\\.html$
\nRewriteRule .* – [L]<\/p><\/blockquote>\n

then I met the problem (which took me longest time to solve) with error:
\nEmpty module and\/or action after parsing the URL “\/index.php” (\/).
\nactually I should have got it solve earlier if I search on the web, there is a great article talking about the solution<\/a>, and my problem got solved just after 1st part of solution mentioned by the blog – adding following lines to “all” section of apps\/frontend\/config\/factories.yml:<\/p>\n

\n
request:\r\n  param:\r\n    path_info_key: REQUEST_URI<\/pre>\n<\/blockquote>\n

be careful with intending, original blog seems not doing the right thing and put “request” and “param” in same level, which is wrong.<\/p>\n

Alright, by this time you will be able to play with symfony on shared hosting with godaddy. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"

Though problems I’m going to discuss are for symfony 1.2, I guess it applicable to 1.0 and 1.1 as well. I finally got symfony works on godaddy shared hosting, I guess if I were running any sort of dedicated hosting, these problem could not have happened, as I have full control. The first problem hit […]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[87,103,72,80],"_links":{"self":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/527"}],"collection":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":7,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"predecessor-version":[{"id":529,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/527\/revisions\/529"}],"wp:attachment":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/tags?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}