PHP forum

Variable expansion not working anymore

Nov 13, 2010 10:29 pm
Johannes Bauer

Hello group,

I use variable expansion like

<?=$HTTP_POST_VARS["foo"]?>

in some of my scripts. After updating to 5.3.3 (and possibly some
php.ini configuration updates), this expansion stopped working (it is
just put in literally into the document).

Since I do not know what that type of expansion is called and searches
for "php <?=$" were not really successful, I'd like to know: Is this
deprecated? If not, how do I reenable it?

Kind regards,
Johannes

>> Wo hattest Du das Beben nochmal GENAU vorhergesagt?
> Zumindest nicht ?ffentlich!
Ah, der neueste und bis heute genialste Streich unsere gro?en
Kosmologen: Die Geheim-Vorhersage.
- Karl Kaos ?ber R?diger Thomas in dsa <hidbv3$om2$1@speranza.aioe.org>
Nov 13, 2010 10:58 pm
Gregor Kofler
Re: Variable expansion not working anymore

Am 2010-11-13 23:29, Johannes Bauer meinte:
> Hello group,
>
> I use variable expansion like
>
> <?=$HTTP_POST_VARS["foo"]?>
>
> in some of my scripts. After updating to 5.3.3 (and possibly some
> php.ini configuration updates), this expansion stopped working (it is
> just put in literally into the document).
>
> Since I do not know what that type of expansion is called and searches
> for "php <?=$" were not really successful, I'd like to know: Is this
> deprecated? If not, how do I reenable it?

The setting short_open_tag is disabled [1].
Either enable it in your php.ini or - much better - switch to proper
notation (in your case replace the <?= ... ?> with <?php echo ... ?>).

Gregor


[1]
http://php.net/manual/en/ini.core.php

http://vxjs.gregorkofler.com
Nov 14, 2010 1:11 am
Denis McMahon
Re: Variable expansion not working anymore

On 13/11/10 22:29, Johannes Bauer wrote:
> Hello group,
>
> I use variable expansion like
>
> <?=$HTTP_POST_VARS["foo"]?>
>
> in some of my scripts. After updating to 5.3.3 (and possibly some
> php.ini configuration updates), this expansion stopped working (it is
> just put in literally into the document).
>
> Since I do not know what that type of expansion is called and searches
> for "php <?=$" were not really successful, I'd like to know: Is this
> deprecated? If not, how do I reenable it?

It wouldn't be something as simple as:

<?php echo $ARRAY_NAME["key"]; ?>

would it?

Rgds

Denis McMahon


Nov 14, 2010 4:03 am
Magno
Re: Variable expansion not working anymore

On 11/13/2010 07:29 PM, Johannes Bauer wrote:
> Hello group,
>
> I use variable expansion like
>
> <?=$HTTP_POST_VARS["foo"]?>
>
> in some of my scripts. After updating to 5.3.3 (and possibly some
> php.ini configuration updates), this expansion stopped working (it is
> just put in literally into the document).
>
> Since I do not know what that type of expansion is called and searches
> for "php<?=$" were not really successful, I'd like to know: Is this
> deprecated? If not, how do I reenable it?
>
> Kind regards,
> Johannes
>

I think I heard (or read) they are deprecated, perhaps. Or I think that
not recommended.
...I guess.




Previous Thread: Store backslash in mysql database
Next Thread: Website url as input how to create and save image on server in php?

Related Forum Topics
Setting local variable also sets SESSION variable with same name
This is troubling:

echo "SESSION user is: " . $_SESSION['user'];

if (isset($_GET['user'])) { // firstpass
$user = $_GET['user'];
$name = fGetRealName($user);
echo "<br /> firstpass, SESSION user is now: " . $_SESSION['user'];

results in:
SESSION user is: wpd
firstpass, SESSION...
Assigning a php variable to a jquery variable?
Hi,
How to assign a php variable in a jquery variable . can anyone help
me out.Thanks .

Regards
Venkat


Sql query not working
Hello,

I have the following sql line

$query = "select * from codes where " . user_code . "= binary " . "'"
. $result1 . "'" . "&&" . user_password . "= binary " . "'" . $result2
. "'" . "&&" . demo . "='yes'";

which works fine but if I use

. demo . "!='yes'

when a demo field in...
Defines not working
I have the following style of define in my code and they appear not to work:

define('myPrefix','Prefix') ;
define('item_1',myPrefix.'_1') ;
etc ...

The second define exapnds as myPrefix_1 instead of Prefix_1, any suggestions
what I am doing wrong?
Thanks,
Sid.



ODBC not working with PHP under Eclipse
Hi,
I'm trying to debug a simple page of PHP under Eclipse, with Zend
debugger.
I'm working on a local machine with Windows XP, IIS and SqlServer.

The problem is:
- if I run the PHP script directly from a browser, it's all OK (I can
connect to a db using odbc and execute queries).
- if I...
Session stopped working?
I've been using FF2.n in developing a hideously complex FAMP app.
Last week, session seemed to stop working for no good reason. I
went into my zen-of-debugging mode, and investigated everything
in greater and greater depth, feeling sure I was somehow stepping
on something without realising...
Code Stops Working
I have assumed ownership of a site that has a lot of PHP code - and I
don't have much experience with the language and environment. The site
is:

www.raceplaceevents.com

The situation is that I've made a small change to one of the sub-
pages that seems to render it not working. ...
More with imagettfbbox(); absolute url not working?
I'm still working with imagettfbbox(). The problem I'm having now is
that I can't seem to refer to the TTF file unless it's in the actual
directory as the index.php file; if I give a relative or absolute
path, I'm getting an error:

Warning: imagettfbbox() [function.imagettfbbox]: Could not...
Session Not Working In Folders?
Hi,

I have index.php on root.
Session register using $_session['user']

and redirected to abc/demo.php

but on this location abc/demo.php session not working.
session not working in directories .

is that any setting in php.ini or anything?

Same thing working on local(xampp) but on...
Simple Html Php Form not working
Hi,

I'm new to Php, I understand basic coding things related to variable, loops, functions... more client side. I would like a contact or comments form on my website http://multiskillz.tekcities.com

The page where the form is is there http://multiskillz.tekcities.com/index99_comments.php or...