Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2016-05-08, 10:41 AM   #1
Pagan
Perverted Empress
 
Pagan's Avatar
 
Join Date: Feb 2005
Location: Finland
Posts: 5,068
PC's old sites are reading the data from the location he gave them when he set the application up to begin with. All DB-driven apps do this, including WordPress, TGPx, and so very many others. For example, my host does not even give FTP access to the SQL database, nor can I even see it from the file manager on the control panel. Only a very special few ever get to see those files because they are so vital. BUT... magically, if I go into myPHP, there they all are -- all 9 databases. Which one goes to which? I will never ever tell. For example, TGPx has an install.php file that collects this info when you first install it, but it tells you to delete it after it has done its work. WordPress does much the same thing.



What you have going on here is someone saying, *I live at 123 Main Street" but not showing you what city, area, postal code, or anything else. There is a document out there that has this information for you. Likewise, computers have maps to where all the files are kept. Servers have to know where your files are located, just like following any other pathway for any type of file. Because of the type of file, you also need to use the correct server app to see it from your control panel. The little screenshot above is from MyPhp. I see the same list but presented a little different if I go into MySQL.

If it is php, try looking for a config.php or install.php. There is a call out or a reference to that database somewhere. While everyone's servers are different, this is pretty much a constant and has been for a good number of years. SQL databases are not downloadble via FTP. You can export them to a file and then download that file but you are not downloading the actual database. Far different world from HTML, believe me.
__________________
Is it naptime yet?
Pagan is online now   Reply With Quote
Old 2016-05-08, 01:44 PM   #2
ecchi
Banned
 
ecchi's Avatar
 
Join Date: Oct 2003
Location: About to be evicted!!!!
Posts: 4,082
Quote:
Originally Posted by Pagan View Post
PC's old sites are reading the data from the location he gave them when he set the application up to begin with..
First thing I did was go into his PHP scripts and find the host name, username and password. He has a nice, easy to read config file which gives me the data his script uses to find and log on to the database. Trouble is the hostname is "localhost", which means it is on my server, but there is no database with the username and password that his script is using on my server!. And if you go in via MySQL control, there is a different database with a different username and password listed - but this database is empty, there is absolutely no data in that database whatsoever! But the scripts still chortle along, drawing data from God knows where.

I'm no expert at PHP, so I'm trying to write a Perl script that does what you suggest in PHP. However the problem is, I don't know the correct MySQL syntax, I'm learning as I go along, and it is bloody easy for me to make a mistake and mess everything up. For example, some types of databases destroy an entry after reading it, so you have to issue a read command, then a write command BEFORE you tell it to show you what it read, or you loose the data. I don't think MySQL does this, but the key word is "think" not "know". And there are probably a thousand other ways I can screw it up too!

So far I have written a script that searches out database tables and returns the table names. I've set up a new database on another domain simply to test it, and it seems to work. But so far I have not had the courage to run it on ClitPass, I want to test it some more on unimportant databases first.
ecchi is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:27 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc