Debugging card generator

You hit this file from the front end
Listing ID is: 1202 - 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>Panaorama Villas are stunning semi-detached properties with private pool located next to Serena Golf Course and walkable to the beach.</p>

<p>These lovely villas have open plan lounges with dining area, kitchen with island and a range of modern wall and base units. There is one&nbsp;double bedroom and family bathroom&nbsp;downstairs, and 2 further double bedrooms, the master having a good sized balcony terrace overlooking the pool area&nbsp;and a 2nd family bathroom upstairs, all the bedrooms come with fitted wardrobes.&nbsp; Each property comes with a 43 m2 roof top solarium which has a summer kitchen and BBQ.&nbsp;</p>

<p>The gardens of the properties are 92m2 and come&nbsp;with a private pool, each property also has its own parking area.</p>

<p>These properties are ideally situated for golf and beach lovers alike.&nbsp; As well as being next to Serena Golf course there are several other golf courses in the area.&nbsp; The inland waters of the Mar Menor are just a short walk away as well as all the amenities you will require, such as restaurants, bars and shops.</p>

<p>San Javier airport&nbsp;is just 10 minutes drive away and Alicante is 45 minutes away.&nbsp; There is good access to road networks making the whole of the Costa Calida and Costa Blanca easily accessible.&nbsp;&nbsp;</p>

...and AFTER processing:

Panaorama Villas are stunning semi-detached properties with private pool located next to Serena Golf Course and walkable to the beach. These lovely villas have open plan lounges with dining area, kitchen with island and a range of modern wall and base units. There is one double bedroom and family bathroom downstairs, and 2 further double bedrooms, the master having a good sized balcony terrace overlooking the pool area and a 2nd family bathroom upstairs, all the bedrooms come with fitted wardrobes. Each property comes with a 43 m2 roof top solarium which has a summer kitchen and BBQ. The gardens of the properties are 92m2 and come with a private pool, each property also has its own parking area. These properties are ideally situated for golf and beach lovers alike. As well as being next to Serena Golf course there are several other golf courses in the area. The inland waters of the Mar Menor are just a short walk away as well as all the amenities you will require, such as restaurants, bars and shops. San Javier airport is just 10 minutes drive away and Alicante is 45 minutes away. There is good access to road networks making the whole of the Costa Calida and Costa Blanca easily accessible.
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 (248500) - Checking for old prices...

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


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] => Solarium [4] => Storage [5] => Summer kitchen [6] => Terrace [7] => Unfurnished [8] => Walking distance to bars [9] => Walking distance to beach [10] => Walking distance to restaurants [11] => Walking distance to shops )

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, Solarium, Storage, Summer kitchen, Terrace, Unfurnished, Walking distance to bars, Walking distance to beach, Walking distance to restaurants, Walking distance to shops

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

Array ( [0] => Close to amenities [1] => Fitted wardrobes [2] => Front balcony [3] => Solarium )
........................
Array ( [0] => Storage [1] => Summer kitchen [2] => Terrace [3] => Unfurnished )
........................
Array ( [0] => Walking distance to bars [1] => Walking distance to beach [2] => Walking distance to restaurants [3] => Walking distance to shops )

So col 1 looped is:

  • Close to amenities
  • Fitted wardrobes
  • Front balcony
  • Solarium

  • So col 2 looped is:

  • Storage
  • Summer kitchen
  • Terrace
  • Unfurnished

  • So col 3 looped is:

  • Walking distance to bars
  • Walking distance to beach
  • Walking distance to restaurants
  • Walking distance to shops


  • 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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151929_sapp1614_(22).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151923_sapp1614_(23).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151925_sapp1614_(5).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151934_sapp1614_(2).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151944_sapp1614_(7).jpg
    • [Internal listing so using large]: https://s3.amazonaws.com/clients.sapphire.listingphotos/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151937_sapp1614_(6).jpg

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

    • Let's download: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151929_sapp1614_(22).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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151929_sapp1614_(22).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151929_sapp1614_(22).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151929_sapp1614_(22).jpg,wb
    • fwrite the file with: Resource id #24, $imagecontent (Massive long string! lol
    • Let's download: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151923_sapp1614_(23).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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151923_sapp1614_(23).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151923_sapp1614_(23).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151923_sapp1614_(23).jpg,wb
    • fwrite the file with: Resource id #26, $imagecontent (Massive long string! lol
    • Let's download: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151925_sapp1614_(5).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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151925_sapp1614_(5).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151925_sapp1614_(5).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151925_sapp1614_(5).jpg,wb
    • fwrite the file with: Resource id #28, $imagecontent (Massive long string! lol
    • Let's download: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151934_sapp1614_(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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151934_sapp1614_(2).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151934_sapp1614_(2).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151934_sapp1614_(2).jpg,wb
    • fwrite the file with: Resource id #30, $imagecontent (Massive long string! lol
    • Let's download: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151944_sapp1614_(7).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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151944_sapp1614_(7).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151944_sapp1614_(7).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151944_sapp1614_(7).jpg,wb
    • fwrite the file with: Resource id #32, $imagecontent (Massive long string! lol
    • Let's download: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151937_sapp1614_(6).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/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151937_sapp1614_(6).jpg
    • We received a good image, at least $imagecontent is not false!
    • Arrived at the saving part ready to use name: 1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151937_sapp1614_(6).jpg
    • fopen the file: /var/www/vhosts/sapphireproperties.co.uk/httpdocs/images/listing_photos/temp/1202_stunning_villas_next_to_serena_golf_course_and_walkable_to_the_beach_020818151937_sapp1614_(6).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-1614-RM.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-1614-RM.pdf
    Logging message to general log: "Printed window card for Ref: SAPP-1614-RM (ID 1202) and sending the $userID: "
    Finished in 4.772 seconds
    Exiting due to debug true (ie not returning the pdf!)