Debugging card generator

You hit this file from the front end
Listing ID is: 844 - 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>This is a superior country property which oozes style and luxury living. It presents any potential buyer with a number of opportunities to enjoy country living as well as potential for a number of business options based on a plot size of in excess of 13000 square meters. The current owners have invested extensively in order to create the house it is today, which continues to be maintained to a very high standard.</p>

<p>As you enter the grounds of this property through the electric gates the visual impact of the property and grounds are breathtaking.&nbsp;The driveway is focused around a central garden, and offers space for a number of vehicles, although this property also offers a car port, giving a more shaded option for two vehicles. There are wonderful landscaped area&acute;s which have an array of mature shrubs and trees, plus shaded areas for enjoying alfresco dining, as well as lovely sunbathing areas surrounding the stunning private and spacious pool.</p>

<p>There is a large superb covered terrace with plenty of relaxation space. From this terrace you enter the main house and off the hall there is a super lounge which is tastefully furnished and includes a lovely wood burner. There is a completely separate dining room, with some lovely pieces of free standing furniture. There is a separate fully fitted kitchen with plenty of storage and work surface areas, all fitted to a high standard and&nbsp;finished&nbsp;in a modern design. There is also a most useful utility room connected to the kitchen and with a door giving access to the outside of the property.&nbsp;&nbsp;Also off this hall are two spacious double bedrooms with free standing wardrobes, one of which has a tastefully tiled en-suite shower room. There is also a full family bathroom off the hallway.&nbsp;This property continues to Wow !! as you reach the Master Suite. There is a spacious office, large enough to accommodate 2 desks and a number of storage options; you then enter into a beautifully fitted dressing area with custom made fitted wardrobes, providing a large amount of storage. The master bedroom is wonderful with so much space and benefits from full width sliding glass doors offering superb views of the pool and in the distance views of the surrounding countryside. The master suite is completed with a larger than average en-suite, which includes a full bath, walk in shower, WC and wash area, all tiled with top quality products.</p>

<p>Once you are outside this property the land space does not disappoint, offering an orchard with many other planted shrubs and trees. There is a large workshop with all electricity connected, storage and up and over door to the front. Adjacent to the workshop is a large brick building fully equipped with water and electric being used as storage by the current owners, however the building is spacious enough to use as additional self contained accommodation.</p>

<p>This property is only an 8 minute drive from Crevillente and 12 minutes from Elche. &nbsp;Alicante Airport is approximately 20 minutes by car.&nbsp;</p>

<p>This property is a stunning example and early viewing is highly recommended.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>

...and AFTER processing:

This is a superior country property which oozes style and luxury living. It presents any potential buyer with a number of opportunities to enjoy country living as well as potential for a number of business options based on a plot size of in excess of 13000 square meters. The current owners have invested extensively in order to create the house it is today, which continues to be maintained to a very high standard. As you enter the grounds of this property through the electric gates the visual impact of the property and grounds are breathtaking. The driveway is focused around a central garden, and offers space for a number of vehicles, although this property also offers a car port, giving a more shaded option for two vehicles. There are wonderful landscaped area&acute;s which have an array of mature shrubs and trees, plus shaded areas for enjoying alfresco dining, as well as lovely sunbathing areas surrounding the stunning private and spacious pool. There is a large superb covered terrace with plenty of relaxation space. From this terrace you enter the main house and off the hall there is a super lounge which is tastefully furnished and includes a lovely wood burner. There is a completely separate dining room, with some lovely pieces of free standing furniture. There is a separate fully fitted kitchen with plenty of storage and work surface areas, all fitted to a high standard and finished in a modern design. There is also a most useful utility room connected to the kitchen and with a door giving access to the outside of the property. Also off this hall are two spacious double bedrooms with free standing wardrobes, one of which has a tastefully tiled en-suite shower room. There is also a full family bathroom off the hallway. This property continues to Wow !! as you reach the Master Suite. There is a spacious office, large enough to accommodate 2 desks and a number of storage options; you then enter into a beautifully fitted dressing area with custom made fitted wardrobes, providing a large amount of storage. The master bedroom is wonderful with so much space and benefits from full width sliding glass doors offering superb views of the pool and in the distance views of the surrounding countryside. The master suite is completed with a larger than average en-suite, which includes a full bath, walk in shower, WC and wash area, all tiled with top quality products. Once you are outside this property the land space does not disappoint, offering an orchard with many other planted shrubs and trees. There is a large workshop with all electricity connected, storage and up and over door to the front. Adjacent to the workshop is a large brick building fully equipped with water and electric being used as storage by the current owners, however the building is spacious enough to use as additional self contained accommodation. This property is only an 8 minute drive from Crevillente and 12 minutes from Elche. Alicante Airport is approximately 20 minutes by car. This property is a stunning example and early viewing is highly recommended.
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 (399999) - Checking for old prices...

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

The current price is lower than the highest, so setting $reducedPriceRecorded to true



Checking features

We have features so let's process them:

Exploded and sorted to

Array ( [0] => Air-conditioning [1] => Close to amenities [2] => Covered terrace [3] => Electric gates [4] => Fireplace [5] => Front balcony [6] => Fully furnished [7] => Garden shed [8] => Grills [9] => Internet access [10] => Pre-Installation for Air-con [11] => Security system [12] => Short drive to beach [13] => Storage [14] => Utility room [15] => White goods )

That's 16 features

Here's a simple comma separated list in case you need it for the template... ... Air-conditioning, Close to amenities, Covered terrace, Electric gates, Fireplace, Front balcony, Fully furnished, Garden shed, Grills, Internet access, Pre-Installation for Air-con, Security system, Short drive to beach, Storage, Utility room, White goods

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

Array ( [0] => Air-conditioning [1] => Close to amenities [2] => Covered terrace [3] => Electric gates [4] => Fireplace [5] => Front balcony )
........................
Array ( [0] => Fully furnished [1] => Garden shed [2] => Grills [3] => Internet access [4] => Pre-Installation for Air-con )
........................
Array ( [0] => Security system [1] => Short drive to beach [2] => Storage [3] => Utility room [4] => White goods )

So col 1 looped is:

  • Air-conditioning
  • Close to amenities
  • Covered terrace
  • Electric gates
  • Fireplace
  • Front balcony

  • So col 2 looped is:

  • Fully furnished
  • Garden shed
  • Grills
  • Internet access
  • Pre-Installation for Air-con

  • So col 3 looped is:

  • Security system
  • Short drive to beach
  • Storage
  • Utility room
  • 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/844_superb_country_property_with_wow_factor_and_stunning_views_img_9139.jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/844_superb_country_property_with_wow_factor_and_stunning_views_img_9072.jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/844_superb_country_property_with_wow_factor_and_stunning_views_131118114851_dji_0021.jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/844_superb_country_property_with_wow_factor_and_stunning_views_img_9095.jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/844_superb_country_property_with_wow_factor_and_stunning_views_img_9135.jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/844_superb_country_property_with_wow_factor_and_stunning_views_img_9136.jpg

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

    • Let's download: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9139.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/844_superb_country_property_with_wow_factor_and_stunning_views_img_9139.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9139.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/844_superb_country_property_with_wow_factor_and_stunning_views_img_9139.jpg,wb
    • fwrite the file with: Resource id #18, $imagecontent (Massive long string! lol
    • Let's download: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9072.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/844_superb_country_property_with_wow_factor_and_stunning_views_img_9072.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9072.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/844_superb_country_property_with_wow_factor_and_stunning_views_img_9072.jpg,wb
    • fwrite the file with: Resource id #20, $imagecontent (Massive long string! lol
    • Let's download: 844_superb_country_property_with_wow_factor_and_stunning_views_131118114851_dji_0021.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/844_superb_country_property_with_wow_factor_and_stunning_views_131118114851_dji_0021.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 844_superb_country_property_with_wow_factor_and_stunning_views_131118114851_dji_0021.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/844_superb_country_property_with_wow_factor_and_stunning_views_131118114851_dji_0021.jpg,wb
    • fwrite the file with: Resource id #22, $imagecontent (Massive long string! lol
    • Let's download: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9095.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/844_superb_country_property_with_wow_factor_and_stunning_views_img_9095.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9095.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/844_superb_country_property_with_wow_factor_and_stunning_views_img_9095.jpg,wb
    • fwrite the file with: Resource id #24, $imagecontent (Massive long string! lol
    • Let's download: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9135.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/844_superb_country_property_with_wow_factor_and_stunning_views_img_9135.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9135.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/844_superb_country_property_with_wow_factor_and_stunning_views_img_9135.jpg,wb
    • fwrite the file with: Resource id #26, $imagecontent (Massive long string! lol
    • Let's download: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9136.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/844_superb_country_property_with_wow_factor_and_stunning_views_img_9136.jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 844_superb_country_property_with_wow_factor_and_stunning_views_img_9136.jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/844_superb_country_property_with_wow_factor_and_stunning_views_img_9136.jpg,wb
    • fwrite the file with: Resource id #28, $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-SR952-RM-T.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-SR952-RM-T.pdf
    Logging message to general log: "Printed window card for Ref: SAPP-SR952-RM-T (ID 844) and sending the $userID: "
    Finished in 5.662 seconds
    Exiting due to debug true (ie not returning the pdf!)