Cakephp 3: issue with DomPdf - php

I am using CakePHP 3.2 and dompdf library. It works well on local system but not on production. My code is the same on both portals. but it's working well with local but not on production.
In my local system, I got this pdf file here is a sample:
localhost pdf file
production pdf file
localhost pdf file got perfectly without font collapse. but after put my code on production it collapses fonts, tables etc.
Please help me. Sorry for my English.

Related

Updating composer library after files deployed to shared production server

I created a website using laravel.
I uploaded the site to my shared server, and site was running fine.
After that I had to add a library called Intervention. In local, I used this command and everything is working fine.
php composer.phar require intervention/image
I made changes in files and everything is working fine in local.
Now, I need to upload the updated files. So rather than deleting whole online folder, and re-uploading, I just want to upload changed files (I know the controller, view files that were changed).
But, as it is a shared server there is no way or place to execute composer update command or get that one library (thus now I am getting intervention Image class not found error).
So, what would be ideal thing to do in this case?
The easiest one maybe delete the whole folder and upload it again but the files are almost 500mb so do not want that.
Any suggestions to handle this situation? (updating composer libraries after deployment)
Not really a php or laravel question, but if you're using ftp to upload there's usually an option to only upload changed files.
For example in filezilla you can set the over-ride option here:

MPDF php downloader

I have used mpdf for pdf creation. Now, I want to download the generated pdf file to my local machine.
I used below code for this.
$mpdf->Output('dummy.pdf', 'D');
But, its not working for me. Please help me

Deploy PHP website on Heroku

I have got heroku up and running just now. Not sure how to use the PostgreSQL and how to deploy my website though. It is a few php files. But they php files don't open they are just blank so I guess it is never leaving the index.php
Do i need to include or list all my php files in the default index.php file?
Also with the database i created one and it is in the dashboard listed under apps so now can I connect to it normally or is there more stuff to configure?
Would love some video tutorials showing how to deploy small database driven websites written in PHP to heroku.
Any help is great! Cheers guys :)
If you want to use postgresql database with your website on Heroku, you need this add-on. To set it up read this https://devcenter.heroku.com/articles/heroku-postgresql post.
As for PHP, you seem new to it. To include a file you need to use either require or include.
You can look at this video, for basic deployment of PHP on Heroku.

using netbeans 7.2.1 doing a diff between local and remote

I have a netbeans php project that is local on my PC. I have it setup to save on the remote server "on save". This all works well. I now have a second developer in the mix who is doing the same thing to the same server .
Is there a tool/plugin or even standalone tool that that can do a recusive diff or project diff between my PC and the remote server?
Thanks
The "Copy files from Source Folder to another location"-feature is not meant to be used for more than one developer. It's good to use that feature for a local preview, for example when copying the files from the source folder (on save) to the webroot on the same PC or a local test server. By no means should the same preview folder be used by different developers. You still could use an external tool to have a diff done, but be aware that any files in the test folder are overwritten by Netbeans and it's pretty hard to find out which file was edited last by which developer.
Use a versioning system if you need to work on the same code by more than one developer.

sync project in netbeans both ways via ftp

I have a question about netbeans.
I made a new netbeans php project, configured it with the existing ftp settings, and it started downloading all the files to my local hd, so far everything is working correctly.
but because I'm using a php framework, which will automatically generate some files for me makes a file, it won't be synced to my local hd.
So my problem is as long as I make new files in netbeans it will work correctly, but when files are generated outside netbeans it won't.
How can I configure netbeans so it will sync both ways via ftp?
You can't as far as I know. You have to manually right click on the project/folder you want to update and click Download or Upload. Note that this will overwrite any changes on the receiving side (e.g. downloading files will overwrite local changes and uploading files will overwrite remote file changes).
Alternatively, you can have the Upload Files On Save or On Run options enabled, but this will only work for local->remote synchronization scenario. You can access this option by right clicking your project, choosing Properties and following the screenshot below.

Categories