Certificate Generation System is a portable application used to Generate Certificate for single candidate providing his/her details along with image,
As well as for Batch/Number of candidates by simply providing the CSV format file (containing details of every candidate) along with candidate images
CSV- Character Separated File.
A CSV file is a text file that has a specific format which allows for the saving of textual information/data in an organized fashion.
CSV is a simple file format used to store tabular data, such as a spreadsheet or database. Files in the CSV format can be imported to and exported from programs that store data in tables, such as Microsoft Excel or OpenOffice Calc.
First clone a repository in the directory.
cd /var/www/html git clone https://github.com/amisha2016/Certificate cd Certificate sudo chmod -R 777 /var/www/html/Certificate/ git checkout odtphp sudo ./install.sh
SH files are self-extracting archives. The SH file archive contains selected files and a shell script along with instructions on how to extract its contents. This file format is commonly used for Unix shell files, created by the Unix shar utility program. They are typically used for scripts that run on the Unix command prompt. SH files can only be used on computers that are run on the Unix operating system, although systems similar to Unix may also use this file format.
Looking for how to open sh files? Checkout http://www.openthefile.net/extension/sh
Then Go to http://localhost/Certificate/CGS/
Then I was getting an error of “Abort pclzip.lib.php : Missing zlib extensions” Then I got to know about the function gzopen().
gzopen — Open gz-file. Opens a gzip (.gz) file for reading or writing.
Detail of GZ file
GZ is a type of compression format which is very popular on Unix and Linux based computers. GZ stands for GNU ZIP.
Unlike ZIP, GZip does not support archiving. This means that it is not possible to put more than one file in a GZ file. This is circumvented by first using TAR to archive (not compress) multiple files into one, and then compressing it with GZip afterwards. This results in a file with the extension .tar.gz or .tgz.
To check whether the function gzopen is available in python or not write command:-
php -r 'var_dump(function_exists("gzopen"));'
bool(true) .It means that the zlib extension is available.
php -r 'var_dump(function_exists("gzopen64"));'
Then, I opened the file pclzip.lib.php
cd /var/www/html/Certificate/library/zip/pclzip vim pclzip.lib.php
cd /var/log/apache2 tail error.log
Then, I installed gd
$ sudo apt-get install php5-gd$ sudo service apache2 restart
Now, going back to the page as shown below for trying it for the other option i.e. “Upload CSV file”.
THe page viwed after this is shown below. Again Stucked 😦 .Take lot of my time to resolve it.
Then I edited the “csv.php” located at “/var/www/html/Certificate/CGS”. Replace the line 132 i.e.
$command = ‘unoconv -f pdf –output /var/www/html/Certificate/CGS/pdf/ ‘ . $source_file;
$command = ‘unoconv -f pdf –output /var/www/html/Certificate/CGS/pdf/’.$id.’.pdf ‘ . $source_file;
It means there was logical error i.e. ‘.$id.’ was missing in it and save the file. Now try again. Now the server will able to find the URL “../id.pdf” and after this it works smoothly.
The final problem which I have not described yet is that in the option “Fill candidate details manually” the option “Download pdf” is not running. Not yet get the solution but tring to resolve it will update soon. 🙂Bye Bye. Have A Nice Day.