Jump to content

<?php Tag and Variable Problems


Democreous

Recommended Posts

I've been trying to get PHP5 to work for about 4 hours now.  I've been in and out of .ini files, config files, and all other types I've never heard of before and I'm lost.

Mostly I have two problems that pop out.

1.  I can't use [b]<?[/b] for beginning my php code, instead I have to use [b]<?php[/b] .  I don't wan't to have to change all my old code.  I've tried turning the short version on, but I'm not sure if I'm doing it right.

2.  None of my variables get passed onto different pages.  For example, I usuall would use
[code]<a href="http://whatever.com/some.php?variable=notworking">click</a>[/code]

and retrieve the variable "variable" with the value "notworking" on some.php, the same page the variable was sent from,  but it won't pass the vars.  I mostly just use this for if/else statements.  I tried turning globals on, but I'm not really sure if that will help, or if I even did it correctly.

2.5  I'd like to be able to turn on errors also.

If anyone knows how to do this, please help.  I know it's probably easy as hell to everyone, but I'm pulling my hair out over this.


Thanks,
   - Brian :-\ :-\ :-\ :-\ :-\
Link to comment
https://forums.phpfreaks.com/topic/34820--/
Share on other sites

The be able to use "<?" instead of "<?php" you need to turn on short tags. The other "problem" is that you're used to register_globals being enabled. As of about 3 years ago the default was changed to disabled for this parameter. This is also in the php.ini file. After changing this file you have to restart your webserver process.

Ken
Link to comment
https://forums.phpfreaks.com/topic/34820--/#findComment-164126
Share on other sites

Thanks, but I've been doing that for hours.

I have the tags

short_open_tag = On
and
register_globals = On

I'm wondering if I'm using the wrong file.  I updated this into php.ini-dist, then also copied that file, and renamed it simply php.ini.  Nothing works.  Even after restarting Apache.
Link to comment
https://forums.phpfreaks.com/topic/34820--/#findComment-164134
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.