Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.php not interacting correctly with msg #16

Closed
karvec opened this issue May 23, 2013 · 2 comments
Closed

api.php not interacting correctly with msg #16

karvec opened this issue May 23, 2013 · 2 comments

Comments

@karvec
Copy link

karvec commented May 23, 2013

I'm running into a problem where api.php is creating a msg file that it cannot interact with, and am wondering what I can do to fix this. Also affects curSong and stationList. The only way I've been able to fix it so far is to rm the file or chown/chmod the file so api.php can interact with it. Not sure how I can resolve this issue elsewise. Also, does not seem to be resuming properly after playing NPR news. Running debian wheezy, set up semiproperly.
shown below:

root@icecube:/opt/lampp/htdocs/pidora# ls -ll
total 2492
-rwxrwxrwx 1 nobody 6226 35147 Mar 27 21:10 LICENSE
-rwxrwxrwx 1 nobody 6226 3113 Mar 27 21:10 README.md
drwsrwsrwx 2 nobody 6226 4096 May 23 00:38 albumart
-rwxrwxrwx 1 nobody 6226 3268 May 22 21:54 api.php
prwxrwxrwx 1 nobody 6226 0 May 23 00:38 ctl
-rw-r----- 1 root 6226 229 May 23 00:42 curSong
drwsrwsrwx 2 nobody 6226 4096 Mar 27 21:10 inc
-rwxrwxrwx 1 nobody 6226 3089 May 22 04:47 index.php
-rwxrwxrwx 1 nobody 6226 1 May 23 00:37 lastNews
drwsrwsrwx 2 nobody 6226 4096 Mar 27 21:10 lib
-rwxrwxrwx 1 nobody 6226 2315 Mar 27 21:10 mobile.php
-rwxrwxrwx 1 nobody 6226 2468301 May 23 00:37 newscast.mp3
drwsrwsrwx 2 nobody 6226 4096 May 22 04:11 pianobar-eventcmd
-rw-r----- 1 root 6226 285 May 23 00:38 stationList

Also with update.py, it seems to have trouble following the correct NPR news feed and/or playing too often.

Traceback (most recent call last):
File "/root/.config/pianobar/update.py", line 31, in
urllib.urlretrieve(feed.entries[0].id, www + "newscast.mp3")
File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "/usr/lib/python2.7/urllib.py", line 239, in retrieve
fp = self.open(url, data)
File "/usr/lib/python2.7/urllib.py", line 207, in open
return getattr(self, name)(url)
File "/usr/lib/python2.7/urllib.py", line 344, in open_http
h.endheaders(data)
File "/usr/lib/python2.7/httplib.py", line 958, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 818, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 780, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 761, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known

@jacroe
Copy link
Owner

jacroe commented May 23, 2013

Try chmod/chown'ing the parent directory to make it writable by both the web server and via the command line.

Also, I'm not sure why lastNews has a different owner than newscast.mp3 and curSong. They should both be owned by the same user since they're created by the same program at roughly the same time. Just a note.

@jacroe
Copy link
Owner

jacroe commented Jun 14, 2013

Marking as closed since I haven't received any feedback back. If it's still not working, feel free to comment or open a new issue.

@jacroe jacroe closed this as completed Jun 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants