Debugging card generator

You hit this file from the front end
Listing ID is: 5850 - which is there(!), not empty and numerical
Setting security _GET whitelist: ('id','lang','header','size','sticker','extended','password','feature')
No lang is set so defaulting to _en_GB
Size is set to:
Feature is set to:
Eco-sold is set to:

Setting some basic variables

$siteurlhttps://www.sapphireproperties.co.uk
$basepath/var/www/vhosts/sapphireproperties.co.uk/httpdocs
$template_name (as constructed from db set name, plus any other parameters)sapphire
Because we have a lang set, I have reconstructed the siteurl (for the QR mostly) to: https://www.sapphireproperties.co.uk
Query to get class name succeeded - It's: For sale
Query to get property details succeeded

Starting descriptions

Let's have a closer look at the EN description BEFORE processing:

<p>Residencial Capricho is a stunning new development of only 6 villas of either 3 bedroom or 4 bedroom models, located centrally in the heart of the Spanish town of San Pedro del Pinatar, and is within walking distance of numerous shops, bars, cafes and restaurants and the tranquillity of the Mar Menor.</p>

<p>The properties comprise of a gated video security entrance offering both pedestrian and vehicle access, leading to a very spacious open plan garden with ample room for a private swimming pool and still enough space to enjoy the outdoor life style offered by the region.</p>

<p>On the ground floor there is a very good sized open planned living/dinning room with a completely fully fitted kitchen including all White goods, the living area also double patio doors leading out to the terrace allowing the room to enjoy and benefit from plenty of natural light, there is also a double bedroom complete with fitted wardrobes and access to a private patio, family bathroom and separate laundry room laundry room and access to the garage<br />
The first floor comprises three double bedrooms all of which have fully fitted wardrobes and a private terrace from each bedroom as well as a further guest bathroom.&nbsp; The master bedroom has an en-suite bathroom and a large walk-in wardrobe<br />
The house is pre-installed for air-conditioning, the living room and all bedrooms have television and telephone/internet points.</p>

<p>Located 1 hour from Alicante airport and only 30 minutes from the Region de Murcia airport at Corvera, the property is ideally situated.</p>

...and AFTER processing:

Residencial Capricho is a stunning new development of only 6 villas of either 3 bedroom or 4 bedroom models, located centrally in the heart of the Spanish town of San Pedro del Pinatar, and is within walking distance of numerous shops, bars, cafes and restaurants and the tranquillity of the Mar Menor. The properties comprise of a gated video security entrance offering both pedestrian and vehicle access, leading to a very spacious open plan garden with ample room for a private swimming pool and still enough space to enjoy the outdoor life style offered by the region. On the ground floor there is a very good sized open planned living/dinning room with a completely fully fitted kitchen including all White goods, the living area also double patio doors leading out to the terrace allowing the room to enjoy and benefit from plenty of natural light, there is also a double bedroom complete with fitted wardrobes and access to a private patio, family bathroom and separate laundry room laundry room and access to the garage The first floor comprises three double bedrooms all of which have fully fitted wardrobes and a private terrace from each bedroom as well as a further guest bathroom. The master bedroom has an en-suite bathroom and a large walk-in wardrobe The house is pre-installed for air-conditioning, the living room and all bedrooms have television and telephone/internet points. Located 1 hour from Alicante airport and only 30 minutes from the Region de Murcia airport at Corvera, the property is ideally situated.
No ES desc detected
No FR desc detected
No NL desc detected
No RU desc detected
No SV desc detected

Checking for two types of special English print desc (print, or short)..., that would trump the desc above...

No special print_desc was found
No special print_desc_es description was found

Checking prices

We have the current price (389000) - Checking for old prices...

The highest retrieved by the $listing->get_highestPrice() function is: 389000


Checking features

We have features so let's process them:

Exploded and sorted to

Array ( [0] => Close to amenities [1] => Fitted wardrobes [2] => Front balcony [3] => In town centre [4] => Pre-Installation for Air-con [5] => Security system [6] => Terrace [7] => Walking distance to bars [8] => Walking distance to beach [9] => Walking distance to restaurants [10] => Walking distance to shops [11] => White goods )

