php-general Digest 1 Jan 2005 09:23:32 -0000 Issue 3202
Topics (messages 205422 through 205449):
Re: Apache 2.0.52 / PHP 4.3.10 Integration Question...
205422 by: Andrew Kreps
205423 by: Robin Getz
205424 by: John Nichel
205426 by: Brian Duke
205427 by: Andrew Kreps
205428 by: Chris
205429 by: Mark Charette
205431 by: John Holmes
205432 by: Robin Getz
205433 by: John Holmes
205435 by: Mark Charette
205444 by: Andras Kende
205446 by: Matthew Weier O'Phinney
Re: Quick compile question --with-oci8
205425 by: Brian Duke
205430 by: John Nichel
ereg function
205434 by: Michael Lutaaya
205436 by: Rasmus Lerdorf
205437 by: Rory Browne
Re: How to argue with ASP people...
205438 by: mail.pmpa
205439 by: John Holmes
205441 by: mail.pmpa
205448 by: M Saleh EG
Re: Environment and Modules
205440 by: Richard Lynch
Re: handling large files w/readfile
205442 by: Richard Lynch
205445 by: Rory Browne
Re: Recommend a free shopping cart app?
205443 by: Richard Lynch
phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8
205447 by: GH
PHP V4.3.10 / Apache2 Handler Question...
205449 by: Robin Getz
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, 31 Dec 2004 11:39:51 -0800, Robin Getz
<[EMAIL PROTECTED]> wrote:
> Hi.
>
> I am trying to get Apache 2.0.52 / PHP 4.3.10 working with some scripts I
> am using.
>
>
> Which used to work with apache 2.0.40 and php 4.2.3 - but what happens now,
> is I actually get passed the php script back as text to the browser.
>
Robin, I had the same problem with my latest PHP install on Apache 2.
I had to add this line to my httpd.conf:
AddType application/x-httpd-php .php
I had a custom compiled PHP 5.0.2, which added the LoadModule line,
but not the AddType. You may also want to include index.php in your
DirectoryIndex. Let me know if this works for you.
--- End Message ---
--- Begin Message ---
Andrew Kreps wrote:
I had to add this line to my httpd.conf:
AddType application/x-httpd-php .php
I have this and the DirectoryIndex - the problem is that my script does not
end in a .php extention. (GForge )
If I rename the file projects.php and point to that, it works, but that
means an entire re-write of the existing GForge.
I guess the question is - how to make a file that does not end in .php or
have any extension, be understood as a php file?
Thanks
-Robin
--- End Message ---
--- Begin Message ---
Robin Getz wrote:
Andrew Kreps wrote:
I had to add this line to my httpd.conf:
AddType application/x-httpd-php .php
I have this and the DirectoryIndex - the problem is that my script does
not end in a .php extention. (GForge )
If I rename the file projects.php and point to that, it works, but that
means an entire re-write of the existing GForge.
I guess the question is - how to make a file that does not end in .php
or have any extension, be understood as a php file?
Thanks
-Robin
AddType application/x-httpd-php .php .gforce .this .that .etc
--
John C. Nichel
�berGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
What exactly does your script end in?
I think you can make up your own extension and add it as well just tell
apache what to use when it sees it. I.E.
AddType application/x-httpd-php .fred
I can't guarantee that's true but I think you can.
> -----Original Message-----
> From: Robin Getz [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 31, 2004 12:55 PM
> To: [EMAIL PROTECTED]
> Cc: [email protected]
> Subject: RE: [PHP] Apache 2.0.52 / PHP 4.3.10 Integration Question...
>
> Andrew Kreps wrote:
>
> >I had to add this line to my httpd.conf:
> >
> >AddType application/x-httpd-php .php
>
> I have this and the DirectoryIndex - the problem is that my script does
> not
> end in a .php extention. (GForge )
>
> If I rename the file projects.php and point to that, it works, but that
> means an entire re-write of the existing GForge.
>
> I guess the question is - how to make a file that does not end in .php or
> have any extension, be understood as a php file?
>
> Thanks
> -Robin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
On Fri, 31 Dec 2004 11:55:13 -0800, Robin Getz
<[EMAIL PROTECTED]> wrote:
>
> I have this and the DirectoryIndex - the problem is that my script does not
> end in a .php extention. (GForge )
>
> If I rename the file projects.php and point to that, it works, but that
> means an entire re-write of the existing GForge.
>
> I guess the question is - how to make a file that does not end in .php or
> have any extension, be understood as a php file?
>
Now I see your problem. If it were merely a different extension, that
wouldn't be a problem. You need to be able to run a file with *no*
extension through the PHP parser, which seems a bit more difficult.
Let me see what I can figure out.
What version of GForge are you running? The current one appears to be
'normal', i.e. with extensions on the files.
--- End Message ---
--- Begin Message ---
Robin Getz wrote:
Andrew Kreps wrote:
I had to add this line to my httpd.conf:
AddType application/x-httpd-php .php
I have this and the DirectoryIndex - the problem is that my script
does not end in a .php extention. (GForge )
If I rename the file projects.php and point to that, it works, but
that means an entire re-write of the existing GForge.
I guess the question is - how to make a file that does not end in .php
or have any extension, be understood as a php file?
Thanks
-Robin
As far as I'm aware, that should work, it has for me in the past, as it
has evidewntally worked for you as well.
I often use another way of doing that same sort of thing that might be a
valid option for you though:
If you change the filename to end in php (projects.php, or whatever) ,
then Alias it to a name that doesn't end in .php you'll achieve the same
effect:
Alias /projects "/full/path/to/porojects/files/projects.php"
That has worked for me, though you will still need to set
AcceptPathInfo, if it isn't already.
Chris
--- End Message ---
--- Begin Message ---
Robin Getz wrote:
Andrew Kreps wrote:
I had to add this line to my httpd.conf:
AddType application/x-httpd-php .php
I have this and the DirectoryIndex - the problem is that my script does
not end in a .php extention. (GForge )
If I rename the file projects.php and point to that, it works, but that
means an entire re-write of the existing GForge.
I guess the question is - how to make a file that does not end in .php
or have any extension, be understood as a php file?
ForceType directive.
--- End Message ---
--- Begin Message ---
Robin Getz wrote:
I have a file named /www/projects which is a php script.
When I type the url: www.site/projects/variable
I want variable passed to the script "projects"
I have the the http.conf set up as:
<Files projects>
SetInputFilter PHP
SetOutputFilter PHP
AcceptPathInfo On
</Files>
Which used to work with apache 2.0.40 and php 4.2.3 - but what happens
now, is I actually get passed the php script back as text to the browser.
All of the methods I've seen in the past used a "Forcetype" directive
and PATH_INFO.
<Files projects>
ForceType application/x-httpd-php
</Files>
Is this SetInputFilter and SetOutputFilter the Apache2 equivilent of the
Forcetype or another way of doing it? Have you tried Forcetype?
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
The prize goes to Mark Charette of [EMAIL PROTECTED] for reading the
apache manual in more detail than I.
After Reading
http://httpd.apache.org/docs-2.0/mod/core.html#forcetype
Then adding:
ForceType application/x-httpd-php
Things work great.
Thanks
-Robin
--- End Message ---
--- Begin Message ---
Mark Charette wrote:
Robin Getz wrote:
I guess the question is - how to make a file that does not end in .php
or have any extension, be understood as a php file?
ForceType directive.
I was thinking the same thing, but after doing some reading it seems
Apache 2 uses a different method now (setinputfilter/setoutputfilter).
Just acknowledging my mistake and passing this along for others, too. :)
Happy new year.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
John Holmes wrote:
Robin Getz wrote:
I have a file named /www/projects which is a php script.
When I type the url: www.site/projects/variable
I want variable passed to the script "projects"
I have the the http.conf set up as:
<Files projects>
SetInputFilter PHP
SetOutputFilter PHP
AcceptPathInfo On
</Files>
Which used to work with apache 2.0.40 and php 4.2.3 - but what happens
now, is I actually get passed the php script back as text to the browser.
All of the methods I've seen in the past used a "Forcetype" directive
and PATH_INFO.
<Files projects>
ForceType application/x-httpd-php
</Files>
Is this SetInputFilter and SetOutputFilter the Apache2 equivilent of the
Forcetype or another way of doing it? Have you tried Forcetype?
I looked it up before posting ...
According to the 2.0.xx online docs, ForceType should work just fine:
http://httpd.apache.org/docs-2.0/mod/core.html#forcetype
Mark C.
--- End Message ---
--- Begin Message ---
-----Original Message-----
From: Robin Getz [mailto:[EMAIL PROTECTED]
Sent: Friday, December 31, 2004 1:40 PM
To: [email protected]
Subject: [PHP] Apache 2.0.52 / PHP 4.3.10 Integration Question...
Hi.
I am trying to get Apache 2.0.52 / PHP 4.3.10 working with some scripts I
am using.
I have a file named /www/projects which is a php script.
When I type the url: www.site/projects/variable
I want variable passed to the script "projects"
I have the the http.conf set up as:
<Files projects>
SetInputFilter PHP
SetOutputFilter PHP
AcceptPathInfo On
</Files>
Which used to work with apache 2.0.40 and php 4.2.3 - but what happens now,
is I actually get passed the php script back as text to the browser.
Any thoughts? I poked around on google, and saw at
http://dan.drydog.com/apache2php.html
"However, SetOutputFilter / SetInputFilter no longer works for me. It used
to work with an earlier PHP 4.x or Apache 2 version, but not with Apache
2.0.47/PHP 4.3.3. I understand this (PHP as an Apache 2 filter) is
experimental, so I don't use it anymore"
I tried things like:
AddType text/html php
But I keep getting the same thing in my browser:
<?php
/**
* Projects Redirector
*
---snip---
?>
Any thoughts? Thanks in advanced.
-Robin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
You could also do it like this if don't want to use /
.htaccess or httpd.conf
RewriteEngine On
RewriteRule ^list-(.*) list.php
RewriteRule ^design-(.*) design.php
http://www.juhaszdesign.com/list-barstools.html
http://www.juhaszdesign.com/design-hastings-barstool.html
Andras Kende
http://www.kende.com
--- End Message ---
--- Begin Message ---
* Robin Getz <[EMAIL PROTECTED]>:
> I have a file named /www/projects which is a php script.
> When I type the url: www.site/projects/variable
>
> I want variable passed to the script "projects"
>
> I have the the http.conf set up as:
>
> <Files projects>
> SetInputFilter PHP
> SetOutputFilter PHP
> AcceptPathInfo On
> </Files>
>
> Which used to work with apache 2.0.40 and php 4.2.3 - but what happens now,
> is I actually get passed the php script back as text to the browser.
>
> Any thoughts?
Yes... approach it differently. Try the following:
In httpd.conf or your .htaccess, have:
<Files projects>
ForceType application/x-httpd-php
</Files>
Then, in your projects file, use the PATH_INFO key from $_SERVER to
access variables passed as part of the 'url' (anything following a slash
trailing the word 'projects' in the url):
$path_info = $_SERVER['PATH_INFO'];
$path_info = substr($path_info, 1); // Trim off first slash
$args = expode('/', $path_info);
$variable = $args[0];
--
Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--- End Message ---
--- Begin Message ---
That's a valid question. I am not a dba. In fact I'm not even a real
designer. I'm only a hack technician who got tired of arguing with the IT
department one day and decided to make my own tools to use. I chose php
based off the community of php. I tried a couple other languages and a few
scripting languages. Every attempt to ask for help came with the high price
of getting flamed. In Google groups you can see such an encounter by
searching on "grep once awk twice or more".
I load about 3 tables from a database called the LERG. It's updated daily. I
currently manually load these tables into my scratch database. I don't have
to worry about cycles because my app runs on the server in our department
which IT does not have access to. So we can query that database all day.
Finally the DataWarehouse team gave us access to update our local database
via read-only. So I am not abandoning the mysql database just updating it
from live data.
Would you have a link to the client downloads at OTN? I have been
downloading the wrong things apparently.
Thanks,
bd
> -----Original Message-----
> From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 30, 2004 3:08 PM
> To: Brian Duke
> Subject: Re: [PHP] Quick compile question --with-oci8
>
> Brian Duke wrote:
>
> >Correct me if I'm wrong but we will have to install oracle8 || 9i before
> we
> >can compile php --with-oci8. I don't really want to run oracle. Our local
> >server only needs to use the oci8 functions to log into the datawarehouse
> >and update our local mysql database but after a week of frustration I
> think
> >that's what we have to do.
> >
> >
> Just out of curiosity, wy would you need Oracle if your database is
> MySQL? PHP comes with MySQL libraries built-in, or you can choose to
> install MySQL libraries from www.mysql.com and compile PHP with them.
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
> +--------------------------------------------------------------------
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> IT Director / SysAdmin / Websmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
> http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
>
>
>
--- End Message ---
--- Begin Message ---
Brian Duke wrote:
<snip>
Would you have a link to the client downloads at OTN? I have been
downloading the wrong things apparently.
I sent you that link earlier. There's no 'client library only' download
that I know of. The client libraries are included with the actual db
software. Unless things have changed since I last set up a box (Oracle
8 client), you'll need to either a) download the whole CD, or b) get the
installation CD's from your DBA's.
Look here...
http://www.oracle.com/pls/db10g/portal.portal_demo3?selected=1
Under "Client Installation Guides" on the right hand side.
--
John C. Nichel
�berGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I want to validate someones age. How do I do this in
the ereg function.
I also have some visitors on my site who are in
between the ages of 7-9 so don't forget to make them
part of the ereg function.
--- End Message ---
--- Begin Message ---
Numbers are pretty easy. You could just do:
$age = (int)$_POST['age'];
if($age > 9) do_something();
else do_something_else();
Using ereg doesn't make much sense in this case.
-Rasmus
On Fri, 31 Dec 2004, Michael Lutaaya wrote:
> I want to validate someones age. How do I do this in
> the ereg function.
>
> I also have some visitors on my site who are in
> between the ages of 7-9 so don't forget to make them
> part of the ereg function.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
The ereg function doesn't have the capability to test the age of the
person viewing your page. You have to depend on them to input their
age in some way.
Your answer depends on how your age is submitted. Assuming it is
submited as $_POST['age'], you could perhaps use ereg("0*[7-9]$",
$_POST['age']) - that might work but I haven't used ereg - ever, I
perfer to use the faster PCRE regex functions, such as
preg_match("/^0*[7-9]$/", $_POST['age']); which will match any amount
of zeros, followed by anything between 7 and 9, ie 8,
0000000000000000008, or 08
Having all that said, I wouldn't use reges for smething like this.
On Fri, 31 Dec 2004 15:46:46 -0500 (EST), Michael Lutaaya
<[EMAIL PROTECTED]> wrote:
> I want to validate someones age. How do I do this in
> the ereg function.
>
> I also have some visitors on my site who are in
> between the ages of 7-9 so don't forget to make them
> part of the ereg function.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I used response.redirect in asp to avoid form re-submit, so I can have form
handling functions and other related functions on the same file.
new_customer_form.php :
< form action="form_results.php" >
Customer fills form and hits submit button.
form_results.php :
function validate_form_data(){
if true show_results();
}
function show_results() {...}
Now customer is on results page in show_results().
If he hits the Refresh button or Back then Forward buttons in he will be
prompt to resubmit the form data or cancel.
If I add header("Location: form_results.php") inside function
validate_form_data() instead of calling function show_results() I can avoid
this behaviour.
I don't know if this is the right procedure, i am learning as I develop.
This was a workaround for shopping cart and customer area form handling form
handling code. Probably I'm doing it all wrong :)
And Robby thanks for the ob_start() tip!
I apologise for my bad English writing.
Pedro Almeida.
-----Mensagem original-----
De: John Holmes [mailto:[EMAIL PROTECTED]
Yeah, sure. You just can't have any output before you redirect with a
Location header (unless you use output buffering as a workaround).
This is basic HTTP and ASP has to play by the same rules. If you can
have output before Response.Redirect, then ASP is just doing the
buffering for you before it sends a Location header.
John Holmes...
--- End Message ---
--- Begin Message ---
mail.pmpa wrote:
I used response.redirect in asp to avoid form re-submit, so I can have form
handling functions and other related functions on the same file.
new_customer_form.php :
< form action="form_results.php" >
Customer fills form and hits submit button.
form_results.php :
function validate_form_data(){
if true show_results();
}
function show_results() {...}
Now customer is on results page in show_results().
If he hits the Refresh button or Back then Forward buttons in he will be
prompt to resubmit the form data or cancel.
If I add header("Location: form_results.php") inside function
validate_form_data() instead of calling function show_results() I can avoid
this behaviour.
I don't know if this is the right procedure, i am learning as I develop.
This was a workaround for shopping cart and customer area form handling form
handling code. Probably I'm doing it all wrong :)
Yeah, this is a good method for a lot of form processing. It's as simple
as having the processing/validating in one area and the form/error
display in another. Once the form is accepted/rejected, you just
header() redirect to the form or error page. Too easy and it prevents a
lot of confusion for your users.
And Robby thanks for the ob_start() tip!
This is a workaround, really. Your code should be structured so that you
can decide if you need to perform a redirect before any output is sent
to the browser. If you're going to send them to another page, why would
you have any output anyhow? Using templates sometimes forces you to do
this, as you perform all of your business logic / PHP code before hand
and then display the appropriate templates. If you need to send the user
to another page, it's easy to do so at any point before your templates
are shown.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
-----Mensagem original-----
De: John Holmes
This is a workaround, really. Your code should be structured so that you
can decide if you need to perform a redirect before any output is sent
to the browser. If you're going to send them to another page, why would
you have any output anyhow? Using templates sometimes forces you to do
this, as you perform all of your business logic / PHP code before hand
and then display the appropriate templates. If you need to send the user
to another page, it's easy to do so at any point before your templates
are shown.
---John Holmes...
Yes you are right, that is what I am doing now, taking all validation /
verification functions that do not output html to top, after session
handling. This is my first php application as I am migrating from asp and
trying to "mirror" my application in php. I have separate php files to
handle different "areas" of the site and like you say I use header+footer
sort of template.
Thanks. Happy New Year!
Pedro Almeida.
--- End Message ---
--- Begin Message ---
the ob_start() in ASP is Response.Buffer=True
ASP doesnt handle it for you automaticaly!
Just wanted to notify ;)
On Fri, 31 Dec 2004 03:14:31 -0500, John Holmes
<[EMAIL PROTECTED]> wrote:
> mail.pmpa wrote:
> > Can I do any session handling before calling header("Location: $url"); ?
>
> Yeah, sure. You just can't have any output before you redirect with a
> Location header (unless you use output buffering as a workaround).
>
> This is basic HTTP and ASP has to play by the same rules. If you can
> have output before Response.Redirect, then ASP is just doing the
> buffering for you before it sends a Location header.
>
> --
>
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals â www.phparch.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
M.Saleh.E.G
97150-4779817
--- End Message ---
--- Begin Message ---
> 1) I want PHP to look for my php.ini file in the php folder (c:\php4) but
> it
> refuses to do so. Setting PHPRC doesn't help and this setting actualy
> won't
I believe that directory is compiled into your php.exe and php4ts.dll (?)
file -- and it cannot be changed from any external setting/action on your
part, unless you want to re-compile.
If Windows had real symbolic links instead of stupid "shortcuts" I'd say
to just put a link in c:\php4...
Actually, I guess a short-cut in c:\php4 will "work" in that when you use
Windoze to open it, it will open the c:\winnt\php.ini instead. It will
just be useless to every program other than Windows.
> 2) Some modules won't load, php_mcrypt.dll for one. I tried setting the
> "extension_dir" (extension_dir = "c:\php4\extensions") but that doesn't
> help. Copying the dll to the "c:\winnt\system32" folder doesn't work
> either.
> Some modules do load however (php_df.dll loads fine from the same
> location),
> it's just some modules that don't/won't. Examples are: php_mcrypt.dll,
> php_mhash.dll and php_xmlrpc.dll.
> What I want to accomplish here is that modules can load (obviously) :-)
> Any help on these matters will be appreciated immensly!
If you got other Modules to load from directory X, and the files you want
to load are in directory X, then moving them to directory Y is *not* gonna
help.
There must be something wrong with the DLL files themselves. Check your
IIS error log (assuming such a thing exists) for more info.
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
Sebastian wrote:
> i'm working on a app which output files with readfile() and some headers..
> i read a comment in the manual that says if your outputting a file php
> will
> use the same amount of memory as the size of the file. so, if the file is
> 100MB php will use 100MB of memory.. is this true?
>
> if it is, how can i work around this?
I don't know if it's STILL true (or ever was) that readfile() would suck
the whole file into RAM before spitting it out... Seems real unlikely,
but...
At any rate, you can simply do:
$file = 'whatever.mb';
$fp = @fopen($file, 'r') or trigger_error("Could not read $file",
E_USER_ERROR);
while (!feof($fp)){
echo fread($fp, 4096); //4K chunks
}
http://php.net/fopen http://php.net/fread http://php.net/feof
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
I'd go with Richards Basic idea, but if you're outputting a 100Mb file
I'd use a hell of a lot bigger chunks than 4K. With the syscall and
loop overhead, i'd go with at least half a megabyte, or more likely
2Mb depending on your amount of memory.
To do this you'd change Richards
echo fread($fp, 4096); //4K chunks
to
echo fread($fp, 2048000); // ~2Mb chunks (actually 2000KB but couldn't
be bothered counting, and 2Mb is an arbitory figure anyway)
Just make sure you don't have output buffering on.
On Fri, 31 Dec 2004 15:17:51 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]>
wrote:
> Sebastian wrote:
> > i'm working on a app which output files with readfile() and some headers..
> > i read a comment in the manual that says if your outputting a file php
> > will
> > use the same amount of memory as the size of the file. so, if the file is
> > 100MB php will use 100MB of memory.. is this true?
> >
> > if it is, how can i work around this?
>
> I don't know if it's STILL true (or ever was) that readfile() would suck
> the whole file into RAM before spitting it out... Seems real unlikely,
> but...
>
> At any rate, you can simply do:
>
> $file = 'whatever.mb';
> $fp = @fopen($file, 'r') or trigger_error("Could not read $file",
> E_USER_ERROR);
> while (!feof($fp)){
> echo fread($fp, 4096); //4K chunks
> }
>
> http://php.net/fopen http://php.net/fread http://php.net/feof
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Bosky, Dave wrote:
> I was looking for a nice 'Free' shopping cart app that I can plug into my
> website and wanted some recommendations.
Years ago, after suffering through the flame wars on this list every few
days from posts like this, I threw up a comparison application.
You may, or may not, find the data useful. I have no idea if anybody has
bothered to add/rate anything in this in all this time. It was a
one-night hack to work out my frustration with posts like this. :-)
http://l-i-e.com/compare/
YMMV
--
Like Music?
http://l-i-e.com/artists.htm
--- End Message ---
--- Begin Message ---
Has anyone had any problems installing phpMyAdmin with the above
configuration? I get an error about the mySql client and
authentication methods? MySQL Error: 1251 : Client does not support
authentication protocol requested by server
Please assist
Happy New Year
Gary
--- End Message ---
--- Begin Message ---
I am trying to turn on apache_child_terminate with PHP V4.3.10 / Apache 2.0.52
When I do a phpinfo(); it returns a:
apache2handler with only three Directives:
- engine
- last_modified
- xbithack
When I look at others with apache 1.3, it lists, child_terminate, which I
need to be able to set.
Does this function only work with Apache 1.3?
Thanks
-Robin
--- End Message ---