| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | Some of you may have the Domain Seller Pro Script shown here: www.domainsellerpro.com If your script WAS working fine, but now it doesn't work (eg, you can't log into admin, links dont work, etc), there is a reason for it. It is because your host has upgraded to PHP5 and now the way global variables are addressed is different. The hard fix is to replace $a with $_GET['a'] in the admin.php file etc. (I will note here that I tried that, and it still didn't work, so I must have missed something) Here is the EASY fix: Instead of rewriting all the code (re: (2) below), what you need is a php.ini file in your directory (only in the www directory where your other domainsellerpro files are). Open notepad, Save the file as php.ini and upload it. The php.ini file should read simply: register_globals = On ______________ Some more reading on all of this: (1)http://drupal.org/node/210311 (2)http://www.issociate.de/board/post/2...ariables!.html So it is a 2 minute fix, real simple. Leave all your original php files the same, no changes required. Good luck all.
__________________ http://nicster.com |
| |
| | #2 (permalink) |
| NamePros Regular | 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 12:50 AM. |
| |
| | #3 (permalink) |
| NamePros Regular | Thanks very much Palyriot. 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.
__________________ http://nicster.com |
| |
| | #5 (permalink) | |
| NamePros Regular | Quote:
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.
__________________ http://nicster.com | |
| |
| | #6 (permalink) | |
| NamePros Regular | Quote:
-
__________________ Patience is your best friend in this business! (© by Gene) | |
| |
| | #9 (permalink) | |
| NamePros Regular | Quote:
| |
| |
| | #10 (permalink) | |
| NPQ's PA, Slave, and On Call Coder Technical Services | Quote:
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.
__________________ | |
| |
| | #11 (permalink) | |
| NamePros Regular | Quote:
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.
__________________ http://nicster.com | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |