ginader / easychirp

easychirp.com - Web accessibility for the Twitter website application
11 stars 1 forks source link

Public Server - run base pages #125

Closed weboverhauls closed 10 years ago

weboverhauls commented 10 years ago

Andrew: I'm trying to get this running on the web server, at least the top-level pages. I got easychirp.ORG pointing to it. I set up the database and copied the files via Git. On first try, I get this message. Ideas?

Fatal error: Class 'EC_Controller' not found in /home/webaxe/easychirp2/easychirp/site/application/controllers/main.php on line 10

andrewwoods commented 10 years ago

Off the top of my head, I don't know. I'll think about it though.

BTW, codeigniter lets you create subdirectories under config for environment specific files. So for example in application/config create the 'development' and 'production' subdirectories move application/config/database.php to application/config/development/database.php Then create a copy of database.php into application/config/production/database.php

Other files like application/config/constants.php are shared and can remain where they are.

http://ellislab.com/codeigniter/user-guide/general/environments.html

// Andrew Woods / Web Developer / http://cafeworkr.com

On Fri, Sep 20, 2013 at 9:01 PM, WebOverhauls notifications@github.comwrote:

Andrew: I'm trying to get this running on the web server, at least the top-level pages. I got easychirp.ORG pointing to it. I set up the database and copied the files via Git. On first try, I get this message. Ideas?

Fatal error: Class 'EC_Controller' not found in /home/webaxe/easychirp2/easychirp/site/application/controllers/main.php on line 10

— Reply to this email directly or view it on GitHubhttps://github.com/ginader/easychirp/issues/125 .

andrewwoods commented 10 years ago

about the problem above not finding EC_Controller. it might be due to filename sensitivity. look in the application/core directory. then rename EC_controller.php to EC_Controller.php -- note the Capital C in controller

weboverhauls commented 10 years ago

Yes, the capital C worked! But now having problems with DB connection...

andrewwoods commented 10 years ago

What is the error you get from the DB Connection? I added config/production directory a few days ago for future use. You'll need to edit the database.php file. I don't know what the value should be. Also in site/index.php there's a ENVIRONMENT constant. you'll need to create an if/else to determine the value of the constant. something like: if ($_SERVER['HTTP_HOST'] == 'easychirp.com'){ define('ENVIRONMENT', 'production'); } else { define('ENVIRONMENT', 'development'); }

I'm not sure what variables are available on production. you can use phpinfo to find out. http://easychirp.com/x.php will do the job.

weboverhauls commented 10 years ago

