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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.