RPiCam - working, but can't use buttons

Hi everyone,

Just installed DietPi on a Pi4. Got it all set up and then added RPiCam. Install went fine, and I can access the live feed at http://[myipaddress]/rpicam. Unfortunately, any button I try to use on the web page doesn’t work (like record video, record image, timelapse start, etc.) I did some googling, and found the following page:


which seems to describe my problem exactly. While the file locations from that link aren’t exactly the same, the files are there, they are linked and the linked file has “READY” as it’s only contents. For reference, the original file is at /run/shm/mjpeg/status_mjpeg.txt (same as the link above) and that has a symbolic link to /var/www/rpicam/status_mjpeg.txt. So far, so good. I then loaded the page in new Edge and went to developer options, and I see the stream of images loading and this status update checking every second or so. It’s running a php script that’s in the /var/www/rpicam folder, and it appears to be returning “last=ready”.

The php script is as follows:


  // send content
  $file_content = "";
  for($i=0; $i<30; $i++) {
    $file_content = file_get_contents("status_mjpeg.txt");
    if($file_content != $_GET["last"]) break;
  echo $file_content;


So I’m stuck now and don’t know where to go from here. Checking the browser debug was the last suggestion in the troubleshooting guide linked above, but it didn’t say what to do after that or what the correct output of that php script should be. I may have a permissions problem or something else, but I’m lost and dont’ know where to go at this point. I don’t know PHP, but went to the PHP website and learned enough to mostly understand that script, but obviously something is wrong and I don’t know where to go from here.

Any help is greatly appreciated.



I should also mention I’ve rebooted a few times and each time I can see the live stream, the buttons appear to be active (they are colored), but pushing them does nothing. They kind of dim a bit, but don’t change from that dim state until I refresh the page. If I select “Record Image” or “Record Video” nothing gets recorded.




unfortunately I don’t have RPiCam. Therefore I’m not able to test this on my spare RPi’s. But maybe you can have a look to web server error log. If you use lighttpd, it should be located at:

cat /var/log/lighttpd/error.log

Error log is empty (zero bytes). Could logging potentially not be enabled?



that could mean no errors at web server side. To verify that logging is enabled, you can check /etc/lighttpd/lighttpd.conf. There you should see the following line:

server.errorlog = "/var/log/lighttpd/error.log"

for debugging purposes you could add the following line. But nut sure if this helps as it will start to log all request headers.

debug.log-request-handling = "enable"

Quick update on this. I noodled with this for a while and ultimately didn’t see anything in the log that gave me any clues. I grabbed another SD card, installed Raspbian Lite and then followed the install instructions here https://elinux.org/RPi-Cam-Web-Interface and it was up and running and working right out of the gate.

I saved the SD card I was using with DietPi and may go back to it on the weekend when I have some time.



if you would have time, you could install a plain DietPi and try to setup RPICam using the guide you linked.

Yep - no problem. I will see if I can do that today - I hadn’t thought of doing that, but I’m also curious to give it a try.

I’ll report back as soon as I do and let you know.



Update. I did the following today with the results noted:

  • Installed DietPi. Updated, set networking and just the basics (locale, time zone, keyboard, etc), then installed RPi Cam Web Interface using the Raspbian instructions I linked to above. It worked and all functionality was there.
  • Wiped the SD card and installed DietPi - same basic config as above. Used the DietPi software installer to install it. Same results as noted in my original post. The webpage loads, but none of the buttons work at all. I can view the live feed, but can’t really do much else.

The only thing I noted while doing it all is that the regular install script for RPi Cam Web Interface defaults to Apache, whereas the DietPi install defaults to Lighttpd. I went with all the defaults in both cases, so my first attempt ended up with Apache as my web server, and the second ended up with Lighttpd as my web server. Lighttpd is an option for the regular install script, so I may try the first option above one more time but pick Lighttpd and see what happens. That will probably be tomorrow as I’ve been up since 4:30am and I’m beat. :slight_smile:

Stay tuned,



you could do one more test if you like. Setup a plain DietPi and change web server preference to Apache. Once done, try to install RPICam using dietpi-software.