Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 8 of 8

This is a discussion on Just a few ?'s in the Shared & Semi-Dedicated forum
I may be blind, but does JaguarPC keep and allow us to view SQL logs? If so, is that available from the CP? Also, is ...

  1. #1
    JPC Senior Member
    Join Date
    Oct 2003
    Location
    Alaska
    Posts
    82

    Just a few ?'s

    I may be blind, but does JaguarPC keep and allow us to view SQL logs? If so, is that available from the CP?

    Also, is there a PHP server variable that returns the name of the current URL location? Or do I need to creat a variable inside the script with the name of the file or location?

    Thank you for your help.
    "Play the best song in the world, or I'll eat your soul."
    I am a D fan in the arctic wastes of Alaska.

  2. #2
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Hrm... I don't know if MySQL logging is even turned on...

    I'll check it out when I get home.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    I was just thinking, have you tried doing 'whereis mysqld.log' yet?
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  4. #4
    Smo
    Smo is offline
    JPC Addict
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    218
    Quote Originally Posted by kornmonkie
    Also, is there a PHP server variable that returns the name of the current URL location? Or do I need to creat a variable inside the script with the name of the file or location?

    PHP Code:
    $PHP_SELF 
    should do the trick on subdomains it seems to give random responses to me. eather /subdomain/file.php or just file.php

  5. #5
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Depending on your setup you may have to use $_SERVER['PHP_SELF'] (that's the more secure way to do it, besides ), but just $PHP_SELF will probably work. If you find PHP_SELF to be inconsistant, you could try SCRIPT_NAME or REQUEST_URI as well; they should all have the same values.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  6. #6
    JPC Senior Member
    Join Date
    Oct 2003
    Location
    Alaska
    Posts
    82
    Thank you...

    Both $_SERVER['PHP_SELF'] and $PHP_SELF do what I needed.

    Also, there's a .mysql_history file that does have some past SQL stuff, but it seems like the entries in the file are from an old project.

    I figured if Jag didn't have any SQL logs, I could just make them myself with a database.

    Thanks again for the variables, they will really help.
    "Play the best song in the world, or I'll eat your soul."
    I am a D fan in the arctic wastes of Alaska.

  7. #7
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I'm not positive, but the "history" file is probably just a list of commands that you've typed at the mysql> prompt, similar to the .bash_histroy file that keeps track of your last x command entries so that you can press the up and down arrows to recall what you've previously typed.

    If the MySQL logs are kept they are probably (unfortunately) kept in a place that you can't access with JailShell, just like the HTTP logs. I used to like being able to shell in and grep through my logs, especially when I was doing testing. Now I have download them by hand or rely on the recent errors page of cpanel.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  8. #8
    JPC Senior Member
    Join Date
    Oct 2003
    Location
    Alaska
    Posts
    82
    Thanks for your help..

    I made a little script that would add the info from a submitted form into a secondary database.

    Since it's not possible to view the logs of the SQL database, I wanted a way to check the info that people were submitting via the forms on my site.

    I took the form submitted data and filtered it for SQL injections.

    Then I just took $_SERVER['PHP_SELF'] for the current PHP page (thank you!), $_SERVER['REMOTE_ADDR'] for the IP, and the filtered data from the form and inserted the info to a seperate database from the one I am using for my login information.

    I guess if one database is unsecure and injectable, then the one with the stored form info may be as well, but it's the best I can do given what I got.
    "Play the best song in the world, or I'll eat your soul."
    I am a D fan in the arctic wastes of Alaska.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •