php-windows Digest 31 Jul 2004 10:41:35 -0000 Issue 2340

Topics (messages 24299 through 24312):

Re: Confused
        24299 by: Justin Patrin
        24302 by: Schalk Neethling
        24303 by: Schalk Neethling
        24304 by: Schalk Neethling
        24305 by: Schalk Neethling

Re: Posting Again
        24300 by: Mark Collin

WinXP PHP Install Problem
        24301 by: Bruce Guthrie
        24310 by: Jason Barnett

Parsing problem
        24306 by: Keith McIlvride
        24307 by: Justin Patrin
        24308 by: Keith McIlvride

Re: php_printer extension patch
        24309 by: Jason Barnett

Hopefuly an easy one?
        24311 by: Ross Honniball
        24312 by: Jason Barnett

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 ---
On Fri, 30 Jul 2004 23:46:22 +0200, Schalk Neethling
<[EMAIL PROTECTED]> wrote:
> Why would the following line not be parsed in a PHP page?
> 
> <img src="<?php echo $row_ads['full_img']; ?>" width="87" height="120" />
> 

Are you saying that all other PHP code in the page is run, but this isn't?

This is how I would code that:

<?php
echo '<img src="'.$row_ads['full_img'].'" width="87" height="120" />';

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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

I am using the following now:

<?php echo '<img src="'.$row_ads['full_img'].'" width="87" height="120"
/>';
         echo $row_ads['full_img']; ?><br /><?php echo
$row_ads['campaign']; ?>

And still the same result. What am I missing?

Justin Patrin wrote:

On Fri, 30 Jul 2004 23:46:22 +0200, Schalk Neethling
<[EMAIL PROTECTED]> wrote:


Why would the following line not be parsed in a PHP page?

<img src="<?php echo $row_ads['full_img']; ?>" width="87" height="120" />




Are you saying that all other PHP code in the page is run, but this isn't?

This is how I would code that:

<?php
echo '<img src="'.$row_ads['full_img'].'" width="87" height="120" />';




-- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za

This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.
--- End Message ---
--- Begin Message ---
BTW. I am using PHP 4.3.8

Justin Patrin wrote:

On Fri, 30 Jul 2004 23:46:22 +0200, Schalk Neethling
<[EMAIL PROTECTED]> wrote:


Why would the following line not be parsed in a PHP page?

<img src="<?php echo $row_ads['full_img']; ?>" width="87" height="120" />




Are you saying that all other PHP code in the page is run, but this isn't?

This is how I would code that:

<?php
echo '<img src="'.$row_ads['full_img'].'" width="87" height="120" />';




-- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za

This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.
--- End Message ---
--- Begin Message ---
Justin

What 'full_img' contains in the result from the database is something
like ../media/ads/001.jpg

Justin Patrin wrote:

On Fri, 30 Jul 2004 23:46:22 +0200, Schalk Neethling
<[EMAIL PROTECTED]> wrote:


Why would the following line not be parsed in a PHP page?

<img src="<?php echo $row_ads['full_img']; ?>" width="87" height="120" />




Are you saying that all other PHP code in the page is run, but this isn't?

This is how I would code that:

<?php
echo '<img src="'.$row_ads['full_img'].'" width="87" height="120" />';




-- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za

This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.
--- End Message ---
--- Begin Message --- So in my mind I am thinking after being parsed there should be a line reading:

<img src="../media/ads/001.jpg" width="87" height="120" />

Justin Patrin wrote:

On Fri, 30 Jul 2004 23:46:22 +0200, Schalk Neethling
<[EMAIL PROTECTED]> wrote:


Why would the following line not be parsed in a PHP page?

<img src="<?php echo $row_ads['full_img']; ?>" width="87" height="120" />




Are you saying that all other PHP code in the page is run, but this isn't?

This is how I would code that:

<?php
echo '<img src="'.$row_ads['full_img'].'" width="87" height="120" />';




-- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za

This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you.
--- End Message ---
--- Begin Message ---
Have you tried a print_r($row_ads); to check that your array is actually 
populated with all the data you are expecting it to be populated with?

That being said I would expect to see the html in your source even if 
those fields in the array were blank....

Mark

