2015-01-12, 02:30:50
(2015-01-10, 18:48:48)cumbe Wrote: Hi aldebaran,
you are right; There was a small bug in this version.
Upload a new version 5.8.2.2 to extend with bug fixed.
Regards
Hi Cumbe
Thanks for the bug fix .. I downloaded your update version 5.8.2.2 - All works fine ! - On switching the website language, the labels of the Contact Form change to that language.
BUT I now see the following problems (NOT connected with the above lang switch bug fix )
1. You left a debug echo in at cbcontact_form.php > line 283
2. You forgot to include the PHPMailer_v5.1 directory in the plugin
3. No version number in the name of the plugin zip file
4. I am wanting to use the PHPMailer class to send mails, because I need to use the SMTP username/ password. As a result I found that, for me I am having problems with relative paths …
comprueba.php , line 136, 137 => the relative paths used in is_dir(….), file_exists(…..) and require(…) do not seem to work, at least in my setup on localhost and on my hoster .. ?
I looked at Point 4 and found the following
File comprueba.php :
So lines 136 and 137 in full are :
if (is_dir('../PHPMailer_v5.1') and file_exists('../PHPMailer_v5.1/class.phpmailer.php')){
require('../PHPMailer_v5.1/class.phpmailer.php'); … }
… For me in my setup, this does not work .. it cannot find the file
I did some googling and found that in PHP relative paths seem to be relative to the originally / initially called php file … in our case this is the top index.php file
So I temporarily changed the relative paths to :
is_dir('plugins/PHPMailer_v5.1') , file_exists('plugins/PHPMailer_v5.1/class.phpmailer.php'), and
require('plugins/PHPMailer_v5.1/class.phpmailer.php')
… and this worked
I also tried is_dir(dirname(__FILE__).'/../PHPMailer_v5.1') etc, … and this also worked , where dirname(__FILE__) returns the directory containing this file, ie comprueba.php
File cbcontact_form.php
But in file cbcontact_form.php, you have several includes such as :
include ("cbcontact/comprueba.php"); … and this works ! .. so where the relative path is relative to cbcontact_form.php, ie not relative to index.php
But this also works : include ("plugins/cbcontact/comprueba.php"); , ie rel to index.php
So my question is what’s happening ? What is the difference between the two files cbcontact_form.php and comprueba.php ? ? Is it to do with the include_path directive ?
Aldebaran