Log in

View Full Version : PHP Page Access & Edit



jcdesigns
12-28-2011, 09:50 PM
Hello I am trying to determine how to access the Administration page to make changes. If you click on the home page link below you will see the Administration link to the right. All the files are php pages located on a cpanel hosting server and there are many folders with files inside them. Please let me know where the administration page would be located? Thanks

http://skysquaresoccercamp.com/ - home page link

http://www.skysquaresoccercamp.com/index.php?option=com_content&task=view&id=32&Itemid=58 - administration link

baconDelta
01-01-2012, 02:23 AM
well since the administration page is located at


http://www.skysquaresoccercamp.com/index.php?option=com_content&task=view&id=32&Itemid=58


i believe it's in a database. the


?option=com_content&task=view&id=32&Itemid=58

in the url shows that when you go to the administration page, the page content is actually being pulled from a database via a 'get' function.

you'll have to access the database through phpMyAdmin or something similar, then overwrite the data in the correct row to change anything. looks like it would be the row with id equal to 32?(really not sure here)

if you didn't setup the database and don't want to fiddle with posting new data to it i would recommend just going to the administration page, copying the source code, then creating a new page directly on the file system(instead of in the database), paste in the source code, and just edit whatever you want. i'm not entirely sure this would work but i would think so. anyone want to second me on this working?

and actually you wouldn't have to change the links anywhere, you could just setup a redirect in the htaccess file so that whenever someone clicks on 'Administration' regardless of what page they're on, they will be redirected to your new edited page on the file system rather than the old one in the database.

in your htaccess file you would just need to put something like:


RewriteEngine On
RewriteRule ^index.php?option=com_content&task=view&id=32&Itemid=58$ /your_new_page_url.php [L]


this is using mod rewrite though, which is a bit crazy. with this in your htaccess file, every time the administration link is put in the url, it will take them to your_new_page_url.php. it'd be easy to delete the old row in the database so that it's not crawled by spiders anymore. this is kind of a messy fix but it seems to me like it would be the easiest if you don't know how to mess around with the database directly. maybe someone will respond with a less messy way ^_^ honestly i don't see why an administration page has to be in a database unless you have a bunch of administration groups or something. maybe there's a cms in place to change it easily? i don't even know if a cms for the customer is common practice when someone makes your site like this.

anyway hope this helps! i would wait for a second opinion hehe

there might be an easier way, like just editing the content in the database directly, but i have no idea how your database is setup, and i have no experience doing that with entire page content.

traq
01-01-2012, 05:04 AM
is this your website, jcdesigns? Do you not have the username/password for it?
if this is your site, and you've lost your admin password, you can reset it (http://forum.joomla.org/viewtopic.php?t=10985) by editing the database manually - but be careful.

BTW, baconDelta, this site uses Joomla. It's highly counter-productive to rewrite and redirect everything as static pages rather than simply signing in and editing the content.

baconDelta
01-01-2012, 10:20 PM
oh i see.

i just figured they hired someone to do their site for them a while back, and now need to edit something and don't know how to mess with a db. but i understand completely lol my bad. i'm glad you chimed in :D

wow i didn't even see that it says joomla in the source right on the homepage. cue dunce hat.

traq
01-02-2012, 12:09 AM
yeah, the <meta name="generator" ...> tag is the first thing I look for.
Plus, Joomla has all that stupid, clumsy ?option=com_content&task=43h08123&T&*(^RGuh##! crap.

no biggie.

jcdesigns
01-03-2012, 07:12 PM
is this your website, jcdesigns? Do you not have the username/password for it?
if this is your site, and you've lost your admin password, you can reset it (http://forum.joomla.org/viewtopic.php?t=10985) by editing the database manually - but be careful.

BTW, baconDelta, this site uses Joomla. It's highly counter-productive to rewrite and redirect everything as static pages rather than simply signing in and editing the content.
Hello Adrian,

Thanks for your response. I was able to login into the phpmyadmin database and found a slew of tables. I searched thru many of them but could not find the one that linked to the administration page I need to edit. I did a screen shot of the bak_menu so you could check out. I thought maybe its there. Can you please take a look at the tables and determine which one is for the administration page. Here is the link of the screen shot. Also once i determine the correct table do I edit that table which will in term edit the web page or how do I go about editing the web page. Thanks

http://www.jenkinscreativedesigns.com/phpmyadmin.pdf

traq
01-03-2012, 09:33 PM
Did you check out the link in my post? There's a step-by-step description of how you can reset you admin password there.

and, to clarify, I am not suggesting that you edit any of your pages directly from the database - rather, reset your password so you can log in and edit them normally.

jcdesigns
01-03-2012, 10:16 PM
Hello Andrian,

I found the admin password from jos_users. From this point how do I login and edit them normally? Thanks

traq
01-03-2012, 11:26 PM
Have you ever used Joomla before?
Check out their beginner's resources (http://docs.joomla.org/Beginners).

baconDelta
01-04-2012, 12:20 AM
jcdesigns,

traq is referring to your joomla login, not your phpmyAdmin login. since your site uses joomla, it should have a control panel, usually accessible somewhere along the lines of www.mywebsite.com/joomla/administrator.

although with your site i don't see such a page.

traq do you know if it's possible to create the site with joomla but then remove the joomla control panel while still keeping the site intact?

edit: the company hired to do the site could have edited just one line of code somewhere amongst the huge load of code that is joomla, and that one edit could keep the login from being accessible. at least it seems like that could be the problem. or worse they took off the joomla control panel all together once they were done.

traq
01-04-2012, 02:05 AM
traq do you know if it's possible to create the site with joomla but then remove the joomla control panel while still keeping the site intact?

edit: the company hired to do the site could have edited just one line of code somewhere amongst the huge load of code that is joomla, and that one edit could keep the login from being accessible. at least it seems like that could be the problem. or worse they took off the joomla control panel all together once they were done.

That is possible, and unfortunately not unheard of.
But, Since joomla is free, it would be possible to backup the database (content) and make a fresh installation of the cms itself.

HOWEVER, if you aren't completely sure of what I'm talking about, you should not try. You would need to hire someone.

jcdesigns
01-04-2012, 09:03 PM
Thanks for your help.

I do not see a Joomla control panel. If you look at this link below it contains the server information that contains all of the files. It only reference php and mysql but nothing about Joomla. Maybe they somehow removed it altogether.

What should I tell my client to get from the web programmer/master that built this website to access the Joomla program. Thanks

http://www.jenkinscreativedesigns.com/serverinfo.pdf

baconDelta
01-06-2012, 06:06 AM
you can ask the webmaster if they removed the joomla cms after creating the site, or just disabled the login page. although this will make you sound like you don't know what you're doing.

what you SHOULD do is what traq said, backup the database then install joomla fresh. i guess a sensible question to ask would be what version of joomla they used. at least that should bring you as close as possible to how it was before.

so find out what version of joomla they used,
backup the database,
install the correct version of joomla fresh.

but seriously like traq said this is NOT easy. it's a huge pain in the ass.

honestly traq at this point my first idea is starting to sound pretty good lol. this guy's in a pickle.