LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-01-2019, 06:27 PM   #16
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211

Quote:
Originally Posted by maxmaia View Post
1. The message with config files: /var/www/.lircrc and /etc/lirc/lircrc -- appear also in the case when mplayer is working OK, under user "pi", so most probably can be ignored
2. probably you're right about incorrect config on www-data as per #6 replay, but not idea what can be set wrong; test with sudo is just to make it work, one way or another; I'm hapy with or without sudo anyway
Aren't the config files user-specific?
Make the configuration for www-data the same as those for user pi. Maybe. (Still guessing...)
 
Old 06-02-2019, 01:09 AM   #17
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ you're all missing the point, which is this:
Quote:
Originally Posted by maxmaia View Post
<?php
exec("/home/pi/ir-slinger/sound.sh");
?>
isn't working. called from a web page afaiu.
also AFAIU, the script itself is working, but not when it's called like this.
my repeated calls to go and check server/php logs died away unheard.
I could log into mine and check where they are located, then gently take OP by the hand and tell them wehere to look, but I really think they should put in the effort themselves.

Another question that comes to mind: did PHP ever work on that server?
 
1 members found this post helpful.
Old 06-03-2019, 12:42 PM   #18
maxmaia
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Unfortunately Apache logs does not show anything useful, this is also driving me crazy .
I see only it records the call from browser:

[03/Jun/2019:19:46:54 +0300] "GET /netatmo/sound.php HTTP/1.1" 200 205 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0"

This is the first time I try to make the sound to work on this little Raspberry Pi server.
The webserver itself is functional, other pages, which does not involve sounds, works.

Now I tried another approach:
1. started mplayer in slave mode attached to a FIFO:
mplayer -slave -idle -input file=$FIFO_CONTAINER

2. Adding php script just the command to add a mp3 file to this FIFO:
<?php
$command = "echo loadfile /var/www/html/sound.mp3 > /tmp/fifo1";
exec($command);
?>


3. if I execute this php from command line in terminal:

sudo -u www-data php sound.php ===> this WORKS fine, sound is generated

4. but if I launch PHP from webpage there is no sound, and not sure where it might be the trick.

FIFO file has all needed permissions.
 
Old 06-04-2019, 12:40 AM   #19
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I repeat:
Is your web server configured to interpret PHP files at all?
Make some tests with less error-prone PHP (can be as simple as "echo bla").
 
Old 06-04-2019, 09:15 AM   #20
maxmaia
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Webserver works fine for other pages, as mentioned.
Finally it seems to be some kind of permission issues, included the *.sh script in www directory and from there works.
Thanks to all for involvement.
 
Old 02-24-2022, 05:02 PM   #21
jackortam
LQ Newbie
 
Registered: Feb 2022
Posts: 1

Rep: Reputation: 0
Red face

Quote:
Originally Posted by maxmaia View Post
Webserver works fine for other pages, as mentioned.
Finally it seems to be some kind of permission issues, included the *.sh script in www directory and from there works.
Thanks to all for involvement.
how are you ?

have you find a solution for this issue, i am facing same problem right now

i have also tried to trigger and exc the audio from nod-red ,but no voice to hear
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Browse Websites Side by Side Using Side View Feature on Mozilla Firefox Web Browser | Test Pilot LXer Syndicated Linux News 0 06-08-2018 06:05 PM
Microsoft server side / client side technologies? nibraz General 1 01-03-2013 10:12 AM
Mounting multiple NFS or Samba shares: client-side or server-side? mariogiov Linux - Server 4 04-03-2012 08:11 AM
can't get access to client-side network from server-side network through openvpn nass Linux - Server 1 11-02-2009 04:41 AM
help with client side NFS-firewall setup and server side NIS-firewall setup niverson Linux - Networking 3 02-02-2004 08:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration