Symfony2 Doctrine debug query
Show doctrine constructed query and parameters
print $query->getSQL();
foreach ($query->getParameters() as $param)
print_r($param);
Archive for : May, 2015
Show doctrine constructed query and parameters
print $query->getSQL();
foreach ($query->getParameters() as $param)
print_r($param);
Mysqldump only tables with certain prefix:
mysqldump DBNAME $(mysql -D DBNAME -Bse "show tables like 'wp_%'") > FILENAME.sql
At the shell prompt, issue the following commands to install SSL for Apache and generate a certificate:
yum install mod_ssl
mkdir /etc/httpd/ssl
openssl req -new -x509 -sha256 -days 365 -nodes -out /etc/httpd/ssl/httpd.pem -keyout /etc/httpd/ssl/httpd.key
NameVirtualHost *:443
SSLEngine On
SSLCertificateFile /etc/httpd/ssl/httpd.pem
SSLCertificateKeyFile /etc/httpd/ssl/httpd.key
ServerAdmin info@mydomain.com
ServerName www.mydomain.com
DocumentRoot /srv/www/mydomain.com/public_html/
ErrorLog /srv/www/mydomain.com/logs/error.log
CustomLog /srv/www/mydomain.com/logs/access.log combined
Restart Apache:
service httpd restart
tar files
tar cvf dest.tar file.txt file2.txt
Tarring folders
tar cvf dest.tar myfolder/
Untar the file or folder
tar xvf dest.tar
Compress using gzip:
tar cvfz dest.tar.gz myfolder/
Uncompress zip file:
tar xvfz dest.tar.gz
tar cvjf dest.tar.bz2 myfolder/
Extract:
tar xvjf dest.tar.bz2
tar xvjf dest.tar.bz2 textfile.txt
The name of your script must begin with K99 to run at the right time.
The name of your script must begin with K99 to run at the right time.
Watch the entire article here
This command will dump a MySQL database, compress it and save it to a file (replace userName and databaseName with your data):
mysqldump -u userName -p databaseName | gzip > databaseName.sql.gz
The import command takes a compressed MySQL dump, decompresses it and adds it to the database (replace userName and databaseName with your data):
gzip -dc < databaseName.sql.gz | mysql -u userName -p databaseName