×

Notice

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

TOPIC: "No valid database connection" in "Latest comments" module

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6881

  • Mullet Midget
  • Mullet Midget's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I don't know if these are bugs or just me screwing things up. :) Anyway..

When I installed JoomlaComment 4.0beta1 I got this error message:

Warning: file_get_contents( compojoom.com/installedon/joomlacomments...m/administrator/&ip= <my_ip>) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/mysite.com/administrator/components/com_comment/install.comment.php on line 169


<my_ip> = the IP number for my web hotel

But JC seemed to work fine despite of this.
Until today when I installed the "Latest comments" module (4.0.0alpha3).
Then I get the same database error message several times (once for each article) in the module:

No valid database connection Unknown column 'my' in 'where clause' SQL=SELECT alias,id FROM jos153_content WHERE id=55-my-article


I don't know if this is because of JC or because of my Joomla installation. And is there a connection between this error messages and the ones during the installation?

And my installation problem could maybe have something to do with my file permissions on the web server?
I use NTC Hosting btw (PHP 5: safe_mode = off).

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6882

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
do you have 404SEF?

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6883

  • Mullet Midget
  • Mullet Midget's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Yes I use sh404SEF with security OFF (com_sh404SEF-15_1.0.20_Beta_build_237.joomla1.5.x.zip).

I disabled the sh404SEF and that got rid of the problems with "Latest comment" module. Thanks for the tip! :)
I also use .htaccess and mod_rewrite and an option in sh404SEF to get rid of the "index.php" in the URL.

Are there any known options in sh404SEF causing conflicts with JC that could be changed? Because I really want SEF URLs on my site.
I ran both JC + sh404SEF on a local WAMP server (Joomla 1.5.11) before and it worked fine.
Now I use Joomla 1.5.14 on a NTC Hosting webserver.

But I didn't use .htacess/mod_rewrite on the WAMP-server.

The articles and comments also contains swedish letters åäö ÅÄÖ, if that matters.

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6884

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
A user reported this problem. We have an id that looks like this
id=55-my-article

but it actuall should be just 55.

This is working just great on joomla, but with 404sef there are problems. The module will be updated in the near future.

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6885

  • Mullet Midget
  • Mullet Midget's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Sounds great!

So there's nothing I can do in any settings (sh404SEF or JC module), except wait for the updated version of the JC LastComments module?


And what about the error message during the installation. Is that too related to sh404SEF?

Warning: file_get_contents(compojoom.com/installedon/joomlacomments...amp;ip=<my_ip>) [function.file-get-contents]: failed to open stream: Permission denied in /home/www/mysite.com/administrator/components/com_comment/install.comment.php on line 169


Or is it a file permission issue with my web hosting company?

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6888

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
The last one is a file permission problem. And is not related to 404sef of joomlacomment.

Can you try the following. Open administrator/components/com_comment/plugin/com_content/josc_com_content.class.php

find at line 189the following:
$contentId = $contentId . '-' . $mod_data->alias;
change it to
$contentId = $contentId;

I think that should solve the problem with 404sef.

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6897

  • Mullet Midget
  • Mullet Midget's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
It worked fine after I changed that line of code.
Thanks a lot! :)

Do I have to worry about the file permission problem during the installation?
I've not been having any permission problems during installation of other Joomla plugins and JC seems to work fine despite of this.
Line 169 in /home/www/mysite.com/administrator/components/com_comment/install.comment.php was causing the error and is marked in bold below:

if(ini_get('allow_url_fopen') == true) {
$url = JURI::base();
$ip = $_SERVER;
file_get_contents(" compojoom.com/installedon/joomlacomments....php?url=$url&ip=$ip ");
}


Seems to be some kind of script reporting the URL and IP of the site JC is installed on?
So I guess it doesn't matter from an end-user point of view.

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6899

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
why aren't you using the latest version of joomlacomment? The code that you are referring too was removed from the component.

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6900

  • Mullet Midget
  • Mullet Midget's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I use beta1 because of some bugs in beta2 with the template I'm using, rendering in duplicate comments when editing a comment.
And missing separators for the reply/edit/quote etc.

Refered to in this thread: compojoom.com/forum/6-bug-report/5817-ed...ry?limit=10&start=10

So I'm waiting for beta3 or whatever next version is. :)

"No valid database connection" in "Latest comments" module 15 years 3 months ago #6945

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I don't think this is a bug in JC but rather just an incompatibility with sh404SEF. I keep it enabled and never have problems with JC, but I did at first.

Try fiddling with the "Item ID" options in sh404SEF. In particular, I remember the "guess ID when missing" option (it's called something like that, 'guess' is the keyword there) can actually break many components.
  • Page:
  • 1
Time to create page: 0.169 seconds