Monday, September 2, 2019

Orangehrm / Symphony Error - Parse error: syntax error, unexpected ''mo' (T_ENCAPSED_AND_WHITESPACE), expecting ') symfony/cache/orangehrm/prod/config/config_autoload.yml.php

Solution :
1. Check your disk usage, is it filled completely? Empty some space, restart Apache and check again.
2. If above solution is not applicable,
Remove the file symfony/cache/orangehrm/prod/config/config_autoload.yml.php. Now open the page in browser again. It will create new config_autoload.yml.php. Error should be gone now.
Make sure the directory has write permissions to create the file.

Java - Run jar file on non default port

If you are running a jar file using command
java -jar filename.jar
Suppose it runs on port 8080. But you have already another service like Tomcat or Jenkins running on port 8080 so your jar file can not run on port 8080. Here is an option '-Dserver.port', Using the option you can choose the port on which your jar file should be run.
java -Dserver.port=8999 -jar filename.jar
Now your service will run on port 8999.

Tuesday, August 20, 2019

mysqldump - sql dump with triggers, procedures, functions

--routines, -R

           Include stored routines (procedures and functions) for the dumped databases in the output. This option requires the SELECT privilege
           for the mysql.proc table.

           The output generated by using --routines contains CREATE PROCEDURE and CREATE FUNCTION statements to create the routines. However,
           these statements do not include attributes such as the routine creation and modification timestamps, so when the routines are reloaded,
           they are created with timestamps equal to the reload time.

           If you require routines to be created with their original timestamp attributes, do not use --routines. Instead, dump and reload the
           contents of the mysql.proc table directly, using a MySQL account that has appropriate privileges for the mysql database.

Example :
mysqldump --routines -u username -p database_name > database_name.sql