php-windows Digest 16 Aug 2002 21:10:10 -0000 Issue 1292

Topics (messages 15296 through 15316):

Re: CSS Question
        15296 by: lallous
        15297 by: lallous
        15303 by: Brian 'Bex' Huff
        15305 by: Martin.Andrew

asp2php: an example of strange behavior....
        15298 by: Svensson, B.A.T. (HKG)

Apache2.0.40/php4.2.2/Win XP home
        15299 by: Stuart Hamilton

Re: Loading Extension...
        15300 by: lallous

Re: PDF Files...
        15301 by: robert mischke

Re: AllowPathInfoForScriptMappings in IIS5 (was Re: [PHP] URL path question)
        15302 by: Brian 'Bex' Huff
        15310 by: Seairth Jacobs

SOAP Installation
        15304 by: Kit Kerbel

DHTML editor + Uploading pictures
        15306 by: Matt Babineau
        15309 by: Matt Babineau
        15316 by: Luis Ferro

Can't send mail
        15307 by: Chris Schoeman
        15308 by: Svensson, B.A.T. (HKG)
        15311 by: RCAuction

Getting Field Names in Microsoft SQL
        15312 by: R.S. Herhuth
        15314 by: David Hollister
        15315 by: Scott Carr

get all headers and IIS
        15313 by: Thoenen, Peter  Mr.  EPS

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 ---
Since you're also posting in PHP forums you can make use of such language!
;)

<?
$css_color = '#112233';
?>
<style>
.style1 { color:<?=$css_color?>; height:100px}
.style2 { color:<?=$css_color?>; height:100px}
</style>

etc...


Elias

"Scott Carr" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I know this is not the specific list for this, but I figured there'd be a
couple
> CSS gurus here.
>
> Is there a way to create CONTSTANTS or variables in css?
>
> I have 2 colors that I need to use in about 20 places, and it would be
> benificial to use a constant.
>
> Thanks for any help.
> --
> Scott Carr
> OpenOffice.org
> Documentation Maintainer
> http://documentation.openoffice.org/
>
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/


--- End Message ---
--- Begin Message ---
Since you're also posting in PHP forums you can make use of such language!
;)

<?
$css_color = '#112233';
?>
<style>
.style1 { color:<?=$css_color?>; height:100px}
.style2 { color:<?=$css_color?>; height:100px}
</style>

etc...



Elias

"Scott Carr" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I know this is not the specific list for this, but I figured there'd be a
couple
> CSS gurus here.
>
> Is there a way to create CONTSTANTS or variables in css?
>
> I have 2 colors that I need to use in about 20 places, and it would be
> benificial to use a constant.
>
> Thanks for any help.
> --
> Scott Carr
> OpenOffice.org
> Documentation Maintainer
> http://documentation.openoffice.org/
>
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/


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

I can state quite comfortable that neither CSS Level 1 nor CSS Level 2 
support constants, variables, or anything along those lines.  They are 
strict data files.  There is some talk on the lists about adding such 
support, but not much hope.

Looks like you're stuck typing :1,$s/x/green/g in Vim  ;)

-- 

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424

> I know this is not the specific list for this, but I figured there'd be a couple
> CSS gurus here.  
> 
> Is there a way to create CONTSTANTS or variables in css?
> 
> I have 2 colors that I need to use in about 20 places, and it would be
> benificial to use a constant.  
> 
> Thanks for any help.



--- End Message ---
--- Begin Message ---
You can always build the entire CSS file with PHP and use standard PHP
varaibles where necessary


> I know this is not the specific list for this, but I figured there'd be a
couple
> CSS gurus here.  
> 
> Is there a way to create CONTSTANTS or variables in css?
> 
> I have 2 colors that I need to use in about 20 places, and it would be
> benificial to use a constant.  
> 
> Thanks for any help.




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Interesting automated port made by asp2php:

This code:
        OpenDb
    Query = "exec lgtc_get_Table_Spec 'luCluster'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luAccNr'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luCluAccLnk'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luOrganism'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luDatabases'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luOrganismName'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luHomolog'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luLokusLnk'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luFunctionName'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luMenuChoise'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luUsers'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luAffyProbeChip'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luDBStats'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luResGenClones'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luQuote'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luDNALibraryName'"
        DisplayRS
    Query = "exec lgtc_get_Table_Spec 'luDNALibrary'"
        DisplayRS
  
        CloseDB

