• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PHP URL parameter not being read...?

E

EnigmaBurn

Guest
I don't know if this has to do with the php_safe_mode, which is off or the register_globals, which is also off, but I have a PHP based site that worked on other servers just fine, but now is not working on the Plesk server after being copied over.

See: Site here

You are supposed to be able to click the links at left for rentals, businesses, etc.. for the different catergories, but all we get is the house - which is a default. It doesn't seem to be reading the 'type=C' or whatever parameter from the URL string...?

Any thoughts as to why and tips to fix? Works fine on other servers, but I am not privvy to their settings...

Thanks in advance!

EB -
 
How are you calling the variables? Are you using $_GET or $HTTP_GET_VARS ? If you're calling the variables directly (ie using $for instead of $_GET['for']) you need to remember that since PHP 4.2.0 the register_globals have been turned off by default. I know that Plesk's PHP comes with it turned off. It may very well be that the other servers are just running older versions of PHP
http://us3.php.net/register_globals

If you need to find out the configuration settings on a server, and you have at least FTP access, put up a file with nothing but the following
PHP:
<?php phpinfo(); ?>
That will dump out all the settings you need to see.
 
You are correct sir!

Highlander:

You are of course correct as I can make stuff work by using the $_GET syntax. Problem is I got a whole system that was coded without using that method. I assume that if I turn register_globals on that I would have to worry about recoding the entire system...?

Problem is that I cannot get register_globals to turn on! :mad:

I tried doing it in the same way ad7742 describes in THIS THREAD ...

But adding the line:
php_admin_value register_globals on

to the vhost.conf file does nothing.
:confused:

Any help that you or anyone else can offer in this regard would be lovely.
 
There's another method that might work too. If you have an include file (like a config or something) you can try adding the following
PHP:
<?php ini_set("register_globals", 1); ?>
 
Back
Top