question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PHP URL commands not activating visualizations.

See original GitHub issue

I was able to successfully implement Scotts original and everything works fine. I stumbled across your fork which solved the issue of controlling the on/off state of the LED strip and visualizations. Thank you kindly for that! Very handy feature. I’m having a problem however with getting the visualization('s) to execute via the URL. Everything works as intended using the command line arguments to change the visualization. I do have Apache2 and PHP installed. I did test a couple simple “hello world” and print date PHP index files to insure that Apache could run PHP scripts, which were successful. The http://ip-address/control.php?on=spectrum returns nothing on the page (expected) but does not start the visualization (unexpected). http://ip-address/control.php?off=1 reutrns sudo: no tty present and no askpass program specifiednada, not sure why… Any suggestions? Thanks!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Codename-11commented, Oct 3, 2019

The user www-data does own all the files inside of /var/www/html. Screenshot_20191003_122133 The only file that isn’t owned by www-data is the index.php I created which just shows a line of text on the page describing what it’s for. I did try removing that and attempting to run the visuals as stated in Browser Setup, but to no avail. I will do a freash install again when I get the chance and work it backwards and see if I can find out a cause since you’re saying that I shouldn’t need to give www-data Python permissions in the sudoers file. I’ll let you know what I come up with.

Unrelated to this issue, but if you’re interested I also came up with a solution for controlling the strips visualization and on/off using your repository via Home Assistant. It doesn’t use the web server, it uses SSH to remotely run the commands and an automation to run sudo killall python and run off.py in sequence so no conflicts happen. I couldn’t have done this without your expansion on Scott’s repo, so I really appreciate the work man. I’d love to contribute where I can! Let me know.

1reaction
naztronautcommented, Oct 3, 2019

I also added a new troubleshooting section and referenced this issue and the workaround you posted: https://github.com/naztronaut/dancyPi-audio-reactive-led#troubleshooting

Thanks for doing that!

And I’m really glad you got it to work 😃 congrats!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

mysql - PHP file not working - Stack Overflow
I'm making a practice website for signing in, using PHP and MySQL. ... charset=utf-8"/> <title>Sign-In</title> <link href="layout.css" rel="stylesheet" ...
Read more >
Documentation » Profiling - Xdebug
Xdebug's built-in profiler allows you to find bottlenecks in your script and visualize those with an external tool such as KCacheGrind or WinCacheGrind....
Read more >
How to run a PHP program in Xampp? - Edureka
PHP is the most popular web backend programming language. A PHP code will run as a web server module or as a command-line...
Read more >
preg_replace - Manual - PHP
When working with a replacement pattern where a backreference is immediately followed by another number (i.e.: placing a literal number immediately after a ......
Read more >
How to Visualize And Debug Routes (Symfony 4.1 Docs)
Warning: You are browsing the documentation for Symfony 4.1, which is no longer ... every route in your application is via the debug:router...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found