Was ported to this:

OpenDb();
$Query="exec lgtc_get_Table_Spec 'luCluster'";
DisplayRS()();
$Query="exec lgtc_get_Table_Spec 'luAccNr'";
DisplayRS()()();
$Query="exec lgtc_get_Table_Spec 'luCluAccLnk'";
DisplayRS()()()();
$Query="exec lgtc_get_Table_Spec 'luOrganism'";
DisplayRS()()()()();
$Query="exec lgtc_get_Table_Spec 'luDatabases'";
DisplayRS()()()()()();
$Query="exec lgtc_get_Table_Spec 'luOrganismName'";
DisplayRS()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luHomolog'";
DisplayRS()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luLokusLnk'";
DisplayRS()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luFunctionName'";
DisplayRS()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luMenuChoise'";
DisplayRS()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luUsers'";
DisplayRS()()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luAffyProbeChip'";
DisplayRS()()()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luDBStats'";
DisplayRS()()()()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luResGenClones'";
DisplayRS()()()()()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luQuote'";
DisplayRS()()()()()()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luDNALibraryName'";
DisplayRS()()()()()()()()()()()()()()()()();
$Query="exec lgtc_get_Table_Spec 'luDNALibrary'";
DisplayRS()()()()()()()()()()()()()()()()()();

CloseDB()()()()()()()()()()()()()()()()()()();

Could it be a bug, or is it just an feature? :)
--- End Message ---
--- Begin Message ---
I have read lots of info about this problem on the news group however it 
has not solved my problem!

I am trying to get PHP 4.2.2 to load up on Apache 2.0.40 as a module but 
it just ain't working.  I follow the instructions and add the following 
lines to the http.conf file:-

        LoadModule php4_module c:/php/sapi/php4apache2.dll
        AddType application/x-httpd-php .php .phtml

But when I try and start the server from a command prompt I get the 
following error:-

        Syntax error on line 174 of C:/Program Files/Apache 
Group/Apache2/conf/httpd.conf:
        Cannot load C:/php/sapi/php4apache2.dll into server: The 
specified procedure could not be found.

I have moved the .dll file to the modules directory of the server and 
still no luck in starting.

HOWEVER, if I set up apache to load PHP as CGI/BIN the server starts and 
I can display info through the phpinfo cmd.

Is there someting I am doing wrong or is there a bug in the system.

Stewieh
NZ

--- End Message ---
--- Begin Message ---
;extension=php_pdf.dll

you have to uncomment that line above inside php.ini

Elias

"Brian McGarvie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK Help....
>
> I always seem to have trouble installing extensions... what am I doing
> wrong? (trying to get PDFLib working).
>
> I copied the DLL to c:\php\extensions\php_pdf.dll
>
> However when I try to run a simple example I get:
>
> Fatal error: Call to undefined function: pdf_new() in
> C:\Inetpub\wwweloanshop\dev\test\hello.php on line 4
>
> Anyone...
>
>


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


> >> The last portion of your request is not possible under >> 
> the current
> libraries that are out there. I was unable to >> find one 
> anyway. So, for now, you're out of luck.
> 
> In NO language? Not even ASP?

PDFlib have got an "extension", called PDI.
It allows you to edit existing PDF's.
It's none free.

Check out http://pdflib.com 

regards 
robert






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

Id advise against using this kind of architecture.

Its my understanding that Apache2 will no longer allow this kind of CGI 
trick in its new fangled high-speed filter model... its too hard to tell 
which module is supposed to be executed first.  For example:

/path/file.php/more_path/file.py/even_more_path/file.pl

what the heck should Apache do with this?

If you do this, you'll be stuck using Apache 1.3 forever, which is 
slower than IIS on Windows, and much slower than Apache 2.

If Im wrong, somebody please correct me, but I think its because people 
keep writing CGI apps like this that the migration to Apache 2 will be 
so painful...

-- 

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424

> As I understand it, it would allow me to do the following:
> 
> /path/file.php/more_path/
> 
> Where PATH_INFO would be equal to "more_path/", instead of
> "/path/file.php/".  Right now, I get an error back from the above, giving
> the following message:



