Ultimate Loan Manager is built with Laravel Framework
You’ll need to create a new database along with a user to access it. Most hosting companies provide an interface to handle this or you can run the SQL statements below.
CREATE DATABASE ultimateloanmanager;
CREATE USER 'ultimateloanmanager' IDENTIFIED BY 'ultimateloanmanager@@';
GRANT ALL PRIVILEGES ON ultimateloanmanager.* to ultimateloanmanager@'%' identified by 'ultimateloanmanager@@';
FLUSH PRIVILEGES;
Download the files from Envato. These files contain all the required dependencies including vendor folder. In the steps below we will be using a sample subdomain e.g https://ulm.webstudio.co.zw and assume that you are using cpanel.
You can use this option if you have ssh access to run artisan commands.
sudo chown -R ubuntu:www-data /path/to/ultimateloanmanager
cd /path/to/ultimateloanmanager
sudo find -type f -exec chmod 664 {} \;
sudo find -type d -exec chmod 775 {} \;
sudo chgrp -R www-data bootstrap/cache storage
sudo chmod -R ug+rwx bootstrap/cache storage
php artisan app:install
to start the installationUltimate Loan Manager supports SMTP, Mailgun, Postmark, SparkPost, Amazon SES, and sendmail. Edit .env and put your mail configurations there.
You only need to add the following Cron entry to your server.
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
This Cron will call the Ultimate Loan Manager command scheduler every minute. When the schedule:run command is executed, Laravel will evaluate your scheduled tasks and runs the tasks that are due.
Queues allow you to defer the processing of a time consuming task, such as sending an email, until a later time. Deferring these time consuming tasks drastically speeds up web requests to your application. We have used queues for a number of tasks, however its easier to set queues on a VPS rather than shared hosting. Here is how to set queues on a vps:
Supervisor is a process monitor for the Linux operating system, and will automatically restart your queue:work process if it fails. To install Supervisor on Ubuntu, you may use the following command:
sudo apt-get install supervisor
Supervisor configuration files are typically stored in the /etc/supervisor/conf.d directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let's create a ultimateloanmanager-worker.conf file that starts and monitors a queue:work process:
[program:ultimateloanmanager-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/ultimateloanmanager/artisan queue:work --queue=default,high,normal,low --tries=3
autostart=true
autorestart=true
user=ubuntu
numprocs=1
redirect_stderr=true
stdout_logfile=/path/to/ultimateloanmanager/worker.log
Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start ultimateloanmanager-worker:*
The recommended way to run job workers with Laravel is to use Supervisor but on shared hosting you do not have access to it so we recommend the method below via cronjobs:
* * * * * cd /path-to-your-project && php artisan queue:work --tries=3 --delay=60 --timeout=90 --stop-when-empty >> /dev/null 2>&1
The important part of the cronjob command is --stop-when-empty. It tells the master queue worker to quit when the queue is empty. This ensures you do not have long running processes which may require service restart (like we do for the regular queue processes). After all you are running these queue workers with a cronjob and you need the process to end. Otherwise you will spawn new master process every minute. With --stop-when-empty the workers will quit when all jobs are processed and the queue is empty.
To make them accessible from the web, you should create a symbolic link from public/storage to storage/app/public.
To create the symbolic link, you may use the storage:link Artisan command:
php artisan storage:link
If you don't have access to run that command then you can create a one time cron entry which you will delete as soon as the symlink has been created.
* * * * * cd /path-to-your-project && php artisan storage:link >/dev/null 2>&1
Or manually create the symlink like this. (Change the path to the public directory.)
* * * * * cd /path-to-your-project-public-folder && ln -s ../storage/app/public storage >/dev/null 2>&1
Make sure the cronjob runs every minute so you don't have to wait for exact time and then delate it once the symlink is created.
Ultimate Loan Manager includes a public/.htaccess file that is used to provide URLs without the index.php front controller in the path. Before serving Ultimate Loan Manager with Apache, be sure to enable the mod_rewrite module so the .htaccess file will be honored by the server. If the .htaccess file that ships with Ultimate Loan Manager does not work with your Apache installation, try this alternative:
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
If you are using Nginx, the following directive in your site configuration will direct all requests to the index.php front controller:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
file_put_contents(...): failed to open stream: Permission denied
run chmod -R 777 storage
then chmod -R 755 storage
or used a web based interface to update storage folder permissions.