php-windows Digest 19 Jan 2003 15:45:15 -0000 Issue 1544
Topics (messages 17970 through 17973):
Re: Subject: cookies problem (FIXED)
17970 by: Neil Smith
Configuration of Apache Server
17971 by: Craig Smith
Parsing html documents.
17972 by: tyler.sunergize.com
17973 by: Christoph Grottolo
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 ---
Well the fact that this fixed it, tends to imply you were outputting some
warn level messages before cookies were sent, therefore they weren't : A
cookie is a header, and like any HTTP header they must be sent before any
other content (even a newline or linebreak can do it).
If you pushed any error messages (such as a warning that a variable was not
yet defined etc) before sending your cookie or other headers, this would
cause your symptoms.
HTH
Neil Smith.
At 03:33 19/01/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Ed" <[EMAIL PROTECTED]>
Date: Sat, 18 Jan 2003 17:03:00 -0600
Subject: Re: Subject: cookies problem (FIXED)
It's not a browser problem, as I said in my post php wasn't saving the
cookies. This seems to be a widespred problem after searching many mailing
lists and seeing this problem on every one of them, with no fixes. I had
already changed my path to c:\php\sessions, so that wasn't the problem
either. What finally fixed it was changing this in the php.ini file:
error_reporting = E_ALL
To This:
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
Now cookis and sessions work just like they're supposed to.
Ed
--- End Message ---
--- Begin Message ---
Problem:
When trying to open a test.php file containing a simple test php script,
windows prompts for program to open file with. Apache is running from the
console as opposed to a service.
*PHP Installation*
PHP version 4.3.0 installed from php-4.3.0-installer.exe. Also downloaded
the zip file php-4.3.0-Win32.zip
Install directory d:\program files\php
Followed details in install.txt file from php install routine. Running from
php.exe as opposed to dll.
This included copying bundled dll files from zip file to windows\system
directory.
*MDAC Installation*
Installed Microsoft Data Access Components version 2.6 as downloade form
Microsoft Website.
*Apache Server Installation*
Apache Server version 1.3.23 installed.
Install directory d:\Program Files\Apache
Configured httpd.conf as per details in install.txt . This took account of
where php install location.
Suspect that the test.php file needs to be in a particular location to be
picked up by php. Is where is this defined.
Regard
Craig Smith
--- End Message ---
--- Begin Message ---
Is there a way, I can read a html document, look for a <br> tag, print what
it finds, and stop when it finds the next <br>. If possible I would like to
do this for the entire document. For example:
If the php script were to search this html file:
<br>
Text <input type=text size=10>
<br>
<br>
Button <input type=button value=Button>
<br>
<br>
Checkbox <input type=checkbox>
<br>
the php would parse it into three seperate pieces pulling them idividually
and printing them on a new page. I hope that makes sense, thanks for the
help.
Tyler Mace
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
>Is there a way, I can read a html document, look for a <br> tag, print what
>it finds, and stop when it finds the next <br>. If possible I would like to
>do this for the entire document. For example:
>
>Tyler Mace
$html_array=explode('<br>',implode('',file('myfile.html','r')));
file() -> reads the file into an array
implode() -> puts the array into a string (in this case with an empty
separator)
explode() -> divides the string into an array at every occurence of
'<br>'
HTH
Christoph
--- End Message ---