Sometimes you need to move your website to a temporary address. For me, this is usually for development. The best option is to put in a hosts rule to the computers that need to access the site under the domain, but this is not always an option for everyone. There are numerous posts about addingRead more about Temporary WordPress URL[…]
If you ever have issues with weird characters appearing in PDF documents it is most likely a character encoding issue. This often occurs when someone does a copy and paste from Microsoft Word, or similar. Things like quotes get converted into characters that are not properly displayed unless character encoding is kept consistent all theRead more about Dompdf weird characters[…]
Over the years I have been involved in fixing numerous websites that are performing slow. The PHP execution time on some were insane, into the many minutes. Nearly every time it has been down to the getimagesize() function. This function is terribly slow and should only be used if absolutely necessary. One thing people seemRead more about Don’t use getimagesize() – PHP[…]
I have written a number of posts about a development framework called PhoneGap ( also known as Cordova. ) so I thought I should give a bit of information about what it is. Firstly in regards to PhoneGap vs Cordova, they are basically the same. Cordova is an open source Apache project. PhoneGap is the downstreamRead more about PhoneGap/Cordova[…]
I was having an issue with phonegap where an application on a specific phone would randomly crash after selecting a photo for uploading. I installed ACRA ( http://acra.ch/ ) so the phone can send a dump when it crashes. This turned out to be quite useful. The dump contained this part of interest The phoneRead more about Phonegap/Cordova out of memory when taking photos[…]
A recent upgrade to the latest version of Phonegap seems to have introduced an intermittent upload error issue. Randomly it will return “error code 3”. This is from what I understand a connection issue. In the code I am outputting the progress of the upload. The error randomly occurs at different stages of the upload.Read more about Phonegap/Cordova FileTransfer – Error 3 – Android[…]
A client has software which does not honour commas within quotes. So all commas within quotes need to be removed before the CSV export is sent to the client. This function would be called for each line in the csv. $csv_data is the CSV to be parsed $replace_char is what to replace the comma with.Read more about Remove commas from within quotes in a CSV[…]
Code Snippet: Want to see all your PHP settings? Place the following code in an empty .php file on your server Be sure to not leave this on your server once you are done with it as it could show potential security holes.