-Pushed renamed file, EC_Controller.php. -Added if statement similar to above. -The DB error is gone! Now getting a blank page... (http://www.easychirp.org/)

weboverhauls commented 10 years ago

In the VPS logs I found this:

ERROR - 2013-10-04 14:20:46 --> Severity: Warning --> mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/No-MySQL-hostname-was-specified' (2) /home/webaxe/easychirp2/easychirp/site/system/database/drivers/mysql/mysql_driver.php 91

weboverhauls commented 10 years ago

Andrew: What should I try? In the VPS logs for the last week, messages say: ERROR - 2013-10-05 05:24:08 --> 404 Page Not Found --> robots.txt

weboverhauls commented 10 years ago

Hey, can I give you my information so you can get this running on the VPN? I don't know what to do and I'm freaking out.

andrewwoods commented 10 years ago

it looks like it's try to find robots.txt but it cant. i'll try to create an empty file in the 'site' directory. yeah, go ahead an email me the information. does your account have SSH access?

andrewwoods commented 10 years ago

Ok. This worries me. We should not see this on production. I suspect this is the source of our problems.

On branch master

Your branch is ahead of 'origin/master' by 39 commits.

The production server should not be that far ahead. We've done all the work on our dev boxes. There should only be very minor fixes made for production (if any) - like updating a config file.

We need revert those changes on production, and do 'git pull' so that it matches the code we've written and tested locally.

Tip: this link can be used to prevent git from prompting you for your username and password on the command line http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

weboverhauls commented 10 years ago
  1. WTF? I don't see that. I haven't been working on production. I stashed a few minor differences on the server and pulled again and it said "Already up-to-date." Attaching git log from today (it starts with a "normal" update from the 10th).
  2. In the log you'll see that I changed it to SSH but then back to HTTPS because SSH requires a key which I'm not super familiar with doing.

-Dennis

On Sun, Oct 13, 2013 at 8:41 AM, Andrew Woods notifications@github.comwrote:

Ok. This worries me. We should not see this on production. I suspect this is the source of our problems. On branch master Your branch is ahead of 'origin/master' by 39 commits.

The production server should not be that far ahead. We've done all the work on our dev boxes. There should only be very minor fixes made for production (if any) - like updating a config file.

We need revert those changes on production, and do 'git pull' so that it matches the code we've written and tested locally.

Tip: this link can be used to prevent git from prompting you for your username and password on the command line http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

— Reply to this email directly or view it on GitHubhttps://github.com/ginader/easychirp/issues/125#issuecomment-26220252 .

Last login: Thu Oct 10 14:02:43 on ttys000 LM-SJN-00870737:~ dlembree$ ssh webaxe@webaxe.org webaxe@webaxe.org's password: Linux ps123773 2.6.38.8-2-vs2.3.0.37-rc17-blkio #20 SMP Thu Aug 4 11:28:54 PDT 2011 x86_64

The programs included with the Debian GNU/Linux ps123773 are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux ps123773 with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Oct 4 14:18:08 2013 from 216.113.168.131 [ps123773]$ cd webaxe/easychirp2/easychirp -bash: cd: webaxe/easychirp2/easychirp: No such file or directory [ps123773]$ cd easychirp2/easychirp/ [ps123773]$ git pull origin master Username: Password: remote: Counting objects: 46, done. remote: Compressing objects: 100% (23/23), done. remote: Total 33 (delta 28), reused 15 (delta 10) Unpacking objects: 100% (33/33), done. From https://github.com/ginader/easychirp

The programs included with the Debian GNU/Linux ps123773 are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux ps123773 with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Oct 13 07:41:28 2013 from 184.77.207.89 ###########################################################

Hello webaxe

You are logged into ps123773.dreamhostps.com

Today is Sun 2013 Oct 13 8:57 AM

###########################################################

On this date 10/13 Italy declares war on Germany, 1943 10/13 US Navy born, 1775, authorized by the Second Continental Congress 10/13 Paul Simon is born in Newark, New Jersey, USA , 1941 ps123773:~ webaxe$ cd easychirp2/easychirp/ ps123773:easychirp webaxe$ git remote set-url origin git@github.com:ginader/easychirp.git ps123773:easychirp webaxe$ git status

On branch master

Your branch is ahead of 'origin/master' by 39 commits.

#

Changed but not updated:

(use "git add ..." to update what will be committed)

(use "git checkout -- ..." to discard changes in working directory)

#

modified: site/application/config/production/config.php

modified: site/application/core/EC_Controller.php

modified: site/index.php

#

Untracked files:

(use "git add ..." to include in what will be committed)

#

site/application/core/.EC_Controller.php.swp

site/favicon.gif

site/favicon.ico

site/robots.txt.old

no changes added to commit (use "git add" and/or "git commit -a") ps123773:easychirp webaxe$ git stash Saved working directory and index state WIP on master: 1f0c234 Fixing source of tweets; change from authenticated user to @EasyChirp (not heading "Latest Tweets from Easy Chirp") HEAD is now at 1f0c234 Fixing source of tweets; change from authenticated user to @EasyChirp (not heading "Latest Tweets from Easy Chirp") ps123773:easychirp webaxe$ git pull origin master The authenticity of host 'github.com (192.30.252.131)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts. Permission denied (publickey). fatal: The remote end hung up unexpectedly ps123773:easychirp webaxe$ ls README.md docs/ gen-phpdoc* phpdocs/ site/ sql/ ps123773:easychirp webaxe$ git pull origin master Permission denied (publickey). fatal: The remote end hung up unexpectedly ps123773:easychirp webaxe$ git remote set-url origin https://github.com/ginader/easychirp.git ps123773:easychirp webaxe$ git pull origin master Username: Password: From https://github.com/ginader/easychirp

andrewwoods commented 10 years ago

The git status you did above displays the message about being ahead by 39 commits. Githubs markdown interpreted it as an H1. sorry about that :)

andrewwoods commented 10 years ago

doh! ok. we need to create a new application on twitter for production. we need to set the callback to http://easychirp.org/oauth_callback Currently when you try to login to production, it redirects you to your local instance. the production application settings need to go into config/production/config.php

weboverhauls commented 10 years ago

Hooray!!!