# Perfex - Powerful Open Source CRM

#### Documentation Info

- Last Updated: 2024-11-05
- Created by: MSTdev
- Version 3.2.1
- Website: www.perfexcrm.com
- Full Documentation
- Support Desk

#### System Requirements

- PHP >= 8.1+
- MySQL 5.1+
- mod_rewrite Apache
- MySQLi PHP Extension
- PDO PHP Extension
- cURL PHP Extension
- OpenSSL PHP Extension
- MBString PHP Extension
- iconv PHP Extension
- IMAP PHP Extension
- GD PHP Extension
- Zip PHP Extension
- allow_url_fopen enabled

In most hosting accounts these extensions are enabled by default. But you should consult with your hosting provider.

### Installation

#### Check this Quick Installation & Getting Started Tutorial

##### Configure database connection

Login to cPanel and create a brand new database that will be used for Perfex CRM installation.

You can check this tutorial how to setup MySQL database in cPanel if you are not familiar with how to configure database.

1. Login to cPanel by accessing www.yourdomain.com/cpanel and navigate go MySQL Databases, note that this step may vary and in some hosting providers can be different.
2. Create database.
3. Create user and set up user password. (write in a note username and password because needs to be re-used later)
4. Add the user to the database by selecting the database and the username.
5. Make sure you have checked All privileges when adding the user to the database.

##### Upload Files & Install

Upload the files to server folder where Perfex CRM will be installed.

Assume that you uploaded the files to “crm” folder, navigate to eq. http://yourdomain.com/crm/install – Keep in mind that you need to adjust the URL based on where you uploaded the files. If you are installing on subdomain named eq crm you need to access the url like http://crm.yourdomain.com/install.

You will need to pass the requirements to install Perfex CRM.

If all server requirements passed click Go to Files/Folders Permissions otherwise consult with your hosting provider to fix/enable them.

If all permissions are passed click Setup Database otherwise you need to set 755 permissions for folders and 644 for files.

Enter your database credentials you configured in step 1 (configure database) - Avoid use of single(‘) and double(“) quotes in your password
Click Check Database and if the database connection is successfully you will be passed to the latest step otherwise please re-check your credentials and hostname. (usually hostname is localhost but you should check with your hosting provider or cPanel)

Configure admin credentials and options

- Base URL - Read More
- Email - Admin Login
- Password - Avoid use of single(‘) and double(“) quotes in your password
- Set system timezone - Not recommended changing your timezone after you start using Perfex CRM.
- Click Install, if the installation is successful you will see the message Installation Successful.
- After installation is succesfull, delete the installation folder.

If you need help installing dont hesitate to open support ticket

#### Troubleshooting

- 404 Not Found after installation
- Installing on IIS
- NGINX configuration
- AWS Email SMTP Setup
- Can't login to admin area

### Setup

##### Cron Job - Read more how to configure cron job by clicking on the following link: Setup cPanel CRON

You will need to setup the cron job controller for Perfex

Cron job will be used for sending survey emails, auto update invoice statuse eq. if the invoice is overdue etc.

How to setup Cron Job?

Login to your cPanel and navigate to Cron jobs

Add the following settings :

    wget -q -O- wget -q -O- http://yourdomain.com/crm/cron/index

Change the url according to your base url where Perfex CRM is located. You can check your cron url in Setup->Settings->Cron Job

Example if its on root domain you need to type only http://yourdomain.com/cron/index
If its on subfolder /crm you will need to type http://yourdomain.com/crm/cron/index

Cron is required to be setup for Perfex CRM

#### Common CRON Job setup issues

My server does not support wget command?

If your server does not support wget command you try one of the following commands:

    php /home/username/public_html/installation_folder/index.php cron/index >> /dev/null

    php /home/username/public_html/installation_folder/index.php cron/index

If that doesn’t work, it probably means you don’t have the package php5-cli installed. On debian / ubuntu you can install this package as follows:

    sudo apt-get install php5-cli

If you are not able to install packages, you can specify your path to php try the following command:

    /usr/local/bin/php -f /home/username/public_html/installation_folder/index.php cron index

Replace username and installation_folder to fit for your path. If none of commands are not working you can use some free cron job service like https://www.easycron.com. Mostly the free cron job services have limit to execute each 10 minutes but it will work good too with Perfex CRM.

##### Date Format

Setup your desired date format, will be using all over the application. This option is located in Setup->Settings-> Localization

##### General Email

Navigate to Setup -> Settings -> Email and setup your SMTP email, this will be your base email. You need to setup previously email account from your cPanel account.

##### Email Templates

Check all the email templates, setup signature also in Setup -> Settings -> Email this signature will be using on all email representing your company

### FAQ

##### 404 Not Found After Installation

If you are getting 404 not found after you install Perfex CRM this means that you need to adjust the main .htaccess for Perfex CRM.

First make sure that the .htaccess file exists in the main folder where you installed Perfex CRM. If you are using any OS make sure you have enabled hidden files on your MAC.

Make sure that you have mod_rewrite enabled in your server.

NOTE: Only apply the following suggestions if you are getting 404 error not found, the default Perfex CRM .htaccess file should work good on most servers.

#### Installation on subfolder.

This .htaccess may apply if you installed Perfex CRM next to WordPress installation and you are auto redirected to WordPress default 404 Page.

    RewriteEngine on
    RewriteBase /foldername/
    RewriteCond $1 !^(index\.php|resources|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
    AddDefaultCharset utf-8

#### Installation on subdomain

    RewriteEngine on
    RewriteBase /
    RewriteCond $1 !^(index\.php|resources|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
    AddDefaultCharset utf-8

#### Getting a error 500 and you are using cPanel

    RewriteEngine on
    RewriteCond $1 !^(index\.php|resources|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ subfolder/index.php?/$1 [L,QSA]
    AddDefaultCharset utf-8

#### 1&1 Installation

For 1&1 hosting use the following .htaccess

    RewriteEngine on
    RewriteBase /
    RewriteCond $1 !^(index\.php|resources|robots\.txt|static) [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/?$1 [L,QSA]

#### Windows Installation

Check the following article for windows web.config file.

#### NGINX Installation

Check the following article for NGINX config.

Other solutions:

Make sure that you have setup AllowOverride to All in your config
This can happen if you dont have this option set to All.
You can read more here and here

If you still have problems please open support ticket and we will be glad to assist you as long your server passes the requirements.

##### Cant login to admin area

Perfex CRM admin area is separated from the customers area. Often happen Perfex CRM buyers to get confused and trying to login as admin in the customers area.
Admins needs to login at yourdomain.com/crm/admin
Customers login at yourdomain.com/crm/clients
Hope this will help you.

### Update

#### Steps to perform before upgrading:

1. Backup files and database (including language files if you are not using custom_lang.php file to overwrite translation text)
2. Check the changelog if there are upgrade instructions listed.

1. Download files from Envato.
2. Overwrite the following folders (copy folders from new version update files to your current files):
   1. application
   2. assets
   3. system
   4. modules
3. Overwrite the pipe.php file (copy from new version update files to your current files).

#### Troubleshooting

- To check what version you are using visit click here.
- If any css/js errors outputed on developers console or tables are not loading make sure you cleared your browser cache.
- If you are using your own themes/view files eq my_home.php make sure to re-check them in case you are getting blank pages bacause may happen some function changes and an error occur in your view file. Try switching to the original files to check if everything will work.
- Getting 500 error - open support ticket and we will be happy to assist you.