"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]:
> This did not seem to make the list the first time.
>
> Can someone see why the following is happening? I have the following
> code in my PHP page:
>
> <?php do { ?>
>          <td>                  <a href="view_ad.php?id=<?php echo
> $row_ads['id']; ?>"><img src="<?php echo $row_ads['full_img']; ?>"
> width="87" height="120" hspace="5" vspace="5" border="1" /></a>
>          <?php echo $row_ads['full_img']; ?><br /><?php echo
> $row_ads['campaign']; ?>
>          </td>
> <?php } while (($row_ads = mysql_fetch_assoc($ads)) && ($row_ads['id']
> <= 3)); ?>
>
> After rendering the page in a browser the code produced by this block is
>
> as follows:
>
> <td>          ../media/ads/001.jpg<br />Spring 2004          </td>
> <td>          ../media/ads/002.jpg<br />Spring 2004          </td>
> <td>          ../media/ads/003.jpg<br />Spring 2004          </td>
>
> > From this it looks like it is completely ignoring this line:
>
> <a href="view_ad.php?id=<?php echo $row_ads['id']; ?>"><img src="<?php
> echo $row_ads['full_img']; ?>"
> width="87" height="120" hspace="5" vspace="5" border="1" /></a>
>
> Any ideas why this is happening? Thanks!
>

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

I've just installed PHP 4.3.8 on my WinXP, Apache 2.0.50, MySQL 4.0.20d system. Apache, MySQL are running without issue. After installing PHP, however, my "Hello World" test does not run. It only list out the source code which looks like PHP isn't running. I've checked my Apache, PHP installtions against the PHP Installtion guide and all seems to be correct. No errors appear in the Apache error log. I'm new to PHP, so I was wondering if anyone could give me some additional troubleshooting tips?

Thank you for your assistance.
--- End Message ---
--- Begin Message --- Hey Bruce, could you get it to work with the CLI version of PHP? The exact path is going to depend on where you installed PHP, but in my installation I use C:\php\php.exe. So the command to run your program would be something like:

cd\php
php -f C:\path\to\yourfile.php

If that gives you "Hello world", then you have a problem with your Apache configuration - probably the AddType directive. If that doesn't work then we have a problem with PHP, and you'll just have to give us some more information - like did you build this yourself?

[in my httpd.conf module section]
LoadModule php5_module "c:/php/php5apache2.dll"
[/in my httpd.conf module section]

[in my httpd.conf directives]
AddType application/x-httpd-php .php
[/in my httpd.conf directives]

--- End Message ---
--- Begin Message ---
I am very new to PHP. The first line of my php file is "<?xml version="1.0"
encoding="iso-8859-1"?>" This page is straight out of a Dreamweaver sample
file.
When the page is parsed I get this error "Parse error: parse error,
unexpected T_STRING in c:\Inetpub\wwwroot\TestPHP\comments-view.php on line
1"

Can anyone help.

Keith

--- End Message ---
--- Begin Message ---
On Sat, 31 Jul 2004 13:27:41 +1000, Keith McIlvride
<[EMAIL PROTECTED]> wrote:
> I am very new to PHP. The first line of my php file is "<?xml version="1.0"
> encoding="iso-8859-1"?>" This page is straight out of a Dreamweaver sample
> file.
> When the page is parsed I get this error "Parse error: parse error,
> unexpected T_STRING in c:\Inetpub\wwwroot\TestPHP\comments-view.php on line
> 1"
> 
> Can anyone help.
> 

Turn off short_open_tag in your php.ini.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
Thank you Justin that worked fine.

Regards, Keith

"Keith McIlvride" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am very new to PHP. The first line of my php file is "<?xml
version="1.0"
> encoding="iso-8859-1"?>" This page is straight out of a Dreamweaver sample
> file.
> When the page is parsed I get this error "Parse error: parse error,
> unexpected T_STRING in c:\Inetpub\wwwroot\TestPHP\comments-view.php on
line
> 1"
>
> Can anyone help.
>
> Keith


--- End Message ---
--- Begin Message --- Philippe Maes wrote:
For my work, i needed the printer extension (for windows), and some problems appeared to me when i used it:

- printer_draw_bmp function don't satisfy me because it not use printer resolution. I fixed it by adding 2 parameters (width and height).
- printer_set_option doesn't work. I fixed it by adding an option to validate the others one.


I tryed to contact previous maintener, but they don't answer me.

You can find my patch for the moment on http://tawanation.dyndns.org

Best Regards

- Philippe MAES -

I'm going to go check this out... because it's a cool idea and because I'm thinking about printing. But really, if this patch works as well as advertised then you should really submit the patch to php internals. That way everyone can benefit from your patch, not just those of us that actually read the newsgroup messages :)

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

I'm just trying to link to a url with a parameter that contains spaces and other special characters. ie.

<a href="http://localhost/apps/jc_areas.php?area=Arts Pol+His">

which of course doesn't work (space and + sign are problems).

Can someone please point me in the right direction to what php function escapes characters or whatever it has to do?

Help much appreciated ... Ross
.
. Ross Honniball. JCU Bookshop Cairns, Qld, Australia.
.

--- End Message ---
--- Begin Message ---
Yep... all you need is rawurlencode:

http://www.php.net/rawurlencode
--- End Message ---

Reply via email to