Warning: fopen(/etc/zm/zm.conf): failed to open stream

Forum for questions and support relating to the 1.31.x releases only.
Locked
desther
Posts: 2
Joined: Mon Aug 14, 2017 5:49 pm

Warning: fopen(/etc/zm/zm.conf): failed to open stream

Post by desther »

Hi,
I have some problems with fresh installation of ZoneMinder. I tried to search web and browse through docs, but without any luck. I successfuly installed ZoneMinder and managed to start it, but when i go to ZoneMinder page, i receive an error:

Warning: fopen(/etc/zm/zm.conf): failed to open stream: Permission denied in /usr/share/zoneminder/www/includes/config.php on line 39
Could not open config file.


Tried these commands, but it is all the same:

Code: Select all

chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
I run on Linux Mint (Ubuntu based distro) and use Xampp for an apache, mysql (MariaDB) and PHP7.

Do you have any idea how to solve this issue? I would be very glad :)

Have a nice day all!
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Warning: fopen(/etc/zm/zm.conf): failed to open stream

Post by bbunge »

What version of Linux Mint? It will determine the Ubuntu install to reference. Which version of Zoneminder did you install? This forum area is for Zoneminder 1.31.x which is in development.

Get rid of Xampp and follow the instructions for installing LAMP for Ubuntu. Once you have that done look up the correct Ubuntu server install on the Zoneminder WIKI and follow it!
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Warning: fopen(/etc/zm/zm.conf): failed to open stream

Post by rockedge »

the only way I ever found to run zoneminder using XAMPP was to specifcly build ZM from source and customize the cmake parameters to fit zoneminder into the XAMPP scheme...or heavily modify the configuration files. It is easier to use an install of apache2 and mysql with php and perl as bbunge mentioned previously.
desther
Posts: 2
Joined: Mon Aug 14, 2017 5:49 pm

Re: Warning: fopen(/etc/zm/zm.conf): failed to open stream

Post by desther »

Sorry for posting this topic in wrong section, my bad.

As for XAMPP, i actually managed to get it working, thought there was some configuration needed. In this case the permission denied was due the wrong user XAMPP was using (daemon instead of www-data), so i switched it to www-data and now it works.

I have some other software running on XAMPP, so i wanted to preserve this solution instead of installing another one.

Big help was this topic: http://www.murga-linux.com/puppy/viewtopic.php?t=102000, so if there is another one who is trying to run ZoneMinder on XAMPP, check it out.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Warning: fopen(/etc/zm/zm.conf): failed to open stream

Post by rockedge »

Yes that was my post, rockedge is me.
I advanced the project pretty far. I modified the XAMPP control panel to include controls for ZM and the option to run either Apache or Hiawatha. One could turn them on and off via the control panel. I added php5-fpm and Gadmintools – GADMIN-PROFTPD to XAMPP but the thing got to be much bigger than the XAMPP structure. I did this on Puppy Linux and the reason was to build a squash file .sfs that could be installed and removed very easily for the Ubuntu/Debian based puppies. That worked well at the time but I began to find ways to use the tools in Puppy Linux to set up up more traditional ZM installs using a LAMP similar to the "big guys". I am at the moment experimenting running ZM on a OS that acts like Puppy Linux but is in fact based on a very minimal Ubuntu. Called XenialDog it is very light and fast and one can install ZM by directly copying and pasting the commands from the instructions here :
https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way and it works beautifully. I used the iconner zoneminder-master PPA for this one. I found the XAMPP - ZoneMinder combination to be very stable and reliable running in Puppy Linux Ubuntu/Debian variants.

more on the subject from the past -> http://www.murga-linux.com/puppy/viewtopic.php?t=92856
capture10139.png
capture10139.png (199.53 KiB) Viewed 3692 times
Locked