×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: php-code on top of each page...

php-code on top of each page... 15 years 4 months ago #4792

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
After installing version 4 alpha 3 on a Joomla 1.5.11 site I get a hole list of php-code on every page and no 'comments' button.
?php defined('_JEXEC') or die('Direct Access to this location is not allowed.'); /* * Copyright Copyright (C) 2007 Alain Georgette. All rights reserved. * Copyright Copyright (C) 2006 Frantisek Hliva. All rights reserved. * License http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * * !JoomlaComment is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * !JoomlaComment is distrib.....

See also the image.
What to do now?

php-code on top of each page... 15 years 4 months ago #4827

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
That is interesting, which php version are you using?

php-code on top of each page... 15 years 4 months ago #4832

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
PHP version 5.2.6

php-code on top of each page... 15 years 4 months ago #4834

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Looks like a broken Joomla Template - too many opening or closing tags. Does it happen if you switch over to another template? One of the builtin ones for example.

EDIT: Or the permissions are wrong and the JoComment PHP file is being read as raw HTML (text) instead of being executed as code?

php-code on top of each page... 15 years 4 months ago #4836

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Switching to a standard template give the same result: php/code on top of the page.

I also saw that when I open the !JoomlaComment plugin I get the following error (in red):

* XML Parsing Error at 1:1. Error 4: Empty document
* XML Parsing Error at 1:1. Error 4: Empty document

I only installed !joomlacomment...
I do have copied some files with FTP to the right folders, because otherwise the plugin could not be installed. See the [url=http://http://compojoom.com/forum/8-installation/4-installation-problems.html]installation problem[/url] on this forum.

php-code on top of each page... 15 years 4 months ago #4837

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, now I get it :) I was wondering why the code from the plugin was showing there. So you have manually moved the files.
Look what the error message says - empty document! Are these files really the right one, do xml plugin file has content? Also, the easiest way to make the installation would be to make the plugin and plugin/content folder writable. Uninstall the component and install it again, then we should not have any problems to move the file.

php-code on top of each page... 15 years 4 months ago #4858

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
OK, I will do this.
Uninstall !JoomlaComment - results in:

!Joomlacomment component uninstalled.
"Uninstall complete mode" parameter has value No : !JoomlaComment tables NOT deleted.
joscomment and josccleancache bots uninstalled.
!JoomlaComment was successfully uninstalled.

Then I install the component, resulting in some errors:
There was a problem with your installation
 
error when moving /usr/home/deb7602/domains/domainname.nl/public_html/cms/administrator/components/com_comment/plugin/joscomment.php
TO /usr/home/deb7602/domains/domainname.nl/public_html/cms/plugins/content/joscomment.php
Please, contact the support.
Thanks.
 
error when moving /usr/home/deb7602/domains/domainname.nl/public_html/cms/administrator/components/com_comment/plugin/joscomment.xml
TO /usr/home/deb7602/domains/domainname.nl/public_html/cms/plugins/content/joscomment.xml
 
error when moving /usr/home/deb7602/domains/domainname.nl/public_html/cms/administrator/components/com_comment/plugin/josccleancache.php
TO /usr/home/deb7602/domains/domainname.nl/public_html/cms/plugins/system/josccleancache.php
 
error when moving /usr/home/deb7602/domains/domainname.nl/public_html/cms/administrator/components/com_comment/plugin/josccleancache.xml
TO /usr/home/deb7602/domains/domainname.nl/public_html/cms/plugins/system/josccleancache.xml
domainname.nl is changed by me.. :)

So, first I will drink a cup of coffee before I will move the files to the right folder.

php-code on top of each page... 15 years 4 months ago #4860

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
I have unistalled and installed again. Have the same errors (see above).
After that I copied the 4 files to the 2 folders in 'plugins'.
Both folders (content and system) are changed to 777.

Nothing changed, I get php-code above every page of the site.
What's the next step to try?

php-code on top of each page... 15 years 4 months ago #4864

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Nico,
are you willing to give me super admin access to your website and also ftp access? I would like to debug this problem.

php-code on top of each page... 15 years 4 months ago #4865

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Hello Daniel,

Thanks, I have send you a PM with login for Joomla and FTP.

php-code on top of each page... 15 years 4 months ago #4892

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Nico wrote:

Both folders (content and system) are changed to 777.


Many webhost providers these days are actually set to purposely break the site with said permissions. 755 is the highest you should need to go, this also ensures that the plugin instalaltion is taking place under owner and not world or group. Not to mention if a folder is 777, all it takes is a missing index.* file in ANY folder and you can be hacked within 5 minutes :blush:

Just giving you a heads up is all - be sure to set your folders back to 755 when it's all sorted :)

php-code on top of each page... 15 years 4 months ago #4975

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey nico,
Your problem is solved. I don't know how you did this, but the files that you have moved had invalid xml and php

the xml file was startin with ?xml and not with <?xml

the php file was starting with ?php and not with <?php - that was causing your server to not interpret this code as php and output it as simple text.
cheers and don't forget to write a review:
extensions.joomla.org/extensions/contact...omments/4389/details

P.S. I also recommend upgrading to beta1 since it fixes a lot of bugs in alpha3!

php-code on top of each page... 15 years 4 months ago #4976

  • Nico
  • Nico's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Hey Daniel, thanks! B)
It is working. I also do not know why this is happening. Normally I do choose my own hosting company (a good Joomla hoster), in this case the website-owner had already a hoster. When installing Joomla there were some other difficulties.... :(

I will explore the possibilities of Joomlacomment and upgrade .
Thanks Nico
  • Page:
  • 1
Time to create page: 0.118 seconds