--- End Message ---
--- Begin Message ---
I hope that's wrong.

As for your example below, you would send
"more_path/file.py/even_more_path/file.pl" to the "/path/file.php" script.
It is not the server's concern how the path is handled.  As for complexity,
this doesn't make sense to me.  Apache still has to parse the path to
determine if it is valid.  Once it encounters the "file.php", it should stop
there.  It knows that this is a file and not a directory.  It knows what to
do with these files.  That should be all that apache needs to know.

<s>  I hope that they at least add(ed) a compatibility flag for this if you
are right...

---
Seairth Jacobs
[EMAIL PROTECTED]


"Brian 'Bex' Huff" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Id advise against using this kind of architecture.
>
> Its my understanding that Apache2 will no longer allow this kind of CGI
> trick in its new fangled high-speed filter model... its too hard to tell
> which module is supposed to be executed first.  For example:
>
> /path/file.php/more_path/file.py/even_more_path/file.pl
>
> what the heck should Apache do with this?
>
> If you do this, you'll be stuck using Apache 1.3 forever, which is
> slower than IIS on Windows, and much slower than Apache 2.
>
> If Im wrong, somebody please correct me, but I think its because people
> keep writing CGI apps like this that the migration to Apache 2 will be
> so painful...
>
> --
>
> Brian 'Bex' Huff
> [EMAIL PROTECTED]
> Phone: 952-903-2023
> Fax: 952-829-5424
>
> > As I understand it, it would allow me to do the following:
> >
> > /path/file.php/more_path/
> >
> > Where PATH_INFO would be equal to "more_path/", instead of
> > "/path/file.php/".  Right now, I get an error back from the above,
giving
> > the following message:
>
>
>


--- End Message ---
--- Begin Message ---
Quick question...to install soap for php, is it just a matter of placing a 
dll in the extensions folder and adding a line to php.ini?  If not, can 
someone point me in the direction of a site explaining how to install it.

Thanx,
Kit



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

--- End Message ---
--- Begin Message ---
Does anyone know where I can get or have sample code of a WYSIWYG type
editor that I can embed into a web page that will let you add images to
the editing space and it will later upload those images?
 
 
Matt Babineau
MCWD / CCFD
-----------------------------------------
e:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
p: 603.943.4237
w:  <http://www.criticalcode.com/> http://www.criticalcode.com
PO BOX 601
Manchester, NH 03105
--- End Message ---
--- Begin Message ---
Martin, this is excellent but it doesn't provide support for uploading
images to my server once the user is completed making changes :(
 
 
Matt Babineau
MCWD / CCFD
-----------------------------------------
e:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
p: 603.943.4237
w:  <http://www.criticalcode.com/> http://www.criticalcode.com
PO BOX 601
Manchester, NH 03105

-----Original Message-----
From: Martin.Andrew [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 16, 2002 9:51 AM
To: Matt Babineau
Subject: RE: [PHP-WIN] DHTML editor + Uploading pictures



you could try playing around with this little editor.... 
open editor2.html not sure if it's what your looking for. 

If it's of any use I'd love to know. I was tempted to use it myself but
never got around to it. 


-----Original Message----- 
From: Matt Babineau [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 16, 2002 3:42 PM 
To: [EMAIL PROTECTED] 
Subject: [PHP-WIN] DHTML editor + Uploading pictures 


Does anyone know where I can get or have sample code of a WYSIWYG type 
editor that I can embed into a web page that will let you add images to 
the editing space and it will later upload those images? 
  
  
Matt Babineau 
MCWD / CCFD 
----------------------------------------- 
e:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] 
p: 603.943.4237 
w:  <http://www.criticalcode.com/> http://www.criticalcode.com 
PO BOX 601 
Manchester, NH 03105 



--- End Message ---
--- Begin Message ---
Matt Babineau wrote:

>Martin, this is excellent but it doesn't provide support for uploading
>images to my server once the user is completed making changes :(
> 
> 
>  
>
Can you provide the urls/files... i've been looking for a likewise 
solution...

Thanx in advance,
Luis Ferro
TelaDigital.net

---
[This E-mail scanned for viruses by Declude Virus]

--- End Message ---
--- Begin Message ---
I am using php as an isapi module on IIS.
Sending mail from within php scripts don't work.
Anyone has an idea of what is wrong?

Thankx
--- End Message ---
--- Begin Message ---
> I am using php as an isapi module on IIS.
> Sending mail from within php scripts don't work.
> Anyone has an idea of what is wrong?

"I have pain in my feet! What's wrong?"

Some more information about what you did and
what kind of result it gave could be help full
clues to figure out why it went wrong.
--- End Message ---
--- Begin Message ---
Find this in your php.ini
Adjust to meet your requirements
Your mail will now work
Remember you must restart IIS
after you make these changes.

[mail function]
; For Win32 only.
SMTP = smtp.yourserver.net

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]


"Chris Schoeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am using php as an isapi module on IIS.
> Sending mail from within php scripts don't work.
> Anyone has an idea of what is wrong?
>
> Thankx


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

I'm trying to build a dynamic script that basically extracts all of the
fields in a MS SQL database...I just can't seem to figure out how to get
at the field names themselves.  I am using the mssql_fetch_array
followed by the $row['field_name'] in an array.  But I would like to
make the field_name dynamic (i.e. not knowing the field_names ahead of
time) which would make the script adaptable to any table in the
database.  So if I get the field's value by $row['field_name'] how do I
get at the field's name?

thanks,
Ron
--- End Message ---
--- Begin Message ---
Database jargon can always be a factor in clear communication, so I'll be
careful in my suggestions.  I take your question to mean: "how do I return
the column names from any given table within MS SQL?"  If that's what you
want, you need to select information from the [syscolumns] table in your
database context.  Example: " select * from [syscolumns] where id =
693577509 ".  I collected the table id 693577509 from [sysobjects], which
keeps a record of table name and system id for that table.  This gives me
the column names for everything in that table.  

Does that answer your question or are you looking for something else?  

Dave

-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 2:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Getting Field Names in Microsoft SQL


I'm trying to build a dynamic script that basically extracts all of the
fields in a MS SQL database...I just can't seem to figure out how to get
at the field names themselves.  I am using the mssql_fetch_array
followed by the $row['field_name'] in an array.  But I would like to
make the field_name dynamic (i.e. not knowing the field_names ahead of
time) which would make the script adaptable to any table in the
database.  So if I get the field's value by $row['field_name'] how do I
get at the field's name?

thanks,
Ron

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
A more portable way would be the following (I am using PEAR::DB, but you could
use the native driver as long as it returns an Associative Array.:

include 'db.php';
$db = DB::connect($dsn);
$strSQL = "SELECT * FROM {Table}";
$row = $db->getRow($strSQL, DB_FETCHMODE_ASSOC);

$field_names = array_keys($row);

Iterate $field_names for the field names from the table.  This should work for
any database that PHP can use.

Have fun...
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting David Hollister <[EMAIL PROTECTED]>:

> Database jargon can always be a factor in clear communication, so I'll be
> careful in my suggestions.  I take your question to mean: "how do I return
> the column names from any given table within MS SQL?"  If that's what you
> want, you need to select information from the [syscolumns] table in your
> database context.  Example: " select * from [syscolumns] where id =
> 693577509 ".  I collected the table id 693577509 from [sysobjects], which
> keeps a record of table name and system id for that table.  This gives me
> the column names for everything in that table.  
> 
> Does that answer your question or are you looking for something else?  
> 
> Dave
> 
> -----Original Message-----
> From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 16, 2002 2:07 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Getting Field Names in Microsoft SQL
> 
> 
> I'm trying to build a dynamic script that basically extracts all of the
> fields in a MS SQL database...I just can't seem to figure out how to get
> at the field names themselves.  I am using the mssql_fetch_array
> followed by the $row['field_name'] in an array.  But I would like to
> make the field_name dynamic (i.e. not knowing the field_names ahead of
> time) which would make the script adaptable to any table in the
> database.  So if I get the field's value by $row['field_name'] how do I
> get at the field's name?
> 
> thanks,
> Ron
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Hello,

I see the getallheaders() function for apache but nothing for IIS ...
anybody know a way to get all the headers for a request in IIS?

-Peter


##################################
Peter Thoenen - Systems Programmer
Commercial Communications
Camp Bondsteel, Kosovo
##################################
--- End Message ---

Reply via email to