php-windows Digest 9 Nov 2002 00:32:27 -0000 Issue 1430
Topics (messages 16808 through 16821):
Re: enabling extensions
16808 by: Sven Schnitzke
Re: header:location question
16809 by: Maxim Maletsky
How to echo the end marker '?>'
16810 by: Philipp Bolliger
16811 by: brother - Martin Bagge
Re: [PHP] How to echo the end marker '?>'
16812 by: Ernest E Vogelsinger
16813 by: Cam Dunstan
16814 by: Ernest E Vogelsinger
16815 by: Maxim Maletsky
16818 by: John W. Holmes
16819 by: Jason Young
Re: Invalid command 'php_value' in .htaccess
16816 by: Prachait Saxena
16820 by: Marcelo Laia
Re: expat extension
16817 by: Darvin Andrioli
php doesnt work in subdirectory
16821 by: Zeus
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 ---
Hello Tim
I am using PHP 4.2.2 on Win98 for eval and I have encountered problems with
extension_dir
too. Basically it comes to that:
PHP is not yet consistent in the usage and basing of relative pathnames in the
different
contexts (extensions, session_save, ...). In addition, absolute pathnames don't always
work.
There are differences in that between 4.2.2 and 4.3.
I am interested in that because I want to have an "tentative update" strategy with
parallel
installations of more than one version of PHP on my machine. At its best i want to
change
a folder name and copy php.ini to switch from one version to another.
So I refuse to put anything in %WINDIR% or %WINSYSDIR%.
That leaves two locations necessary for php.ini:
- the folder with the current PHP inst (for CLI and CGI operation)
- the folder with (in my case) the Apache (more general: Webserver) inst (for SAPI
mode operation)
This is because PHP.INI is looked for (among other loc) in the folder of the primary
executable.
This is PHP in CGI and CLI modes and the Webserver in SAPI mode. "C:\php4" is a special
case in that it is hardcoded in PHP as the perferred location for the PHP inst.
<rant> I find that imposing and interfering </rant>.
Now at least some relative pathnames in PHP.INI are based on the location of PHP.INI
itself,
especially "extension_dir".
So, to have all things at hand I install:
<drive>:\<Program Files>\WebDev\
and below that I have the folders
- "PHP-x.y.z>" (possibly more than one) with subfolder "extensions"
- "Apache" with a copy of the current PHP.INI
- "PHP" (the current PHP, copied or renamed out of PHP-x.y.z)
My PHP.INI states relative pathnames in the form "..\PHP\folder for any purpose".
This way it works for 4.2.2 and 4.3 SAPI, CGI and CLI. All this is strictly for dev
purpose
and possibly invalid under security restrictions ( namely ..\<any folder> as a folder
spec in safe mode).
Sven
> -----Ursprüngliche Nachricht-----
> Von: Maxim Maletsky [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Donnerstag, 7. November 2002 19:08
> An: Brett Curtiss
> Cc: [EMAIL PROTECTED]
> Betreff: Re: [PHP-WIN] Re: enabling extensions
>
>
> No, it is not necessary (as long as I know, Linux's slash will work)
>
>
> --
> Maxim Maletsky
> [EMAIL PROTECTED]
>
>
>
> "Brett Curtiss" <[EMAIL PROTECTED]> wrote... :
>
> > You need to have the trailing \ ex: C:\WINDOWS\SYSTEM32\
> >
> > Hope that helps.
> >
> >
> > "Tim Blackwell" <[EMAIL PROTECTED]> wrote in message
> > news:20021106190556.22437.qmail@;pb1.pair.com...
> > > I'm trying to enable the ldap extension on my server.
> > >
> > > I've put the php_ldap.dll in the windows/system32 directory
> > > I've set the extension_dir = C:\WINDOWS\SYSTEM32 in the php.ini file. By
> > > the way i've tried extension_dir = C:/WINDOWS/SYSTEM32
> > > I've taken the ; from the extension=php_ldap.dll line in the php.ini file.
> > >
> > > What else needs to be done to enable the extensions?
> > >
> > > thanks,
> > >
> > > t
> > >
> > >
> >
> >
> >
> > --
> > 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
--- End Message ---
--- Begin Message ---
Header-Location is simply what your browser will go to. So, if that link
pasted into the address bar of the browser works - header works too.
Perhaps the protocol is not available for you - that could be the reason.
mms: is supposed to launch some application and things get a bit dirty.
--
Maxim Maletsky
[EMAIL PROTECTED]
"Daniel Sturk" <[EMAIL PROTECTED]> wrote... :
> im was eariler using this function
> header("Location: http://www.somestreamingserver.com/actualstream.wmv");
>
> now the provider wants me to use the following url to access the stream
>
> "mms://www.anotherstreamingserver.com/actualstream.wmv" and this doesnt
> work at all with the header redirect
>
> any ideas?
> im quite new at this
> thanks
> daniel
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi everyone,
subject's allready my question ! I want to echo something like : "<form
action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes <?
echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that the
interpreter doesn't take it as the end of the script ! Any idea ?
cheers, phibo
--- End Message ---
--- Begin Message ---
Philipp Bolliger:
> Hi everyone,
>
> subject's allready my question ! I want to echo something like :
> "<form action = \",?php echo $PHP_SELF ?> \" >" so that the action
> becomes <? echo $PHP_SELF ?> !! But I can't figure out how to escape
> ?> so that the interpreter doesn't take it as the end of the script
> ! Any idea ?
you want to do this:
echo "<form action=\"<?php echo $PHP_SELF ?>\">"; right?
consider this: echo "<form action=\"$PHP_SELF\">";
/brother
--- End Message ---
--- Begin Message ---
At 12:15 08.11.2002, Philipp Bolliger spoke out and said:
--------------------[snip]--------------------
>subject's allready my question ! I want to echo something like : "<form
>action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes <?
>echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that the
> interpreter doesn't take it as the end of the script ! Any idea ?
--------------------[snip]--------------------
Try
echo '<form action="', '<', '?', 'php echo $PHP_SELF', '?', '>', '">';
This should work (untested)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
Ernest, your solution is quite correct, I write lots of scripts that "write
scripts" and it works fine. just concatenate little strings together
"<"."?"."php" and "?".">" pretty much as you suggested to Philipp.
If you have a really sick and twisted mind you can create functions that do
this in combination with $$ variable variables for some very interesting
effects but after a while your friends will start crossing over to the other
side of the road when they see you coming. If these functions write the
scripts to disk for later execution you are entering the realms of self
modifying code, or software that "learns". PHP has to be THE perfect
language to experiment in this area with, surely.
----- Original Message -----
From: "Ernest E Vogelsinger" <[EMAIL PROTECTED]>
To: "Philipp Bolliger" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 11:25 PM
Subject: [PHP-WIN] Re: [PHP] How to echo the end marker '?>'
> At 12:15 08.11.2002, Philipp Bolliger spoke out and said:
> --------------------[snip]--------------------
> >subject's allready my question ! I want to echo something like : "<form
> >action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes <?
> >echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that the
> > interpreter doesn't take it as the end of the script ! Any idea ?
> --------------------[snip]--------------------
>
> Try
>
> echo '<form action="', '<', '?', 'php echo $PHP_SELF', '?', '>', '">';
>
> This should work (untested)
>
>
> --
> >O Ernest E. Vogelsinger
> (\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>
--- End Message ---
--- Begin Message ---
At 14:12 08.11.2002, Cam Dunstan spoke out and said:
--------------------[snip]--------------------
>If you have a really sick and twisted mind you can create functions that do
--------------------[snip]--------------------
Hehe - fits me, that's why I code in PHP *lol*
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
Actually, you don't even have to concatenate them at all. Just treat <?
as a string and that is it:
eg:
<?
echo '<? echo "hello world"; ?>';
?>
will output you:
--
<? echo "hello world"; ?>
--
without any parse errors.
--
Maxim Maletsky
[EMAIL PROTECTED]
"Cam Dunstan" <[EMAIL PROTECTED]> wrote... :
> Ernest, your solution is quite correct, I write lots of scripts that "write
> scripts" and it works fine. just concatenate little strings together
> "<"."?"."php" and "?".">" pretty much as you suggested to Philipp.
>
> If you have a really sick and twisted mind you can create functions that do
> this in combination with $$ variable variables for some very interesting
> effects but after a while your friends will start crossing over to the other
> side of the road when they see you coming. If these functions write the
> scripts to disk for later execution you are entering the realms of self
> modifying code, or software that "learns". PHP has to be THE perfect
> language to experiment in this area with, surely.
>
>
>
> ----- Original Message -----
> From: "Ernest E Vogelsinger" <[EMAIL PROTECTED]>
> To: "Philipp Bolliger" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, November 08, 2002 11:25 PM
> Subject: [PHP-WIN] Re: [PHP] How to echo the end marker '?>'
>
>
> > At 12:15 08.11.2002, Philipp Bolliger spoke out and said:
> > --------------------[snip]--------------------
> > >subject's allready my question ! I want to echo something like : "<form
> > >action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes <?
> > >echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that the
> > > interpreter doesn't take it as the end of the script ! Any idea ?
> > --------------------[snip]--------------------
> >
> > Try
> >
> > echo '<form action="', '<', '?', 'php echo $PHP_SELF', '?', '>', '">';
> >
> > This should work (untested)
> >
> >
> > --
> > >O Ernest E. Vogelsinger
> > (\) ICQ #13394035
> > ^ http://www.vogelsinger.at/
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
> subject's allready my question ! I want to echo something like :
"<form
> action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes <?
> echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that
the
> interpreter doesn't take it as the end of the script ! Any idea ?
Maybe I don't understand... but,
echo "<form action=\"<? echo \$PHP_SELF ?>\" >";
---John Holmes...
--- End Message ---
--- Begin Message ---
If you're trying to get a LITERAL ?> Use > for your > symbol so that
you have
?>
I also noticed you didn't have a <? at the beginning of your string, so
use <? for that.
Does this help?
John W. Holmes wrote:
>subject's allready my question ! I want to echo something like :
"
action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes
echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that
the
> interpreter doesn't take it as the end of the script ! Any idea ?
Maybe I don't understand... but,
echo "\" >";
---John Holmes...
--- End Message ---
--- Begin Message ---
The php_value only works when php is added in apache as a Module not as
Intrepruter.
Please check it as who php is added as Module or php.exe
Prachait
Marcelo laia wrote:
> Hi list,
>
> I am trying to configure a site (gallery) and I am not
> getting to obtain success.
>
> When inserting the instruction,
>
> <Directory "C:\webdoc\gallery">
> AllowOverride Options FileInfo Index
> </Directory>
>
> in httpd.conf of the Apache 2.0.43, I receive the
> following error
> in the log of the Apache:
>
> [Thu Nov 07 16:17:08 2002] [alert] [client 127.0.0.1]
> C:/webdoc/gallery/setup/.htaccess: Invalid command
> 'php_value', perhaps mis-spelled or defined by the
> modulate not included in the server configuration,
> referer: http://localhost/gallery/
>
> The lines of mine .htaccess are transcribed next:
>
> [line 1] php_value auto_prepend_file php_value_ok.php
> [line 2] php_flag magic_quotes_gpc off
>
> [line 3] Options FollowSymLinks
> [line 4] <IfModule mod_rewrite.c>
> [line 5] RewriteEngine On
> [line 6] RewriteRule ^(index.php)
> $index.php?init_mod_rewrite=1&ersandbroken = [QSA]
> [line 7] </IfModule>
>
> Where can the error will be??
>
> Any sugestion will be very apreciated?
>
> Thanks
>
> Marcelo
> From Brazil
>
> _______________________________________________________________________
> Yahoo! GeoCities
> Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e
> acessórios. http://br.geocities.yahoo.com/
--
Bye, and Have a nice day.
Prachait Saxena
---------------------------
Phone :- +91 - 712 - 544476
Email :- [EMAIL PROTECTED]
ICQ :- 71855637
MSN :- [EMAIL PROTECTED]
Yahoo Messenger :- [EMAIL PROTECTED]
If you do for other's !
Other's will do for you !!
Visit me at
http://www.Prachait.Com/
http://www.SitesOnTesting.Com/
--- End Message ---
--- Begin Message ---
Prachait,
You were like Ronaldo, player of Brazilian soccer that
acts in the Real Madri of the Espanish: you made a
great goal!
Thanks very much for this help me!
Next, I write a step-by-step explaining how I solved
my problem. I believe that this procedure can help
other users.
I solve the problem adding php as a Module of Apache.
Once PHP 4.2.3 is incompatible with the Apache 2.0.43,
due to a bug in php4apache2.dll, I made the following,
to solve this problem:
First, I downloaded the php4-win32-STABLE-latest.zip
from
http://ftp.proventum.net/pub/php/win32-snapshots/php4-win32-STABLE-latest.zip
Unzip it and extract the php4apache2.dll (only it) in
the directory C:\php\sapi
Replace it, if necessary.
Insert the two lines
LoadModule php4_module c:phpsapiphp4apache2.dll
AddType application/x-httpd-php .php
at the end of httpd.conf file.
Notes:
1. Apache 2.x for win32 is sensitive to "\" and "/".
2. I tested it in Win2K Workstation, Apache 2.0.43,
PHP 4.2.3, and MySQL 3.23.52.
I don't guarantee that this will solve other problems
similar to mine. Follow this example for his/her bill
and risk.
Jaboticabal-SP, Brazil, November, 8, 2002.
I am sorry, but my english is not good.
--- Prachait Saxena <[EMAIL PROTECTED]>
escreveu: > The php_value only works when php is added
in apache
> as a Module not as
> Intrepruter.
> Please check it as who php is added as Module or
> php.exe
>
> Prachait
>
> Marcelo laia wrote:
>
> > Hi list,
> >
> > I am trying to configure a site (gallery) and I am
> not
> > getting to obtain success.
> >
> > When inserting the instruction,
> >
> > <Directory "C:\webdoc\gallery">
> > AllowOverride Options FileInfo Index
> > </Directory>
> >
> > in httpd.conf of the Apache 2.0.43, I receive the
> > following error
> > in the log of the Apache:
> >
> > [Thu Nov 07 16:17:08 2002] [alert] [client
> 127.0.0.1]
> > C:/webdoc/gallery/setup/.htaccess: Invalid command
> > 'php_value', perhaps mis-spelled or defined by the
> > modulate not included in the server configuration,
> > referer: http://localhost/gallery/
> >
> > The lines of mine .htaccess are transcribed next:
> >
> > [line 1] php_value auto_prepend_file
> php_value_ok.php
> > [line 2] php_flag magic_quotes_gpc off
> >
> > [line 3] Options FollowSymLinks
> > [line 4] <IfModule mod_rewrite.c>
> > [line 5] RewriteEngine On
> > [line 6] RewriteRule ^(index.php)
> > $index.php?init_mod_rewrite=1&ersandbroken = [QSA]
> > [line 7] </IfModule>
> >
> > Where can the error will be??
> >
> > Any sugestion will be very apreciated?
> >
> > Thanks
> >
> > Marcelo
> > From Brazil
_______________________________________________________________________
Yahoo! GeoCities
Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e acessórios.
http://br.geocities.yahoo.com/
--- End Message ---
--- Begin Message ---
Ciao Franco
> After many test and many consideration I decide to use SAX
> instead DOM or XSLT
> because XPath it is must stable. But the performance it is not
> equal like DOM.
Do you had successed to parse the external parameters entities with Expat?
If yes, could you explain me how you make it work?
Grazie.
Darvin
--- End Message ---
--- Begin Message ---
I made directories uder htdocs, and i put my php files.
But, Apache cannot parse the php....
how to change apache config to work with php files under subdirectories
Apche 1.3.6
PHP 4.2 as Apache module
Thanks
.zeus:.
http://www.redrival.com/zeussama
--- End Message ---