Hi,
I have a site that run on php4 and I recently switched to different server, once I moved, the script not working properly, but nothing change on the script and I check the permission, mysql table all the same.
The problem is in browser, if I call something like http://www.mysite.com/whatever.php then it works perfectly.
but if some link like http://www.mysite.com/index.php?cmd=5, then it not working, just reload the same page without any error, but it works on the old server.
I think is something about the server setting or .htaccess file, but I don't have .htaccess for that site.
I check the cpanel and can't any setting that may affact that.
Could some php expect here tell me what is wrong and why cause that?
Thanks a lot !
urgently help needed : php script not working.!
Moderator: General Moderators
-
mapperkids
- Forum Newbie
- Posts: 15
- Joined: Mon Feb 11, 2008 8:53 pm
Re: urgently help needed : php script not working.!
Register globals are turned off on your new server.
-
mapperkids
- Forum Newbie
- Posts: 15
- Joined: Mon Feb 11, 2008 8:53 pm
Re: urgently help needed : php script not working.!
how to turn it on?
put in .htaccess file?
thanks
put in .htaccess file?
thanks
Re: urgently help needed : php script not working.!
Register Globals is a php.ini setting that allows get and post vars to automatically be converted. If it is the issue, paste this at the top of your code:
you should seriously consider recoding your project to use $_GET and $_POST, instead of relying on this, however.
Code: Select all
// Extract GET //
if(!empty($_GET)) { extract($_GET); }
elseif(!empty($HTTP_GET_VARS)){ extract($HTTP_GET_VARS); }
// Extract POST //
if(!empty($_POST)) { extract($_POST); }
elseif(!empty($HTTP_POST_VARS)) { extract($HTTP_POST_VARS); }
Re: urgently help needed : php script not working.!
Temp Fix:mapperkids wrote:how to turn it on?
put in .htaccess file?
thanks
.htaccess
Code: Select all
php_flag register_globals on- ajay1kumar1
- Forum Newbie
- Posts: 2
- Joined: Fri Feb 15, 2008 3:14 am
Re: urgently help needed : php script not working.!
Please use
register_long_arrays = On
in your php.ini
Ajay

register_long_arrays = On
in your php.ini
Ajay
- markusn00b
- Forum Contributor
- Posts: 298
- Joined: Sat Oct 20, 2007 2:16 pm
- Location: York, England
Re: urgently help needed : php script not working.!
He/She may not have access to the php.ini file.ajay1kumar1 wrote:Please use
register_long_arrays = On
in your php.ini
Ajay
- ajay1kumar1
- Forum Newbie
- Posts: 2
- Joined: Fri Feb 15, 2008 3:14 am
Re: urgently help needed : php script not working.!
if can't access php.ini then you can use this in .htaccess
register_globals = On
register_long_arrays = On
register_argc_argv = On
Please reply here if you want something else
Regards
Ajay kumar singh
register_globals = On
register_long_arrays = On
register_argc_argv = On
Please reply here if you want something else
Regards
Ajay kumar singh