joomla configuration

View: New views
9 Messages — Rating Filter:   Alert me  

joomla configuration

by Brian O'Connor-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Guys

This is slightly off topic but I don't know where else to turn.

I just inherited a client who had their site developed in Joomla, and when it came time for the developer to turn over the access things apparently went south and the administrative password for Joomla was never given to the client.  Now, he can't update his site.  He has access to the server with all the source code, so I'm relatively sure the password can be reset.  However, I'm having trouble finding the variables I need in order to connect tot he database and reset the variables.

where do I look in order to find out what database information the site is using, and once I find that file, what specific variables am I supposed to look at?

Thanks in advance,
Brian O'Connor

--
Brian O'Connor

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: joomla configuration

by John Campbell-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think there is a file called database.mysql.php, but I bet you could
grep for 'localhost', and I am sure you will find the file quickly
(assuming it is set to connect to localhost).

try: grep -R -C 4 localhost *

To recover the admin password, see:
http://www.google.com/search?q=joomla+recover+admin+password

Regards,
John Cambpell

On Thu, Nov 5, 2009 at 7:42 PM, Brian O'Connor <gatzby3jr@...> wrote:

> Hey Guys
>
> This is slightly off topic but I don't know where else to turn.
>
> I just inherited a client who had their site developed in Joomla, and when
> it came time for the developer to turn over the access things apparently
> went south and the administrative password for Joomla was never given to the
> client.  Now, he can't update his site.  He has access to the server with
> all the source code, so I'm relatively sure the password can be reset.
> However, I'm having trouble finding the variables I need in order to connect
> tot he database and reset the variables.
>
> where do I look in order to find out what database information the site is
> using, and once I find that file, what specific variables am I supposed to
> look at?
>
> Thanks in advance,
> Brian O'Connor
>
> --
> Brian O'Connor
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: joomla configuration

by Mitch Pirtle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Take a look in configuration.php and grab the following variables:

    $host
    $user
    $db
    $password

That is your database access information. Now to change your admin
password. When you connect to your database, go to a table called
jos_users and look for the admin user:

    select id, name, username, password from jos_users;

Somewhere in those results should be a user called 'admin' in the
'username' column. Now change that password to 'changeme' like this,
and note that I had to run the string 'changeme' through MD5 first as
all passwords in Joomla are hashed:

    update jos_users set password = '4cb9c8a8048fd02294477fcb1a41191a'
where username = 'admin';

Now you can login to the Joomla backend as admin / changeme, and
IMMEDIATELY change your password.

-- Mitch

On Thu, Nov 5, 2009 at 7:42 PM, Brian O'Connor <gatzby3jr@...> wrote:

> Hey Guys
>
> This is slightly off topic but I don't know where else to turn.
>
> I just inherited a client who had their site developed in Joomla, and when
> it came time for the developer to turn over the access things apparently
> went south and the administrative password for Joomla was never given to the
> client.  Now, he can't update his site.  He has access to the server with
> all the source code, so I'm relatively sure the password can be reset.
> However, I'm having trouble finding the variables I need in order to connect
> tot he database and reset the variables.
>
> where do I look in order to find out what database information the site is
> using, and once I find that file, what specific variables am I supposed to
> look at?
>
> Thanks in advance,
> Brian O'Connor
>
> --
> Brian O'Connor
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Unseralize help needed.

by Hall, Leam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Morning all!
 
I've been working on the "pull an array from a file" again and trying to implement the "unserialize" suggestion. Cant seem to make it work. Here's the draft:
 
####
 
echo "fred";
$my_info = array('me' => 'mi', 'myself' => 'numerouno',  'i' => 'id' );
$fred = serialize($my_info);
$my_file = fopen( '/tmp/me.ser', 'w');
fwrite($my_file, $fred);
fclose($my_file);
echo "<p> $fred.";
$new_fred = array();
$new_fred_line = file_get_contents('/tmp/me.ser');
echo "<p>$new_fred_line is here.";
$new_fred = unserialize($new_fred_line);
$new_fred_me = $new_fred['me'];
echo "<p> new_fred is $new_fred. ";
####
 
Produces:
 
####
 
fred

a:3:{s:2:"me";s:2:"mi";s:6:"myself";s:9:"numerouno";s:1:"i";s:2:"id";}.

a:3:{s:2:"me";s:2:"mi";s:6:"myself";s:9:"numerouno";s:1:"i";s:2:"id";} is here.

new_fred is Array.

 

####

 

Trying to get $new_fred to be an array and duplicate of $my_info. Thoughts?

Leam


_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: Unseralize help needed.

by Andy Dirnberger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 6, 2009 at 12:50 PM, Hall, Leam <lhall@...> wrote:

> Morning all!
>
> I've been working on the "pull an array from a file" again and trying to
> implement the "unserialize" suggestion. Cant seem to make it work. Here's
> the draft:
>
> ####
>
> echo "fred";
> $my_info = array('me' => 'mi', 'myself' => 'numerouno',  'i' => 'id' );
> $fred = serialize($my_info);
> $my_file = fopen( '/tmp/me.ser', 'w');
> fwrite($my_file, $fred);
> fclose($my_file);
> echo "<p> $fred.";
> $new_fred = array();
> $new_fred_line = file_get_contents('/tmp/me.ser');
> echo "<p>$new_fred_line is here.";
> $new_fred = unserialize($new_fred_line);
> $new_fred_me = $new_fred['me'];
> echo "<p> new_fred is $new_fred. ";
> ####
>
> Produces:
>
> ####
>
> fred
>
> a:3:{s:2:"me";s:2:"mi";s:6:"myself";s:9:"numerouno";s:1:"i";s:2:"id";}.
>
> a:3:{s:2:"me";s:2:"mi";s:6:"myself";s:9:"numerouno";s:1:"i";s:2:"id";} is
> here.
>
> new_fred is Array.
>
>
>
> ####
>
>
>
> Trying to get $new_fred to be an array and duplicate of $my_info. Thoughts?
>
> Leam
>

Have you tried do a print_r with $new_fred? Calling echo $ARRAY_VAR
will output "Array."

echo "<p> new_fred is " . print_r($new_fred, true) . ". ";
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: Unseralize help needed.

by drydell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

$new_fred is an array... that's exactly what you'd get if you echo an array. Try var_dump($new_fred) or print_r($new_fred) and you'll see what's in the array...

----- Original Message -----
From: "Hall, Leam"
Date: Friday, November 6, 2009 12:50 pm
Subject: [nyphp-talk] Unseralize help needed.
To: NYPHP Talk

> Morning all!
>
> I've been working on the "pull an array from a file" again and
> trying to implement the "unserialize" suggestion. Cant seem to
> make it work. Here's the draft:
>
> ####
>
> echo "fred";
> $my_info = array('me' => 'mi', 'myself' => 'numerouno', 'i' =>
> 'id' );
> $fred = serialize($my_info);
> $my_file = fopen( '/tmp/me.ser', 'w');
> fwrite($my_file, $fred);
> fclose($my_file);
> echo "

$fred.";
> $new_fred = array();
> $new_fred_line = file_get_contents('/tmp/me.ser');
> echo "

$new_fred_line is here.";
> $new_fred = unserialize($new_fred_line);
> $new_fred_me = $new_fred['me'];
> echo "

new_fred is $new_fred. ";
>
> ####
>
> Produces:
>
> ####
>
> fred
> a:3:{s:2:"me";s:2:"mi";s:6:"myself";s:9:"numerouno";s:1:"i";s:2:"id";}.
> a:3:{s:2:"me";s:2:"mi";s:6:"myself";s:9:"numerouno";s:1:"i";s:2:"id";} is here.
> new_fred is Array.
>
> ####
>
> Trying to get $new_fred to be an array and duplicate of
> $my_info. Thoughts?
> Leam
>

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: Unseralize help needed.

by Hall, Leam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah...
 
$issue = let_medicine_take_effect($cold_stuff);
 
Thanks!
 
Leam


From: drydell@...
Sent: Fri 11/6/2009 12:59 PM
To: NYPHP Talk
Subject: Re: [nyphp-talk] Unseralize help needed.

$new_fred is an array... that's exactly what you'd get if you echo an array. Try var_dump($new_fred) or print_r($new_fred) and you'll see what's in the array...

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: joomla configuration

