IMG_0412
EnglishDeutsch
Use DokuWiki with Joomla >= 1.0.13 Print E-mail
Sonntag, 25 November 2007

As described in this earlier hint I wrote a bridge for DokuWiki. With this bridge it's possible to use the Joomla users in DokuWiki. Unfortunately, this bridge didn't work anymore with Joomla 1.0.13. Now I took a closer look at the code and found a solution to get it working with Joomla 1.0.13

 

DokuWiki offers a possibility to write your own authentification methods. I wrote such a method for Joomla. The big problem was the new authentification system that was introduced with Joomla 1.0.13. I needed to find a way to convert the password correctly. Here I describe how I did it.

If you like to use the Joomla users ind Dokuwiki you have to change the following lines in conf/dokuwiki.php:

$conf['authtype'] = 'plain'; to $conf['authtype'] = 'joomla';

Put the file joomla.class.php (first unzip it) in to the inc/auth/ directory. To get it working you have to change to more lines to your needs:

$conf['superuser'] = "admin"; In this line you have to add the short name of your administrator in Joomla.
include_once("../configuration.php");That's the path to the Joomla config file.

If you don't use the default prefix jos_ for the Joomla database you have to change the prefix in the two sql queries.

At the moment you have to log in into DokuWiki seperately. The next step I plan is to read out the Joomla cookie / session variables that if you logged into Joomla, your also logged in in Dokuwiki.

{moscomment}

Comments

Add New
ruflin 2010-03-07 13:08:42
 
Thanks for your addition. Looks good.
 
Brisferr 2010-03-04 19:29:01
 
User not Actived in Joomla have access to Wiki
Hello,

I did remark that user who are not activated in Joomla, are active in DokuWiki.

I did
change your code in the joomla.class.php in the function checkPass

line 29
old $sql = "SELECT
password FROM jos_users WHERE username = '$user'";
new $sql = "SELECT password, activation
FROM jos_users WHERE username = '$user'";

line 34
old return
$this->checkJoomlaPassword($pass,$res['password']) ;
new return
$this->checkJoomlaPassword($pass,$res['password'], $res['activation']);

then the function
checkJoomlaPassword by
line 40
old function checkJoomlaPassword($pass,$dbpass)
new function
checkJoomlaPassword($pass,$dbpass,$dbactivation)

line 49
old if( (strpos($dbpass,':') == true) &&
$hash == $cryptpass ) {
new if( (strpos($dbpass,':') == true) && $hash == $cryptpass &&
$dbactivation=='') {

The inconvenient of this, is that the user don't get the good raison of the
refuse. But, this mean then change code into wikidoku files.

Hope this help other
people.

Brisferr
 
ruflin 2009-10-16 23:29:08
 
der relative pfad ist im admin/ folder unterschiedlich, daher das problem
 
Reiner 2009-10-16 23:22:52
 
Joo jetzt siehts es so aus

/var/www/web94/html/grund-blog/configuratio n.php

und geht, völlig
ungewöhnlich,

danke für die schnelle hilfe

cu Reiner
 
ruflin 2009-10-16 23:13:33
 
Probiers mal mit dem absolutem statt dem relativem Pfad.
 
Reiner 2009-10-16 23:03:20
 
Die Meldung kommt in leeren Namensräumen und im Adminbereich bei der Zugriffsverwaltung und
schonmal bei der Seitenbearbeitung. Wenn ich Pfad ändere dann geht garnichts mehr.
 
ruflin 2009-10-16 22:56:09
 
So wie es die Fehlermeldung schon sagt: Den Pfad für die configuration.php Datei anpassen. Der
scheint nämlich falsch zu sein.
 
Reiner 2009-10-16 22:49:20
 
Bekommen Fehlermeldung im Wiki
Hallo ruflin,

Ich kann das wiki benutzen allerdings kommen immer wieder diese
Fehlermeldungen.

Das einloggen mit den Benutzerdaten von Joomla 1.5.10 klappt soweit, leider
nicht automatisch.

Aber wie bekomme ich die Meldungen weg?

cu Reiner

Warning:
auth_joomla(../grund-blog/configuration.php) [function.auth-joomla]: failed to open stream: No such
file or directory in /var/www/web94/html/grund-wiki/inc/auth/joomla.cla ss.php on line
14

Warning: auth_joomla() [function.include]: Failed opening '../grund-blog/configuration.php'
for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/web94/html/grund-wiki/inc/auth/joomla.cla ss.php on line 14

Fatal error: Cannot
instantiate non-existent class: jconfig in /var/www/web94/html/grund-wiki/inc/auth/joomla.cla ss.php
on line 16
 
Navin 2009-10-09 15:44:00
 
Thank you
this is just plain beautiful hi5 =)
 
ruflin 2009-10-09 15:54:08
 
Ah ok, you're using the "other" bridge. When I tried to implement it the main problem was,
that joomla and dokuwiki used different cookies and used a different session. So I assume you need
to set somewhere which cookie should be used and how joomla and dokuwiki both should access the user
data through this session cookie. It wasn't all straight forward, that was the reason I didn't
implement it. But I remember that there are some nice options inside the dokuwiki config where you
can change this parameters.
 
Geoff 2009-10-06 18:15:34
 
Auto login?
I thought the auto login bridge was supposed to set a shared cookie (don't ask me how, I'm no idea
how it works!)? I know you're not the author of the bridge but I had - perhaps mistakenly - thought
the two things together would mean logins aren't required. His rather short documentation says to
remove the login controls from the DokuWiki code which would suggest this. Like I say, I know it's
not your bridge but I was hoping somebody here would know what I'm missing! Thanks for the reply
anyway, good work btw.
 
ruflin 2009-10-06 12:59:51
 
That's the case. You can use the same logins, but until yet it doesn't login into both automatically
because the cookies are not shared. I planed to implement this a long time ago but never had the
time to do it.
 
Geoff 2009-10-04 17:04:01
 
Installed but auto log-in not working
The support address support@myostrich.net isn't working so I'm hoping that somebody here can
help. I know this isn't strictly the right place but I'm getting desperate!

DokuWiki definitely
uses the Joomla database for usernames/passwords. However, when linking to DokuWiki after logging
into Joomla, DokuWiki appears but not logged in. If I change the directory path to nonsense then
logging into Joomla causes a red error message about the dokuwiki autologin directory not being
correct.

Any help much appreciated!

Regarding earlier comments about paths, I had to use dokuwiki/
as the plugin directory, and /home/mywebsite/public_html/ for the config file.
 
ruflin 2009-03-27 20:32:02
 
I proposed that you insert the absolute path (this path starts with a / ) to find out if it's just a
relative path problem or something else.
 
Anonymous 2009-03-27 20:29:08
 
what's the path relative to then? What do you think i should put in there?
 
ruflin 2009-03-27 02:27:50
 
I think here a / at the beginning is missing. Like this it's not the full path.
 
Xsinthis 2009-03-24 20:53:20
 
i get the errors i posted below when i use home/theredhand/public_html/wiki/configuration.php or
home/theredhand/public_html/wiki/
 
ruflin 2009-03-24 10:48:09
 
What happens if you enter the full path for the config file. It seems like it can't find the config
file
 
Xsinthis 2009-03-22 02:58:39
 
Error while editing
I have the same problem as above with integrating with Joomla 1.5.

I get the following error in the
editor:

br /> Warning: auth_joomla::include_once(../configuration.php) [auth-joomla.include-once]:
failed to open stream: No such file or directory in
/home/redhand/public_html/wiki/inc/auth/joomla.cla ss.php on line 14

Warning:
auth_joomla::include_once() [function.include]: Failed opening '../configuration.php' for inclusion
(include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/redhand/public_html/wiki/inc/auth/joomla.cla ss.php on line 14

Fatal error: Class 'JConfig'
not found in /home/redhand/public_html/wiki/inc/auth/joomla.cla ss.php on line 16

My joomla is in
the url root (home/redhand/public_html) and dokuwiki is in public_html/wiki
 
Sam 2009-03-18 19:49:01
 
will do - thanks for the prompt help. Appreciate it.
 
ruflin 2009-03-18 19:44:04
 
I only knew it exists because of some comments here :-) But it's great that someone can use my
bridge. If you find a solution, it would be great if you could also post it here (for other people
that have the same problem).
 
Sam 2009-03-18 19:41:32
 
You're right. I'm using: http://www.myostrich.net/joomlafiles/

however they state that I need you
bridge to get it working. They point back to your site so I thought it was a joint project. oh
well. thanks for the help. I'll follow-up with them.

I prefer the auto-login feature. If I can
get it to work.
 
ruflin 2009-03-18 19:25:31
 
Do you use my bridge or the joomla plug-in written by some other guys? Because if you only use my
bridge you wont be logged in automatically. It seems like this is a problem of the plugin and not my
bridge. If that's the case, you have to contact the ones that created the plugin.
 
Sam 2009-03-18 19:22:58
 
Yes, I login to Joomla. I have the brige working for DokuWiki. Certain users, when logged into
Joomla, click on the DokuWiki menu item automatically get logged in. Others, however, can't.
 
ruflin 2009-03-18 19:15:10
 
Do you mean can't login into DokuWiki, right? What you mean by manually created?
 
Sam 2009-03-18 19:11:56
 
which log file should I be checking?

I've got a user for example: "techsupport" with
password "support" that can login to Joomla however it won't log that user into
Joomla.

I've also got a user that I manually created called "testing" with password
"testing" and that works.
 
ruflin 2009-03-18 19:06:53
 
Strange. What about the password? Probably you don't know their password, but ask if they use some
special sign there. And check the log file.
 
Sam 2009-03-18 19:04:33
 
it's a fresh joomla 1.5.9 install with approx 15 users.
 
ruflin 2009-03-18 19:01:39
 
Does the log file say anything? Which Joomla Versio do you use? Did you upgrade from 1.0 to 1.5? Are
this some of the oldest users?
 
Sam 2009-03-18 18:59:49
 
I have a user ssingh that is a joomla admin an login, another ckim that doesn't login.
 
ruflin 2009-03-18 18:53:32
 
Could it be, that some users have special signs or space in their names?
 
Sam 2009-03-18 18:48:47
 
somewhat works
Hmm, the weird thing is that some of my users can login while others cannot. It's strange and I
can't seem to figure this out. Anyone?
 
John Wilson 2009-03-17 02:26:01
 
Works great after a tweak
It helps not to go "oh hell" and panic when things don't want to work I went back to the
setup in joomla.class.php and replaced the default with this after reading the message
slowly.

Contrary to my first scam it actualy made sense. So here's the fix that should work
universally. (At least on 'Nix hosts!)

Line 14 is
now
include_once("/home/mysite/public_html/con figuration.php");

The DokuWikiAutoLogin
plugin ( from myostrich.net) which uses this bridge works perfectly once the only configuraation
parameter is set to find the dokuwiki installation thusly.

(I always wanted to say
that!)

DocuWiki Directory Path:
/home/mysite/public_html/dokuwiki/

Maybe this will help some
people.

Thanks for the great bridge!!

ttfn

John
 
ruflin 2009-03-14 11:00:47
 
Hi Jacob

It seems like there is somewhere a plugin as DokuWiki Bridge that uses my code for getting
things done. My code is not really a plugin, it's more a hack. Because I don't know exactly what the
others have done, I can't tell you what went wrong (I also don't know, if the plugin
works).

Perhaps it's an idea to try this solution here without the plugin. This should work.
 
Jacob Matthews 2009-03-12 02:15:01
 
I have installed the bridge and configured dokuwiki.php and joomla.class as you said.

However
logging into Dokuwiki fails with incorrect username/password for any combination including those
confirmed to be correct in Joomla. Change authtype back to plain and I can log in to DokuWiki
fine.

The DokuWiki brige shows as a plugin in DokuWiki but is simply called __OSX and has no other
information other than the plugin description.

Any ideas?
Thanks,
Jake
 
ruflin 2009-03-05 11:36:03
 
Thanks, good to know.
 
Rick R 2009-03-04 08:09:27
 
Instructions and Files work Perfectly
Hello, just wanted to let you know, I followed the directions and everything works perfectly!
(Joomla 1.5!!)
 
ruflin 2009-02-05 18:48:12
 
Hi Polow

Until yet nothing has really changed. But probably you will find some news in one or two
month. I got some new ideas ;-)
 
Polow 2009-02-05 13:56:55
 
Hi man !

I'm using your great wiki bridge and it works fine. But I come to take some news about the
end of the project. Have you work on it since last time ?

Give some news,

Thx for your work ;)
 
not noti 2009-01-18 21:40:33
 
notno
notno
 
not noti 2009-01-18 21:39:57
 
notno
notno
 
not noti 2009-01-18 21:39:37
 
notno
 
ruflin 2009-01-18 21:30:28
 
Hi Adam

It seems like your path is set wrong. Where is Dokuwiki, where is Joomla?
 
Adam 2009-01-16 07:56:15
 
error with joomla 1.5
I keep getting this error when I try to integrate with Joomla 1.5

Warning:
auth_joomla::include_once(../configuration.php) [auth-joomla.include-once]: failed to open stream:
No such file or directory in /home/uicakpsi/public_html/wiki/inc/auth/joomla.cl ass.php on line
14

Warning: auth_joomla::include_once() [function.include]: Failed opening '../configuration.php'
for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/uicakpsi/public_html/wiki/inc/auth/joomla.cl ass.php on line 14

Fatal error: Class 'JConfig'
not found in /home/uicakpsi/public_html/wiki/inc/auth/joomla.cl ass.php on line 16
 
Mauro 2008-11-13 10:44:03
 
path directory
Thank you, the path you suggest was the correct one.

Mauro
 
ruflin 2008-11-11 18:18:28
 
It seems like you mix different stuff. Probably your using a old plugin or there is a new plugin. So
it's better to ask question in the place of this plugin.

But probably the correct path is just
dokuwiki/
 
ulilicht 2008-11-11 18:07:24
 
just wanted to unsubscribe this discussion
but good work you all
 
Mauro 2008-11-11 18:00:03
 
plugin
I have a plug in that works with dokuwiki and joomla and it asks for dokuwiki directory path, i have
download it because thai said that with their plugin and your files all should connect perfect
 
ruflin 2008-11-11 17:53:19
 
About what dokuwiki plugin are you talking? This here is only a bridge.
 
Mauro 2008-11-11 17:47:47
 
re:path directory
Hi and thank you for your prompt response, in joomla, in the plug in windows i have to specify
this:

"Dokuwiki Directory Path"

whta does it mean, i have to put the link for the
dokuwiki folder like localhost/dokuwiki.......

or something else, Thank you
 
ruflin 2008-11-11 17:39:56
 
Hi mauro

You got diferent paths in the description above. Normally paths are sepearted by /. It
also depends on which system your working. But in general you should create relative paths.

If you
installed dokuwiki in the joomla directory, the path should work as it is.
 
mauro 2008-11-11 17:34:46
 
path directory
hi everybody, i am trayng to use dokuwiki thru joomla but I have some trouble with directory path, i
don't know wath is a path directory, can you please do an example (localhost/dokuwiki/..........)
thank you in advance
 
ruflin 2008-11-07 18:33:41
 
Hi Polow

I'm glad that it works now. About the second part of my article: At the moment I just
don't have the time to do it, but it shouldn't be that hard.

I guy wrote me some time ago that he
is probably going to do it. He writes me as soon as it's done. So you will also get this news here.
 
Polow 2008-11-07 15:13:08
 
Sorry for the flood. I am so tired that I wrote the wrong username :/

It seems to work but I can't
believe it. Thank you so much for the great bridge and the support

Ps : do you know if you'll
finish the thing that you are talking about at the end of your article ? It should be AWESOME


THX THX THX ^^
 
Polow 2008-11-07 15:04:10
 
Needing so much a wiki, I got my db mysql with a dump php script. I have delete joomla from the
manager of OVH, re create a bdd, load the mysql file from the other one (it works we can log in the
site) and reupload joomla.

Now I have configured the dokuwiki. It doesn't work but I can access to
my db.

Here is the error :

Warning: mysql_connect() [function.mysql-connect]: Access denied for
user 'pglaab'@'10.0.78.32' (using password: YES) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php on line 16

Warning:
mysql_select_db(): supplied argument is not a valid MySQL-Link resource in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php on line 18

Warning: Cannot modify
header information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:16) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth.php on line 245

Warning: Cannot modify header
information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:16) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/actions.php on line 141

Hope we will find a way to use your
bridge
 
Polow 2008-11-06 22:47:32
 
Yeah Sure
 
ruflin 2008-11-06 22:46:55
 
If you find a solution, please post it here.
 
Polow 2008-11-06 22:44:17
 
Okay. Thank you very much.

I will not use the wiki for the moment.
 
ruflin 2008-11-06 22:37:41
 
Hm, this was at the moment all, sorry. But I'm pretty sure, it shows the error for line 29, but the
error is in the connection to the database.
 
Polow 2008-11-06 22:33:35
 
The line which is the problem in the message is the line 29.

$res =
mysql_fetch_array(mysql_query($sql, $conn));

Do you have one last idea ?
 
Polow 2008-11-06 22:31:49
 
I did it. The error doesn't change.
 
ruflin 2008-11-06 22:29:28
 
You have to change this two lines:

$sql = "SELECT password FROM jos_users WHERE username =
'$user'";

to

$sql = "SELECT password FROM jom_users WHERE username =
'$user'";


and

$sql = "SELECT name, email FROM jos_users WHERE username = '$user'
;";

to

$sql = "SELECT name, email FROM jom_users WHERE username = '$user' ;";
 
Polow 2008-11-06 22:27:09
 
I don't find where to do it.

Here is the code you told me to write :
function
checkPass($user,$pass){

$conn = mysql_connect('xxxxxx','xxxxxx','xxxxxx');

mysql_select_db('xxxxxx', $conn);
$sql = "SELECT password FROM jos_users WHERE username
=
'$user'";

$res = mysql_fetch_array(mysql_query($sql,
$conn));

return
$this->checkJoomlaPassword($pass, $res['password']) ;
}

Maybe I haven't write the
good elements.
 
ruflin 2008-11-06 22:22:33
 
Did you change the table names?
 
Polow 2008-11-06 22:19:57
 
I got this error :

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in /home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php on line 29
Sorry, username
or password was wrong.

Warning: Cannot modify header information - headers already sent by (output
started at /home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:29) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth.php on line 245

Warning: Cannot modify header
information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:29) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/actions.php on line 141
Sorry, username or password was
wrong.

Line 29 is : $res = mysql_fetch_array(mysql_query($sql, $conn));

Thx trying to help me,
it's very boring that I can't make it work easily
 
ruflin 2008-11-06 22:16:09
 
Ok, that's probably the problem. Modify the both queries (in joomla.class.php) with jos_ to jom_
 
ruflin 2008-11-06 22:13:48
 
Oh, that's bad. You can also try the following:

At the mysql_connect directly to the checkPass
function and add the $conn to the query (see below). Perhaps this works. Hardcod user, pw etc like
before.


function checkPass($user,$pass){

$conn =
mysql_connect($mosConfig_host,$mosConfig_user,$mos Config_password);

mysql_select_db($mosConfig_db, $conn);
$sql = "SELECT password FROM jos_users WHERE username
= '$user'";

$res = mysql_fetch_array(mysql_query($sql, $conn));

return
$this->checkJoomlaPassword($pass,$res['password']) ;
}
 
Polow 2008-11-06 22:12:07
 
An other thing is that my prefix table is jom_ and not jos_

Where can I modify it?
 
Polow 2008-11-06 22:07:01
 
The problem is that i installed Joomla! with the OVH Manager and I have no access to the
phpmyadmin.

Do you see anything else ? please ?
 
ruflin 2008-11-06 21:58:42
 
So now I hope, you got somewhere a phpmyadmin installation where you can put this query in, to test
if it works and finds a user. If yes, it's a problem with the connection.
 
Polow 2008-11-06 21:54:04
 
Okay it tells me it :

SELECT password FROM jos_users WHERE username = 'xxxxx'

What is the next
step ? I hope we are near the goal
 
ruflin 2008-11-06 21:51:16
 
wrong place :-)

$sql = "SELECT password FROM jos_users WHERE username = '$user'";
echo
$sql;
exit();
$res = mysql_fetch_array(mysql_query($sql));
 
Polow 2008-11-06 21:44:43
 
Okay I tried to write it like this :

$conn = mysql_connect('xxxxx','xxxxx','xxxxx');

mysql_select_db('xxxxx', $conn);
echo $sql;
exit();
}
And when I click on Login, then I have a
blank page. It loads the doku.php page, but I have nothing in sight on the page.
 
ruflin 2008-11-06 21:39:12
 
Ok, instead of using error_log($sql) you can use

echo $sql;
exit();

below the definition of $sql.
Then you should see the output of the query in the browser.
 
Polow 2008-11-06 21:35:32
 
Sorry to being so newbie, but what should I do with error_log($slq) and where ?
 
ruflin 2008-11-06 21:32:07
 
Ok, the second question is, if this line returns a valid sql query:

$sql = "SELECT password
FROM jos_users WHERE username = '$user'";

you can check the query for example by
error_log($sql) and check your log file for the output. There should be $user replaced in the
query.

Try also to execute this query (you find in the error_log) in for example phpmyadmin. If you
then get an error, there is something wrong with the query. If not, it's a problem if the database
conenction.
 
Polow 2008-11-06 21:24:03
 
I did what you say but there is the same error message. It seems to be the line 24 that causes the
problem.

Here is my line 24 :

$res = mysql_fetch_array(mysql_query($sql));
 
ruflin 2008-11-06 21:19:55
 
It's a problem of the database connection as far as I can see. The error needs to be somewhere in
this two lines:

$conn = mysql_connect($mosConfig_host,$mosConfig_user,$mos
Config_password);

mysql_select_db($mosConfig_db, $conn);

Perhaps you can try to hardcode the
database name in mysql_select_db also.
 
Polow 2008-11-06 21:16:17
 
I had putted the first one :/ I tried with the second one right now and it doesn't work too. The
error message is the same.

Have I anything more to write in joomla.class.php ?
 
ruflin 2008-11-06 21:10:57
 
Have you put in

mysql_connect($mosConfig_host = 'xxxxxx',$mosConfig_user =
'xxxxxx',$mosConfig_password =
'xxxxxx');

or

mysql_connect(
'xxxxxx','xxxxxx',
'xxxxxx');

?

Because the first version wouldn't work.
 
Polow 2008-11-06 21:08:42
 
I have putted into joomla.class.php at line 16 my mySQL informations :

line 16 $conn =
mysql_connect($mosConfig_host = 'xxxxxx',$mosConfig_user = 'xxxxxx',$mosConfig_password =
'xxxxxx');

Now I just have an error message when I try to login.

Here is the message :

Warning:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php on line 24
Sorry, username or password
was wrong.

Warning: Cannot modify header information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:24) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth.php on line 245

Warning: Cannot modify header
information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:24) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/actions.php on line 141
Sorry, username or password was
wrong.

Thx,

Polow
 
ruflin 2008-11-06 15:15:05
 
Perhaps you can search for the $mosConfig_host line in your configuration.php of joomla and place
the whole line here. This could help, because perhaps here is not localhost but a path to a socket.
In general this should also work with my script, but I have never tested it.
 
Anonymous 2008-11-06 09:49:31
 
Thx to answer so quickly.

I got a OVH server, I installed Joomla directly in the Ovh manager, and I
installed by myself dokuwiki.

Joomla is installed at the root of the server, dokuwiki is in his
folder, placed in root too.

I am a newbie in mysql, php coding... and I don't understand what you
are telling.

Thx trying to help me
 
ruflin 2008-11-06 04:34:44
 
Hi Polow

It more seems like you got a problem with the mysql connection, because it can't find the
mysql socket.

Does just a mysql_connect with hardcoded code work on your server? Perhaps you have
to define your socket for mysql instead of localhost, if that's necessary on your server.

How does
the config of your Joomla installation look like? It's on the same server, right?
 
Polow 2008-11-06 00:44:24
 
I have done what you did. But I get this error :

Warning: mysql_connect() [function.mysql-connect]:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php on line 16

Warning:
mysql_select_db(): supplied argument is not a valid MySQL-Link resource in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php on line 17

Warning: Cannot modify
header information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:16) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth.php on line 245

Warning: Cannot modify header
information - headers already sent by (output started at
/home.41/p/g/l/pglaab/www/dokuwiki/inc/auth/joomla .class.php:16) in
/home.41/p/g/l/pglaab/www/dokuwiki/inc/actions.php on line 141

Hope you could find what I have to
do to repair it !

Thx,

Polowww
 
ruflin 2008-09-14 01:28:40
 
It seems like you got a space in 'gwep.ne t' ...

I think that shouldn't be ...
 
Matthew 2008-09-13 21:03:25
 
Common Error
Thank you for the response. The error I receive is thus:
==
auth_joomla(../configuration.php):
failed to open stream: No such file or directory in
/mounted-storage/home6/sub003/sc13408-QNSV/gwep.ne t/wiki/inc/auth/joomla.class.php on line
14
==
The wiki works fine except for a few cases where that error pops up. So the wiki IS able to
find configuration.php except for a few cases, one being the index. I am thinking that the wiki
goes down one more directory for a few links then doesn't go back up enough to find the config.
Since my setup tells it to only go back one directory (../)
 
ruflin 2008-09-13 19:56:02
 
Dokuwiki .htaccess
As far as I know, I use the standard .htaccess file which is coming with dokuwiki. Here is the
content:


RewriteBase /wiki
#
RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1
[QSA,L]
RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L]
RewriteRule
^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L]
RewriteRule ^$
doku.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}
!-d
RewriteRule (.*) doku.php?id=$1 [QSA,L]
RewriteRule ^index.php$
doku.php
 
Matthew 2008-09-13 18:46:52
 
Wiki Index
Ruflin, in your wiki index your URL comes out as:
/wiki/index?do=index