That's 12 features

Here's a simple comma separated list in case you need it for the template... ... Close to amenities, Fitted wardrobes, Front balcony, In town centre, Pre-Installation for Air-con, Security system, Terrace, Walking distance to bars, Walking distance to beach, Walking distance to restaurants, Walking distance to shops, White goods

... and fancier, split into three equal columns:

Array ( [0] => Close to amenities [1] => Fitted wardrobes [2] => Front balcony [3] => In town centre )
........................
Array ( [0] => Pre-Installation for Air-con [1] => Security system [2] => Terrace [3] => Walking distance to bars )
........................
Array ( [0] => Walking distance to beach [1] => Walking distance to restaurants [2] => Walking distance to shops [3] => White goods )

So col 1 looped is:

  • Close to amenities
  • Fitted wardrobes
  • Front balcony
  • In town centre

  • So col 2 looped is:

  • Pre-Installation for Air-con
  • Security system
  • Terrace
  • Walking distance to bars

  • So col 3 looped is:

  • Walking distance to beach
  • Walking distance to restaurants
  • Walking distance to shops
  • White goods


  • Checking images

    Running query to see if this listing has a pdf_images_order field

    ...which it does NOT, so we'll just use SQL to get the first six images like normal

    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165611_2.jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165615_res_capricho_san_pedro_del_pinatar_(2).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(4).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165624_res_capricho_san_pedro_del_pinatar_(13).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165618_res_capricho_san_pedro_del_pinatar_(3).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(1).jpg

    • NOTE: images.upload.inc.php is set to use Amazon S3 in configuration
    • S3 class successfully included

    • Let's download: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165611_2.jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165611_2.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165611_2.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165611_2.jpg,wb
    • fwrite the file with: Resource id #24, $imagecontent (Massive long string! lol
    • Let's download: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165615_res_capricho_san_pedro_del_pinatar_(2).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165615_res_capricho_san_pedro_del_pinatar_(2).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165615_res_capricho_san_pedro_del_pinatar_(2).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165615_res_capricho_san_pedro_del_pinatar_(2).jpg,wb
    • fwrite the file with: Resource id #26, $imagecontent (Massive long string! lol
    • Let's download: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(4).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(4).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(4).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(4).jpg,wb
    • fwrite the file with: Resource id #28, $imagecontent (Massive long string! lol
    • Let's download: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165624_res_capricho_san_pedro_del_pinatar_(13).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165624_res_capricho_san_pedro_del_pinatar_(13).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165624_res_capricho_san_pedro_del_pinatar_(13).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165624_res_capricho_san_pedro_del_pinatar_(13).jpg,wb
    • fwrite the file with: Resource id #30, $imagecontent (Massive long string! lol
    • Let's download: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165618_res_capricho_san_pedro_del_pinatar_(3).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165618_res_capricho_san_pedro_del_pinatar_(3).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165618_res_capricho_san_pedro_del_pinatar_(3).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165618_res_capricho_san_pedro_del_pinatar_(3).jpg,wb
    • fwrite the file with: Resource id #32, $imagecontent (Massive long string! lol
    • Let's download: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(1).jpg - Local check says we do NOT have that file
    • allow_url_fopen is available so using file_get_contents to get https://s3.amazonaws.com/clients.sapphire.listingphotos/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(1).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(1).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/5850_stunning_private_villas_in_a_beautiful_spanish_town_with_options_or_3_or_4_bedrooms_130220165617_res_capricho_san_pedro_del_pinatar_(1).jpg,wb
    • fwrite the file with: Resource id #34, $imagecontent (Massive long string! lol

    Grabbing the template at: templates/tpl.window_card_sapphire.php
    Template included OK

    Checking cache for filename: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/pdf/pdf_cache/SAPP-1739.pdf

    File does not exist in cache

    Checking SESSION for UserID - apparently not set?!


    You did not arrive from admin so the final header would be: /pdf/pdf_cache/SAPP-1739.pdf
    Logging message to general log: "Printed window card for Ref: SAPP-1739 (ID 5850) and sending the $userID: "
    Finished in 4.545 seconds
    Exiting due to debug true (ie not returning the pdf!)