| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Closed Join Date: Jul 2003 Location: CALIF
Posts: 335
![]() ![]() | |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Jul 2004 Location: Seattle, Wa
Posts: 596
![]() ![]() ![]() | Bad advice. Don't enable register_globals. Just make the easy changes. It should take less than 2 minutes to fix the entire script. Enabling register_globals is a bad workaround. Make these changes in admin.php: Only change $a to $_GET["a"] where you see it in an if statement. Such as: PHP Code: PHP Code: PHP Code: You can also download the working admin.php. Just change the filename from admin.txt to admin.php
Last edited by -RJ-; 03-04-2008 at 01:50 AM.
|
| |
| | THREAD STARTER #3 (permalink) |
| Account Closed Join Date: Jul 2003 Location: CALIF
Posts: 335
![]() ![]() | Thanks very much Palyriot. ????: NamePros.com http://www.namepros.com/showthread.php?t=439441 Those changes on the script did not work for me. Specifically, I was able to log into admin ok, whereas I couldn't at all before, but none of the links would work in admin or elsewhere. Are you sure there are not files other than just admin.php that need updating? Such as index.php or others. I am no expert on php, believe me. I guess the concern is that turning Globals on is a security risk, right? Someone could hack the site easily? That was my impression. If that is true, it seems someone would have to really have some time on their hands, and if you keep a backup of all your files, you should be ok I should think. So I guess you are saying that even though my fix works, it is not safe to do so. |
| |
| | THREAD STARTER #5 (permalink) | ||||
| Account Closed Join Date: Jul 2003 Location: CALIF
Posts: 335
![]() ![]() |
I am convinced there is another file or files that need updating for your method to work. Possibly index.php or something. I got tired looking over so much code, though. | ||||
| |
| | #6 (permalink) | ||||
| Member Join Date: Mar 2007
Posts: 1,249
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=439441 -
__________________ █ █ █ | ||||
| |
| | THREAD STARTER #7 (permalink) | ||||
| Account Closed Join Date: Jul 2003 Location: CALIF
Posts: 335
![]() ![]() |
Thanks for taking the time to make your comment. | ||||
| |
| | #9 (permalink) | ||||
| NamePros Regular Join Date: Jul 2004 Location: Seattle, Wa
Posts: 596
![]() ![]() ![]() |
| ||||
| |
| | #10 (permalink) | ||||
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=439441 extract($_GET); extract($_POST); , that's for the current script (in this case, DSP) only. As long as variables are sanitized, etc (which I'm sure RJ took care of - it's his script), everything will be fine. | ||||
| |
| | THREAD STARTER #11 (permalink) | ||||
| Account Closed Join Date: Jul 2003 Location: CALIF
Posts: 335
![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=439441 I have a hostmonster account (multiple domains), running PHP5 (hostmonster has register_globals OFF by default), and so I put the php.ini only with the www directory files for that domain name, not the root account. That's why I thought security was not a big issue. I did not turn register_globals on for my whole server account, just the directory. I was frankly happy that the script worked with this solution. But, taking RJ's tip, I deleted my 'local' php.ini file and put RJ's line of code in config_inc.php, and everything works fine, as he said. | ||||
| |