While with my index it
is:
/wiki/doku.php?id=start&idx=playground

With the 'id=pagename' stuck in there the wiki can't
find configuration.php

I assume you used modrewrite to turn doku.php to index. Will you paste your
rules here?
 
cudjoe 2008-08-23 00:53:20
 
update joomla 1.5
For Joomla 1.5 I had to modify it slightly :

include_once("../../joomla/configuration.ph
p");

$jconf = new JConfig();
$conn = mysql_connect($jconf->host,$jconf->user,$jconf->pa
ssword);
mysql_select_db($jconf->db, $conn);
 
ruflin 2008-07-31 00:00:00
 
re: cookie
I assume that I don't get time to finish the last part in the next 6 months. But who knows ;-)
 
chavers 2008-07-30 22:09:27
 
cookie
Nice work,

with "Awiki" and "joomdoku search" it's a greet integration of dokuwiki
in J1.5


The single singon is the last part, do you look it, or it's a dead idee (security
probleme...)

Best regards, Renaud.
 
Julian 2008-04-23 11:10:40
 
Yes, I have changed the dokuwiki.php-parameter $conf['authtype'] = 'joomla'; and insert the
joomla.class.php for Joomla 1.5.

Sorry for the wrong place of my post.
 
ruflin 2008-04-23 11:03:49
 
Hm strange so ../configuration.php should work. Did you also change all other parameters?

And do
you use the bridge for Joomla 1.5? Just because your writing in here, that's the bridge for Joomla
>= 1.0.13.
 
Julian 2008-04-23 10:53:33
 
http://www.win-kn.dresden-kristall.de/

and the wiki is on the subfolder
.>
http://www.win-kn.dresden-kristall.de/wiki

Danke
 
ruflin 2008-04-23 10:20:27
 
And where is your Joomla-Installation placed. Can you post the link, the perhaps I can find out the
problem.
 
Julian 2008-04-23 09:01:29
 
Hello together,

I have got a problem with "DokuWiki Bridge for Joomla 1.5".

My wiki
folder is placed in the root folder of my Homepage. I have modified the include_once - line of
"joomla.class.php" with every possible path. (like ../configuration.php ,
.././configuration.php , /configuration.php...)
But every time I get a error -> "DokuWiki Setup
Error" "Please contact the system administrator.".

Can anybody help me with this
problem?

cu Julian
 
ruflin 2008-02-29 10:56:37
 
Hi chris

I just translated it... Hope this helps.
 
Chris Schultz 2008-02-28 22:46:38
 
Do you happen to have these instructions in english?
 
thijs lemmens 2008-02-06 15:48:23
 
I made a small change so it would work with joomla 1.5. It's really no big deal, but if you want it,
mail me so I can send it back to you.
 
ruflin 2008-01-13 18:36:30
 
Hast du es mal versucht die Zugangsdaten direkt einzugeben?
 
Ulrich Lichtenegger 2008-01-13 17:05:16
 
hi!
hm, das funktioniert leider auch noch nicht. wieder den fehler:

Warning:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 24
Sorry, username or password was
wrong.

Warning: Cannot modify header information - headers already sent by (output started at
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php:24) in
/www/htdocs/bgmabi/cms/wiki/inc/auth.php on line 244

Warning: Cannot modify header information -
headers already sent by (output started at /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class.
php:24) in /www/htdocs/bgmabi/cms/wiki/inc/actions.php on line 131
Sorry, username or password was
wrong.




kann es sein, dass irgendetwas mit verschiedenen anderen bridges nicht klappt? so
hab ich beispielsweise in joomla den community builder installiert, genauso wie eine bridge zum SMF
und eine zur gallery2 von menalto...

weiß nicht ob das probleme machen könnte...
thx für die
hilfe!
 
ruflin 2008-01-13 16:54:32
 
Ah, und habe noch kurz dein include_once angeschaut. Das müsste so
lauten:

include_once("/www/htdocs/bgmabi/cm s/configuration.php");

Das wäre die 2
Lösung. So wäre es wohl noch einfacher. So wie es direkt in der joomla.class.php war funktionierte
es nicht?

include_once("../configuration.php&# 34;);
 
ruflin 2008-01-13 16:52:30
 
Du kannst sonst folgendes versuchen. Ersetzte in joomla.class.php in den folgenden Zeilen username,
password und database durch die passenden Daten der Datebank. Funktioniert es so?

$conn =
mysql_connect("locahost","username" ;,"password");

mysql_select_db("database", $conn);

Das inlcude_once kanst du mit // auskommentieren.
 
Ulrich Lichtenegger 2008-01-13 16:42:03
 
hallo! danke für die mega-schnelle antwort!

ich hab die joomla.class.php angepasst, nur leider
bekomme ich noch die selbe fehlermeldung.
vielleicht liegts wirklich am include der
configuration.php, aber meines wissen müsste das stimmen.
also meine joomla configuration.php
liegt im webspace-verzeichnis /cms/

das wiki habe ich in /cms/wiki installiert.

die
joomla.class.php liegt in /cms/wiki/inc/auth/

wie müsste dann da der pfad lauten?
also ich hab
mir gedacht(laut selfhtml: http://de.selfhtml.org/html/allgemein/referenziere n.htm)

es müsste
heißen include_once("/cms/configuration.php");


aber das produziert die noch größere
fehlermeldung:

Warning: auth_joomla() [function.auth-joomla]: open_basedir restriction in effect.
File(/cms/configuration.php) is not within the allowed path(s): (/www/htdocs/bgmabi:/tmp) in
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 14

Warning:
auth_joomla(/cms/configuration.php) [function.auth-joomla]: failed to open stream: Operation not
permitted in /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 14

Warning:
auth_joomla() [function.include]: Failed opening '/cms/configuration.php' for inclusion
(include_path='.:') in /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 14

Warning:
mysql_connect() [function.mysql-connect]: Access denied for user 'www-data'@'localhost' (using
password: NO) in /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 16

Warning:
mysql_select_db(): supplied argument is not a valid MySQL-Link resource in
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 17

Warning: mysql_query()
[function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 24

Warning: mysql_query()
[function.mysql-query]: A link to the server could not be established in
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 24

Warning: mysql_fetch_array():
supplied argument is not a valid MySQL result resource in
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 24
Sorry, username or password was
wrong.

Warning: Cannot modify header information - headers already sent by (output started at
/www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php:14) in
/www/htdocs/bgmabi/cms/wiki/inc/auth.php on line 244

Warning: Cannot modify header information -
headers already sent by (output started at /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class.
php:14) in /www/htdocs/bgmabi/cms/wiki/inc/actions.php on line 131
Sorry, username or password was
wrong.


mit include_once("../configuration.php"); bekomme ich diesen fehler:

Warning:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/www/htdo...
 
ruflin 2008-01-13 14:41:21
 
Hier nun der neue Hint:
http://ruflin.com/hints/dokuwiki-bridge-fur -joomla-1.0.12_de.html
 
ruflin 2008-01-13 14:23:29
 
Hallo Ulrich

Mit Jommla 1.0.12 funktioniert die Bridge nicht. Aber habe auch eine Version für
1.0.12 geschrieben. Werde diese sogleich posten.

Bei dir scheint aber noch ev. der inlucde path
für die Zugangsdaten zu Datenbank falsch zu sein. Diese Zeile:


include_once("../configuration.php");
 
Ulrich Lichtenegger 2008-01-13 14:16:58
 
Achja, ich wollt ja noch ein paar infos posten:

ich benutze J1.0.12,
Dokuwiki frisch
installiert in der neuesten version.
 
Ulrich Lichtenegger 2008-01-13 14:14:52
 
hi! danke für die implementierung, wär super wenns klappen würde!
leider bekomme ich momentan
folgende fehlermeldung, obwohl ich eigetnlich meine ziemlich nach der anleitung vorgegangen zu
sein.
hier meine fehlermeldung:
Warning: mysql_fetch_array(): supplied argument is not a valid
MySQL result resource in /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php on line 24
Sorry,
username or password was wrong.

Warning: Cannot modify header information - headers already sent
by (output started at /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class. php:24) in
/www/htdocs/bgmabi/cms/wiki/inc/auth.php on line 244

Warning: Cannot modify header information -
headers already sent by (output started at /www/htdocs/bgmabi/cms/wiki/inc/auth/joomla.class.
php:24) in /www/htdocs/bgmabi/cms/wiki/inc/actions.php on line 131
Sorry, username or password was
wrong.




adresse zu meiner seite: bgm-abi08.de
zum wiki: bgm-abi08.de/cms/wiki
zum joomla:
bgm-abi08.de/cms


hast du eine idee, an was das liegen kann?
danke für die hilfe!
 
Write comment
Name:
Email:
 
Title:
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow:
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."