Apache and ubuntu

Schiz0 schiz0phrenic21 at gmail.com
Tue Jan 15 17:57:33 UTC 2008


On Jan 15, 2008 12:15 PM, Mike Dugger <manifold at golfront.org> wrote:
> At 05:43 PM 1/14/2008 -0500, Schiz0 wrote:
> >On Jan 14, 2008 5:33 PM, Mike Dugger <manifold at golfront.org> wrote:
> > > Hello,
> > >
> > > My system consists of ubuntu 7.10, Apache 2.2.4 and PHP 5.2.1
> > >
> > > I have installed Apache, PHP and MySql for my education/entertainment in
> > > learning a bit about web design. The setup was working fine until I
> > > upgraded from 7.04 to 7.10. Now php functions within html will not run,
> > > while .php scripts run fine.
> >
> >If the php tags embedded into HTML aren't proper (Like "<?php" and
> >"?>"), they you should enable the "short_open_tag" option in your
> >php.ini file.
> >
> >As for starting/stopping apache, use the script "/etc/init.d/apache2"
>
> I'm not sure what you mean here. When testing my setup I simply inserted
> a function: <? phpinfo(); ?>  within an html file. The regular html is rendered
> properly, but the function isn't being processed. Does that indicate that I
> should enable "short_open_tag" in php.ini?
>
> Sorry to be so clueless, but I just assumed (I know) that with php running in
> conjuction with apache that the function would simply be passed from apache
> to php and then apache would serve the result. If I simply save that
> function in
> a .php file and open it with a browser at "http://localhost/testphp.php" I
> get the
> expected result.
>
> Thanks for your response in any event.
>
>
> - Mike
>
>

Proper php tags are like so:
<?php
    some_php_function();
?>

But there is an extremely common shortcut to the tags, like so:
<?
   some_php_function();
?>

The short_open_tag setting controls if php recognizes those shortcuts or not.




More information about the ubuntu-users mailing list