I have installed OrangeHrm 3.3.3 on Ubuntu 14.04 Server and now trying to configure SMTP Email.
The credentials and settings are correct. I am using same in SuiteCRM installed on CentOS 7.
The message I get
Settings Saved. Test email not sent.
I remember doing this on CentOS:
chcon -R -t httpd_sys_content_rw_t /var/www/html
setsebool httpd_can_network_connect=on
setsebool httpd_can_sendmail=on
setsebool httpd_unified=on
Is there some similar settings for Apache on Ubuntu where I can allow sendmail on the server?
I would highly appreciate your input.
Thanks in advance.
/AAN
Related
I already had pgadmin installed before ubuntu was updated to 20.04. Once it was updated, I realized that pgadmin had disappeared (my databases in postgresql are still there intact) and I followed the instructions below to install pgadmin4:
How to Install PostgreSQL and pgAdmin4 in Ubuntu 20.04
At some point it was supposed to ask me to configure an account with my email and password, but it never did, now I am able to get to the home screen but I cannot login because I did not configure an email and password.
Any help is welcome, thank you!
I removed
/var/lib/pgadmin/pgadmin4.db
file. It was first start pgadmin4 for me so there were nothing important
And then I run
sudo /usr/pgadmin4/bin/setup-web.sh
again and it ask for email\password
I am using the following configuration, ubuntu 16.04 apache2 php 7.0 owncloud 10.0.3. I think I have made an error when I setup ownclound. The data directory lives in /var/www/owncloud/data ( I believe that owncloud.log resides in this folder). I have deployed fail2ban and the issue that I am having is that fail2ban cannot access the data folder because I ran sudo chown -R www-data:www-data /var/www/owncloud/. The only way I access the log file is through the OWNcloud gui settings > general > log. where I can see the failed login attempts by me. I cannot seem to get Fail2ban to read the owncloud log.
I am new to ubuntu and Owncloud can anyone advise how to rectify this issue, owncloud is working fine and I am using ip addresses to restrict access to owncloud. Fail2ban was supposed to make the server secure so that I could open up owncloud to the internet.
Regards
Steve
You should change the permissions of the log file so that it can be read by everyone but written only by the php process. Do a 'chmod 755 /var/log/owncloud/owncloud.log'
By the way. I suggest that you migrate from Owncloud to Nextcloud. It is a full replacement, fully open source, more features and more secure. And it has a fail2ban equivalent brute force protection already build in :-)
I have a Pi that runs hostapd and dhcpd on arch linux to create it's own land with the Pi's (routers) IP being 10.0.0.1. This uses the wlan0 interface and it only serves as a standalone router running a web server.
Once I connect to the Pi, I use 10.0.0.1 to display the web pages, but I want to use a hostname such as firepi. I have tried using dnsmasq, but I haven't been successful. Any help would be greatly appreciated especially if you can give me some detailed examples as I am a novice.
The purpose of this system is that I have created a web app that you can use to ignite fireworks over WiFi at a safe distance. I would just like the convenience of using a hostname instead of the IP address.
I must add that I will more than likely be using an iPhone to connect to the server, should this affect anything.
Not too sure how or why but this is what I did and it is successfully working now, so this is just for future users who may need a similar setup to mine.
First I installed hostapd and dhcpd and made sure they were working. Next I changed '/etc/hostname' to firepi and the '/etc/hosts' and added '10.0.0.1 firepi'. Then I installed dnsmasq, and set the interface to wlan0, and finally added '10.0.0.1 firepi' to '/etc/resolv.conf'.
After a full reboot, I joined the network on my iPhone, navigated to firepi and sure enough, it worked!
Thanks to the other users for their advice and tips.
You can use avahi on Arch as well to resolve your hostname:
sudo pacman -S avahi nss-mdns
Start the avahi daemon:
sudo systemctl enable avahi-daemon.service
sudo systemctl start avahi-daemon.service
Edit /etc/nsswitch.conf
sudo vim /etc/nsswitch.conf
Change the line:
hosts: files myhostname dns
to
hosts: files myhostname mdns_minimal [NOTFOUND=return] dns
Reboot
Note: don't forget to add .local to your hostname.
See also:
http://blog.pixxis.be/post/77285636682/resolve-hostname-with-arch-linux-on-a-raspberry-pi
If you just want to be able to use "firepi" as hostname to connect to it, you can simply add it to your /etc/hosts file using the syntax "IP host".
To make it as easy as possible, run this command as root:
echo "10.0.0.1 firepi" >> /etc/hosts
That'll do the trick.
Can you try avahi ?
sudo apt-get install avahi-daemon and
sudo apt-get install avahi-browse
I've successfully used that on Raspian. Unless you change the hostname using
sudo raspi-config you will access via raspberrypi.local
Note that if you plan to access the RPi from Windows you will need to install Bonjour Service first(if you have iTunes intalled, you might have those, run services.msc and check if the Bonjour Service is started)
Another note: On a friend's iphone I've installed a generic vnc client and had x11vnc running on the RPi and succesfully managed to connect to the RPi (since avahi-daemon was installed)
my php installation has got some problem while installing I am getting
following error:
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
which version of the libcurl should i use for php-5.2.8 installation
thanks in advance
Try With This
None of these will allow you to compile PHP with cURL enabled.
In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl. They generally are bundled in a separate development package.
Per example, to install libcurl in Ubuntu:
sudo apt-get install libcurl4-dev
Then you can just do:
./configure --with-curl # other options...
If you compile cURL manually, you can specify the path to the files without the lib or include suffix. (e.g.: /usr/local if cURL headers are in /usr/local/include/curl).
Hopefully this will help, I had to do some PHP work on one project and the following are the steps I have done and documented for future, hopefully it will be some use to you or some other people.
Setup PHP, MySql on Ubuntu 12.4
1- Install Apache2:
sudo apt-get install apache2
- Open up any web browser and then enter http://localhost/
You should see a folder entitled apache2-default/. Open it and you will see a message saying "It works!" , congrats to you!
2-Install PHP:
sudo apt-get install php5 libapache2-mod-php5
Restart apache2
sudo /etc/init.d/apache2 restart
3- Test PHP
sudo gedit /var/www/testphp.php
This will open up a file called phptest.php.
Copy/Paste this line into the phptest file:
Save and close the file, open you're web browser and type the following into the web address: http://localhost/testphp.php
-you should see a long file opened
4- Install MySQL
sudo apt-get install mysql-server
-In order for other computers on your network to view the server you have created, you must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnffile.
gksudo gedit /etc/mysql/my.cnf
-Change the line
bind-address = 127.0.0.1
And change the 127.0.0.1 to your IP address.
-This is where things may start to get tricky. Begin by typing the following into Terminal:
mysql -u root
-Following that copy/paste this line:
mysql> SET PASSWORD FOR 'root'#'localhost' = PASSWORD('yourpassword');
-(Make sure to change yourpassword to a password of your choice.)
- install a program called phpMyAdmin which is an easy tool to edit your databases.
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
-After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:
gksudo gedit /etc/php5/apache2/php.ini
Now we are going to have to uncomment the following line by taking out the semicolon (;).
Change this line:
;extension=mysql.so
To look like this:
extension=mysql.so
Now just restart Apache and you are all set!
sudo /etc/init.d/apache2 restart
Recently I installed msmtp on my ubuntu 12.04 server that is running the kubuntu desktop. The install of msmtp worked fine, and I can even send mail through the terminal using gmail's smtp server.
My problem is that although sending mail works through the terminal, it still doesn't work with php mail. I have tried using the php mail() function, but I never receive any email.
I have checked the apache error logs (/var/log/apache2/error.log), but they are empty.
Does anyone know how to fix this? If any further information is needed, just say so :)
Also when executing the php script, no errors appear.
The code below echos Mail Sent, but I never recieve an email:
<?
if(mail( 'noreply.njmedia#gmail.com', 'Test mail from localhost', 'Working Fine.'))
{
echo 'Mail sent';
}
else
{
echo 'Error. Please check error log.';
}
?>
For me the cause was incorrect file ownership & permissions on the msmtp config file.
When I tried to run the PHP mail-sending script from the CLI as root, it worked. However switching user to www-data and trying to run the script again (also on CLI) failed with the following messages:
msmtp: /etc/msmtprc: contains secrets and therefore must be owned by you
msmtp: /etc/msmtprc: contains secrets and therefore must have no more than user read/write permissions
Triggering the PHP script by a HTTP request to Apache (or Nginx etc) would have the same results (since msmtp would be invoked by the www-data user).
Assuming your msmtp config file is at /etc/msmtprc, these commands would fix those issues:
chown www-data:www-data /etc/msmtprc
chmod 600 /etc/msmtprc
Before making these changes please consider if these new permissions are appropriate for your circumstances (eg. are there security implications?).
The php mail module calls a system command called sendmail for sending emails. sendmail is implemented by various mail servers, e.g. postfix or exim. As I see, msmtp doesn't provide a sendmail binary. Please check, if you can execute sendmail via command line. If not, try to install postfix.
update:
I see, that msmtp-mta does provide an sendmail binary too. You can try this, if you don't want postfix.