eschnou / storytlr

Storytlr is an opensource lifestreaming and microblogging platform written in PHP. Note: The default branch (master) is the development branch, if you need a stable version, see the release-XX branches, tags, or downloads.
http://storytlr.org
Other
216 stars 57 forks source link

/admin/post/image and /admin/post/audio errors #14

Open kylehase opened 14 years ago

kylehase commented 14 years ago

v1.0 PHP error when loading /admin/post/image and /admin/post/audio. Other /admin/post/ pages load fine. The error is as follows:

PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/storytlr/protected/application/admin/controllers/PostController.php on line 867

That line references Twitter credentials which are commented out in my config file.

;; Twitter settings ;twitter.username= ;twitter.password= ;twitter.default.hide_replies=1

Ubuntu server 10.04.1 x86_64

eschnou commented 14 years ago

Thanks for pointing this one. I understand from your post that only a warning is generated ? i would advise you to put debug=0 in your config.ini to avoid warning being displayed if that is the case. Let me know if it is an error that prevent you from posting.

kylehase commented 14 years ago

My post was unclear. Both the image and audio post pages display:

Ooops Hmmm.... something just went wrong. The error has been logged and our code monkeys will look into it as soon as they are back from their daily walk in the park.

The PHP Warning was from my server log. Debug was and still is 0.

eschnou commented 14 years ago

I could not reproduce the problem so far, so I need more help. A stack trace must have been generated in protected/logs/applicationException.log. Can you please look it up and share it with me ? Either here or by email: laurent at eschenauer.be

kylehase commented 14 years ago

Found the problem. The install instructions mentions write permissions to

feeds/ protected/upload/ protected/temp/ protected/logs/

but the config.ini.sample includes the following which I didn't realize were overrides of the default subdirectories in "protected/" (is that correct?)

#path.upload = /tmp/upload
#path.logs = /tmp/logs
#path.temp = /tmp/temp
#path.feeds = /tmp/feeds

I uncommented and edited the config lines as follows but only created and chown'd the /tmp/storytlr/ directory, expecting storytlr to create the subdirectories from there.

path.upload = /tmp/storytlr/upload
path.logs = /tmp/storytlr/logs
path.temp = /tmp/storytlr/temp
path.feeds = /tmp/storytlr/feeds

If it is correct that these config lines are overrides for the default "protected/" subdirectories, may I suggest the following:

1) Update the install guide to mention these overrides. 2) Add a note to config.ini.sample that these lines override the default "protected/" subdirectories and must be manually created. 3) Create the subdirectories at runtime if they don't exist.

kylehase commented 14 years ago

The PHP warning does not seem to have been critical but can be reproduced by unchecking all the boxes on example.com/admin/sns/.

eschnou commented 14 years ago

Thanks Kyle, good points. Will definitively makes this clearer. Indeed; it is an 'advanced' config :-) In my personal case, I have all the data in /var/storytlr and the logs in /var/logs/storytlr. By the way you can also have the config.ini in /etc/storytlr/config.ini

By this, you can have all 'dynamic' files outside of the project folder, and thus you can easily switch releases, upgrade, or run on systems like EC2 (where the host storage is ephemeral).