For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > October 2007 > Re: [PHP-INSTALL] Shows code instead of info when calling PHP from Ajax









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] Shows code instead of info when calling PHP from Ajax
Matthew Marino

2007-10-12, 7:03 pm

Could also be as simple as not having the <?php ?php> tags? You =20
mentioned having your code "checked" but I'm not sure what you mean =20
by that. If you're saying that you can run the script directly but it =20=

fails when called via Ajax you're off my chart.

Unless it's getting passed to a different instance of the apache =20
server or somehow the tag is getting the browser to try and parse the =20=

file directly rather than handing it to the apache server process =20
i.e. make sure references are explicitly "http://..."

On Oct 12, 2007, at 8:48 AM, Keith Roberts wrote:

> Check the filename extension. It needs to be recognisable as an =20
> executable php file in order for your web server to pass it along =20
> to php for proper processing by php..
>
> HTH
>
> Keith
>
> On Fri, 12 Oct 2007, Lady Siesta wrote:
>
[color=darkred]
>
> --=20
> ------------------------------------------------------------
> http://www.karsites.net
> http://www.raised-from-the-dead.org.uk
>
> This email address is challenge-response protected with
> http://www.tmda.net
> ------------------------------------------------------------


Matthew Marino
IT Manager
CSW Inc.
45 Tyburski Road
Ludlow MA 01056
(413)589-1311
Andy Stratton

2007-10-12, 7:04 pm

Another thing I would check into, which may or may not be the case, is
whether or not you have open_short_tag = On|Off in your php.ini

If you have it off and are using short tags, this may be the case.

--
Andy Stratton, ZCE
Software/Network Engineer
COMPASS Information Systems, Inc.
www.compassinfo.net
(410) 923-6300 office
(410) 923-2820 fax
(443) 623-6835 mobile

----------------------------------------------------------------------------
----
IT Support When and Where You Need It.
Professional IT Services for configuration management,
networking, database, security, and website services.
www.compassinfo.net
----------------------------------------------------------------------------
----
Learn and Grow.
Professional IT Training and Prepaid Courseware / CBT.
Onsite and offsite classes available.
training.compassinfo.net
----------------------------------------------------------------------------
----

-----Original Message-----
From: Matthew Marino [mailto:mattm@citystamp.com]
Sent: Friday, October 12, 2007 9:07 AM
To: Keith Roberts
Cc: php-install@lists.php.net
Subject: Re: [PHP-INSTALL] Shows code instead of info when calling PHP from
Ajax

Could also be as simple as not having the <?php ?php> tags? You
mentioned having your code "checked" but I'm not sure what you mean
by that. If you're saying that you can run the script directly but it
fails when called via Ajax you're off my chart.

Unless it's getting passed to a different instance of the apache
server or somehow the tag is getting the browser to try and parse the
file directly rather than handing it to the apache server process
i.e. make sure references are explicitly "http://..."

On Oct 12, 2007, at 8:48 AM, Keith Roberts wrote:

> Check the filename extension. It needs to be recognisable as an
> executable php file in order for your web server to pass it along
> to php for proper processing by php..
>
> HTH
>
> Keith
>
> On Fri, 12 Oct 2007, Lady Siesta wrote:
>
>
> --
> ------------------------------------------------------------
> http://www.karsites.net
> http://www.raised-from-the-dead.org.uk
>
> This email address is challenge-response protected with
> http://www.tmda.net
> ------------------------------------------------------------


Matthew Marino
IT Manager
CSW Inc.
45 Tyburski Road
Ludlow MA 01056
(413)589-1311
Lady Siesta

2007-10-13, 8:00 am

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com