Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Probleme with 2 subdomain "Cannot redeclare class"

More
8 years 9 months ago - 8 years 9 months ago #1926 by csphoenix1
Hello !

In first part, thank you for this fabulous extension and for this work ! :)

But I have a big problem after duplicated my website (named A) to another directory (named B) on my server.

When I going in first to the website named A, and after the website B, B display a blank page.
If I restart Apache, and I going in first to the website B, and after to the website A, A display a blank page.
To conclude, the first site that I visit work (after have restarted the Apache Server), but not the second.

Bellow you can see the log ("/var/log/apache2/error.log") when I going to the website B after have visited the website A:
Code:
[Fri Aug 07 08:13:22.070713 2015] [:error] [pid 3525] [client XXX.XXX.XXX.XXX:54628] PHP Fatal error: Cannot redeclare class VisformsBusinessText in /var/www/a/components/com_visforms/lib/business/text.php on line 25, referer: http://b.local/administrator/index.php"

The error is "Cannot redeclare class VisformsBusinessText". But this class was never been declared before on the website B ! She was only been declared in the website A, but the websites A and B can't communicate, isn't it ? If not, how the website B can know the website A had already declared the class ?

Thank you in advance !
Have a good day.
Last edit: 8 years 9 months ago by csphoenix1.

More
8 years 9 months ago #1928 by Administrator AV
Replied by Administrator AV on topic Probleme with 2 subdomain "Cannot redeclare class"
Hi,

I use Visforms on many Joomla! Installations on productive web servers as well as on my local test system. I have either parallel Joomla directories like root/a and root/b each containing a Joomla! installation with Visforms and Joomla installations in subfolders like root/joomla1 and root/joomla1/joomla2 each containing a Visforms installation and have never had such a problem. I often "copy" a Joomla! website with Visforms into another folder on the same server (I use Akeeba Backup for this duplication) and both installations work fine.

I think you have somehow a misconfiguration on your server or for some reason the both website are not really independent from each other.

I'm sorry but I think this is not really a Visforms problem. If you want me to look into that problem I have to charge for my work but maybe your are able to figure it by yourself.

Kind Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
The following user(s) said Thank You: csphoenix1

More
8 years 9 months ago #1930 by csphoenix1
Hi !

Thank you for this quick answer and for your answer :)

I have found the problem.
The problem was caused by the PHP5 X-Cache module.
I don't know why, but when i disable this module, the both websites works like a charm and the error "Cannot redeclare class" disapear.
Do you know why X-Cache module cause this problem?

Thank you in advance.

Have a good week-end.

More
8 years 9 months ago #1931 by Administrator AV
Replied by Administrator AV on topic Probleme with 2 subdomain "Cannot redeclare class"
Hi,

I'm happy to hear, that you found the source of the problem.
I'm sorry but at the moment I don't know much about this php5 module and have no idea why it breaks Visforms, but I will keep it in mind and if I have some free time to spend I think I will look into this. If I find out something interesting, I will post it here.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
8 years 9 months ago #1932 by Administrator AV
Replied by Administrator AV on topic Probleme with 2 subdomain "Cannot redeclare class"
Hi,

I looks as if this is a problem of older xcache module versions.

xcache.lighttpd.net/ticket/296#no1

On the download page xcache.lighttpd.net/ there is a comment for the 3.0.2-rc1'fixed random "Cannot redeclare class" issue'

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
8 years 9 months ago - 8 years 9 months ago #1933 by csphoenix1
Hello :)

Thank you for your perfect answer! This is very interesting and now I know officialy the problem is realy due to X-Cache.

Also, I have downloaded the new Visforms 3.5.4 Beta (before, I was on the 3.4.3 version) because I would like customise my captcha.
But I found a problem: when I click on "Submit", I am well redirected to the page (the Visforms message, and not a custom link) but the page show "Form is missing" (Note: the mails are well sent).
I corrected it by replacing the line 245 from the file "components/com_visforms/controller.php" by :
Code:
$this->setRedirect("index.php?option=com_visforms&view=visforms&layout=message&id=".$visform->id.$tmpl);
So, do you know why Visforms display this error if I use the original Visforms 3.5.4 Beta ?

Thank you :)
Last edit: 8 years 9 months ago by csphoenix1.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum