This article is focusing on showing how to export a single table from PostgreSQL database server. Exporting PostgreSQL table in this context of article means copying records exist in that table. The destination of the record copying process is a csv file. The process of copying those records is done using a command executed in a command line.
Off course there are several things need to be done as a prerequisite or preparation before the command for exporting records in a single table from PostgreSQL Database server can be carried out. Below are those steps :
Continue reading “Export PostgreSQL Table to csv via Command Line”
This is an article based on the example of writing a web-based application powered by Laravel Framework. This is article presenting an example of submitting a form through AJAX request to perform a validation which is done by Laravel framework so that it can be checked before whether or not the data or information submitted is true or false. The data or information will be weighed whether it is true or false by using the judgement of Laravel framework. So, an article written with the title of ‘Laravel AJAX Validation Request Example’ can be stated as the following scenario :
A blade view file template is made to display the input form which is going to be used by user. Every input will be validated before it can actually be saved. But in the context of this article, the process will be stop only when the data or information has already been declared as true by Laravel framework validation. The process of submitting the data or information will be done or executed from an AJAX Request.
Continue reading “Laravel AJAX Validation Request Example”
In this article, the main point of the discussion is about solving the problem occurred. Actually the problem is concerning on the failure process of dumping a MySQL database file. There is a failure which is caused by the permission problem on creating the temporary file as the destination target of the file. Based on the log file generated named ‘mysqld.log located in /var/log, it can be clearly well-informed that the problem lies on the permission of the target of the dump file for creating or writing a temporary file fo dumping the database :
[root@hostname ~]# tail -f /var/log/mysqld.log
/usr/libexec/mysqld: Can't create/write to file '/tmp/ib8zunMA' (Errcode: 13)
170510 14:58:11 InnoDB: Error: unable to create temporary file; errno: 13
170510 14:58:11 [ERROR] Plugin 'InnoDB' init function returned error.
170510 14:58:11 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170510 14:58:11 [ERROR] Unknown/unsupported storage engine: InnoDB
170510 14:58:11 [ERROR] Aborting
170510 14:58:11 [Note] /usr/libexec/mysqld: Shutdown complete
170510 14:58:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
The location of the dump file is actually depends on the parameter given when the dump process is executed. But on the above context, it is believed that before assembling the real database dump file, a temporary file is being generated for the sake of setting up the real MySQL database dump file. The file is located in /tmp which is normally u use to generate a temporary file. But based on the above output, generating a temporary file for dumping database is forbidden.
To solve the problem, the only logic way is by changing the default temporary folder used to generate temporary file in the database dumping process. To change that folder location, in this context, in order to solve the problem, just try to edit the file which is used as a MySQL Database Configuration file. It is a file named my.cnf normally located in /etc. Below is the line which is added to specify temporary directory to generate temporary backup database as follows :
Continue reading “Failed to dump MySQL Database /tmp file permission denied”
This article is an article where an error as stated in the title of this article happened. The title which is also describing the error message is ‘Undefined variable :’. Depends on the circumstance and the condition regarding the script executed, the error message can be attached with various variable name. So, in the title of this article, the error which is described as an error message is specified as ‘Undefined variable : variable_name’.
The variable_name can be anything depend on the error which is pointed out after executing script which is becoming the cause of the error.
Continue reading “Laravel Error Message : Undefined variable: variable_name”
This article will discuss on the usage of several feature owned in Laravel development. The feature is focus on using return view vs return redirect in laravel framework on developing web-based application. Somehow, based on several experiment or trial and error which it might be a true conclusion of maybe not below is how those two features on directing a process into a rendered page defined, below is the scenario on testing those two features :
There is a page for inserting a property containing data of information about server. This is made by using a CRUD (Create Update Delete)-type web-based application powering on Laravel framework. The minute on the process of inserting all the data or information required for a Server has successfully executed, it is obvious that the process need to be redirected to the list page of Server where it will be displayed in the top of the list the information about the last Server which has saved early.
Continue reading “return view vs return redirect in Laravel”