php-windows Digest 10 Jan 2005 04:01:59 -0000 Issue 2528

Topics (messages 25272 through 25276):

Re: Blank screen problem
        25272 by: Michael Purdy
        25273 by: Roel Dillen

PHP and MS Access
        25274 by: Dale Attree
        25275 by: list.elliott.uk.com

Re: $Dbhost
        25276 by: Zareef Ahmed

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Roel

I am not sure what you expect to see but what you should see in view source
is only the HTML output of the phpinfo() function.

At present your code does have one problem which may be causing you problems
and this

 echo â<p>This is a PHP line</p>â;

Should be

echo '<p>This is a PHP line</p>';

That is use a single (') quote and not (") quote.  Change it to a single '
and see how you go then

Mike

----- Original Message ----- 
From: "Roel Dillen" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, January 08, 2005 7:08 PM
Subject: Re: [PHP-WIN] Blank screen problem


> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>
>
> this is what I get when I view the source
>
> And the following is in test.php
>
> <html>
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <p>This is an HTML line</p>
> <?php
> echo â<p>This is a PHP line</p>â;
> phpinfo();
> ?>
> </body>
> </html>
>
> Quite curious is it not?
>
>
>
>
>
> On Fri, 07 Jan 2005 14:45:34 +0000, Luis Moreira
> <[EMAIL PROTECTED]> wrote:
>
> > When you run a PHP script, if you "view source" you don't see the code.
> > What you see is the result of the script.
> > If the script doesn't output text, be it html or not, there's nothing to
> > see...
> >
> > The script
> >
> > <html>
> > <body>
> > <?php
> >     echo "<b>Hello World</b><br>";
> >     echo "It's me !";
> > ?>
> > </body>
> > </html>
> >
> >
> > would produce
> >
> > *Hello World*
> > It's me !
> >
> >
> > with this as the "view source" result
> >
> > <html>
> > <body>
> > <b>Hello World</b><br>It's me !</body>
> > </html>
> >
> >
> > Luis
> >
> >
> >
> > Roel Dillen wrote:
> >
> >> I ran a basic php script (php_info) but appearantly it doesn't do
> >> anything.
> >> In viewsource the php code doesn't show up. I have Apache 2 and PHP 5 I
> >> have
> >> adapted my httpd.conf so it should be able parse the php through the
CLI
> >> method. I have added these lines to achieve this
> >> LoadModule php5_module "c:/php/php5apache2.dll"
> >> AddType application/x-httpd-php .php
> >> PHPIniDir "C:/php"
> >>
> >> I have added c:/php to my Path variable in windows
> >>
> >>
> >>
>
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---

It was something rather stupid I copy pasted the code from a pdf file. It used non standard quotes in the echo line (UTF-8 instead of ASCII). echo â<p>This is a PHP line</p>â; instead of echo "<p>This is a PHP line</p>";

Since PHP doesn't parse incorrect blocks of code I got a blank screen.
to protect your privacy/and your code (copyright you know)

The moral of the story: never copy paste pieces of programming.
I still hear my professor programming say it.

Thanks a lot to anyone who tried to help.

Roel



On Sat, 8 Jan 2005 20:38:43 +1000, Michael Purdy <[EMAIL PROTECTED]> wrote:

Roel

I am not sure what you expect to see but what you should see in view source
is only the HTML output of the phpinfo() function.

At present your code does have one problem which may be causing you problems
and this

 echo â<p>This is a PHP line</p>â;

Should be

echo '<p>This is a PHP line</p>';

That is use a single (') quote and not (") quote. Change it to a single '
and see how you go then

Mike

----- Original Message -----
From: "Roel Dillen" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, January 08, 2005 7:08 PM
Subject: Re: [PHP-WIN] Blank screen problem


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

this is what I get when I view the source

And the following is in test.php

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line</p>
<?php
echo â<p>This is a PHP line</p>â;
phpinfo();
?>
</body>
</html>

Quite curious is it not?





On Fri, 07 Jan 2005 14:45:34 +0000, Luis Moreira
<[EMAIL PROTECTED]> wrote:

> When you run a PHP script, if you "view source" you don't see the code.
> What you see is the result of the script.
> If the script doesn't output text, be it html or not, there's nothing to
> see...
>
> The script
>
> <html>
> <body>
> <?php
> echo "<b>Hello World</b><br>";
> echo "It's me !";
> ?>
> </body>
> </html>
>
>
> would produce
>
> *Hello World*
> It's me !
>
>
> with this as the "view source" result
>
> <html>
> <body>
> <b>Hello World</b><br>It's me !</body>
> </html>
>
>
> Luis
>
>
>
> Roel Dillen wrote:
>
>> I ran a basic php script (php_info) but appearantly it doesn't do
>> anything.
>> In viewsource the php code doesn't show up. I have Apache 2 and PHP 5 I
>> have
>> adapted my httpd.conf so it should be able parse the php through the
CLI
>> method. I have added these lines to achieve this
>> LoadModule php5_module "c:/php/php5apache2.dll"
>> AddType application/x-httpd-php .php
>> PHPIniDir "C:/php"
>>
>> I have added c:/php to my Path variable in windows
>>
>>
>>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Anyone able to help me,

I'm having to port a MySQL system to MS Access, but some of the SQL is not
working on MS Access.

MySQL statement : select * from po limit 0,20

When I execute that sql statement using odbc_exec, it says there is a synta
error in the "FROM" clause.

Please help. It is urgent.

Thanx
Dale

--- End Message ---
--- Begin Message ---
Hi php-windows,

Historians believe that on 08 January 2005, at 14:31:00 +0200 (which was
12:31 where I live) PHP Windows Mailing List wrote and made these points

> I'm having to port a MySQL system to MS Access, but some of the SQL is not
> working on MS Access.

> MySQL statement : select * from po limit 0,20

> When I execute that sql statement using odbc_exec, it says there is a synta
> error in the "FROM" clause.

Try

Select top 20 * from po

I believe that limit is MySQL specific.

-- 
 David

Attachment: pgpCwq5vz7VvC.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Hi, 

 $Dbhost must be your server name on which Mysql is running.
"localhost" will do the work if you are working localy on the same
server.

zareef ahmed 


On Fri, 7 Jan 2005 11:56:04 -0800, Daniel Aguilar
<[EMAIL PROTECTED]> wrote:
> not sure what I should use in place of $Dbhost, is this referenced in
> another include file or should i replace this with my database address, ie.
> 
> $SERVER_Dbhost [mysql]
> 
> ? not sure any suggestions, has anyone installed php on IIS and mysql ?
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

--- End Message ---

Reply via email to