by Brian O'Connor-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
 
Sorry for the late reply, there was something wrong with the phpMyAdmin setup on the server.
 
I changed the md5 hash of the password to what you gave me (as well as other strings as well), but I'm getting an incorrect username / password.
 
Is there something else in the user table that would prevent the admin from logging in?
 
Thanks,
Brian

On Thu, Nov 5, 2009 at 10:26 PM, Mitch Pirtle <mitch.pirtle@...> wrote:
Take a look in configuration.php and grab the following variables:

   $host
   $user
   $db
   $password

That is your database access information. Now to change your admin
password. When you connect to your database, go to a table called
jos_users and look for the admin user:

   select id, name, username, password from jos_users;

Somewhere in those results should be a user called 'admin' in the
'username' column. Now change that password to 'changeme' like this,
and note that I had to run the string 'changeme' through MD5 first as
all passwords in Joomla are hashed:

   update jos_users set password = '4cb9c8a8048fd02294477fcb1a41191a'
where username = 'admin';

Now you can login to the Joomla backend as admin / changeme, and
IMMEDIATELY change your password.

-- Mitch

On Thu, Nov 5, 2009 at 7:42 PM, Brian O'Connor <gatzby3jr@...> wrote:
> Hey Guys
>
> This is slightly off topic but I don't know where else to turn.
>
> I just inherited a client who had their site developed in Joomla, and when
> it came time for the developer to turn over the access things apparently
> went south and the administrative password for Joomla was never given to the
> client.  Now, he can't update his site.  He has access to the server with
> all the source code, so I'm relatively sure the password can be reset.
> However, I'm having trouble finding the variables I need in order to connect
> tot he database and reset the variables.
>
> where do I look in order to find out what database information the site is
> using, and once I find that file, what specific variables am I supposed to
> look at?
>
> Thanks in advance,
> Brian O'Connor
>
> --
> Brian O'Connor
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation



--
Brian O'Connor

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Re: joomla configuration

by Brian O'Connor-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah, sorry for double/quick/self replying post.  Apparently they set up a table prefix and it wasn't jos_users, but <prefix>_users.
 
Thank you very very very much for your help!

On Tue, Nov 10, 2009 at 1:08 PM, Brian O'Connor <gatzby3jr@...> wrote:
Hello,
 
Sorry for the late reply, there was something wrong with the phpMyAdmin setup on the server.
 
I changed the md5 hash of the password to what you gave me (as well as other strings as well), but I'm getting an incorrect username / password.
 
Is there something else in the user table that would prevent the admin from logging in?
 
Thanks,
Brian

On Thu, Nov 5, 2009 at 10:26 PM, Mitch Pirtle <mitch.pirtle@...> wrote:
Take a look in configuration.php and grab the following variables:

   $host
   $user
   $db
   $password

That is your database access information. Now to change your admin
password. When you connect to your database, go to a table called
jos_users and look for the admin user:

   select id, name, username, password from jos_users;

Somewhere in those results should be a user called 'admin' in the
'username' column. Now change that password to 'changeme' like this,
and note that I had to run the string 'changeme' through MD5 first as
all passwords in Joomla are hashed:

   update jos_users set password = '4cb9c8a8048fd02294477fcb1a41191a'
where username = 'admin';

Now you can login to the Joomla backend as admin / changeme, and
IMMEDIATELY change your password.

-- Mitch

On Thu, Nov 5, 2009 at 7:42 PM, Brian O'Connor <gatzby3jr@...> wrote:
> Hey Guys
>
> This is slightly off topic but I don't know where else to turn.
>
> I just inherited a client who had their site developed in Joomla, and when
> it came time for the developer to turn over the access things apparently
> went south and the administrative password for Joomla was never given to the
> client.  Now, he can't update his site.  He has access to the server with
> all the source code, so I'm relatively sure the password can be reset.
> However, I'm having trouble finding the variables I need in order to connect
> tot he database and reset the variables.
>
> where do I look in order to find out what database information the site is
> using, and once I find that file, what specific variables am I supposed to
> look at?
>
> Thanks in advance,
> Brian O'Connor
>
> --
> Brian O'Connor
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation



--
Brian O'Connor



--
Brian O'Connor

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation