Re: [PHP] Help with the copy command...

2005-12-16 Thread Tim Meader
What difference are you seeing in the files I give in the example? Are
they not identical paths?

Thanks.

Hristo Yankov wrote:
 The two examples you give are not the same? I see
 different files. Please, doublecheck.
 
 --- Tim Meader [EMAIL PROTECTED] wrote:
 
 Okay, this seems like a ridiculously easy question
 which shouldn't even
 need asking, but I'm having trouble getting the
 builtin copy command to
 work properly. It seems to work fine as long as I
 feed it a full
 constant string path for each argument (ie - in the
 form
 /the/path/to/the/file). However, if I try to feed
 it two variables as
 the arguments, it craps out somewhere along the
 line. Here are the two
 different sets of calls I'm making:

 These two work perfectly:


 copy(/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline,
 /usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline.bak)
 ;

 copy(/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp,
 /usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp.bak);
 These two fail:

 $l_stLastRun =

 /usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp;
 $l_stSnapshotBase =

 /usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline;
 copy($l_stSnapshotBase, $l_stSnapshotBase..bak);
 copy($l_stLastRun, $l_stLastRun..bak);

 Can anyone offer any insight on what the problem
 might be with this? The
 unlink function seems to accept the variable
 inputs with absolutely no
 problem, so I can't understand the discrepancy
 between the two.

 Thanks in advance.

 Tim

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 
 
 ===
 Hristo Yankov, Developer at Portellus, Inc.
 ICQ - 191445567
 Yahoo! - yankov_hristo
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 

-- 
Tim
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help with the copy command...

2005-12-15 Thread Tim Meader
Okay, this seems like a ridiculously easy question which shouldn't even
need asking, but I'm having trouble getting the builtin copy command to
work properly. It seems to work fine as long as I feed it a full
constant string path for each argument (ie - in the form
/the/path/to/the/file). However, if I try to feed it two variables as
the arguments, it craps out somewhere along the line. Here are the two
different sets of calls I'm making:

These two work perfectly:

copy(/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline,
/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline.bak)
;
copy(/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp,
/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp.bak);

These two fail:

$l_stLastRun =
/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/lastrun.timestamp;
$l_stSnapshotBase =
/usr/local/apache/htdocs/ipreg2/crons/regservice_rep/snapshot.baseline;

copy($l_stSnapshotBase, $l_stSnapshotBase..bak);
copy($l_stLastRun, $l_stLastRun..bak);

Can anyone offer any insight on what the problem might be with this? The
unlink function seems to accept the variable inputs with absolutely no
problem, so I can't understand the discrepancy between the two.

Thanks in advance.

Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Any performance experiences to offer?

2005-11-25 Thread Tim Meader
Are there any benchmarks that people are aware of comparing
PHP4|PHP5|PHP5.1 as far as performance is concerned? I mean, it's easy
to say that performance is improved... but what's the baseline?

Was PHP5 faster than PHP4 for identical code? Thus making PHP5.1 even
faster? Or was it a case of PHP5 being a bit more bulky than PHP4, thus
PHP5.1 bringing it more inline with the old performance. I'm looking to
upgrade of PHP 4.4.1 installs, but I'm holding off on PHP5.1 until
eaccelerator (open source PHP accelerator) becomes compatible. As it is,
PHP5.0.5 is the last supported version. But if 5.0.5 is slower than
4.4.1, I'll hold off.

Thanks in advance.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Please help on session_destroy error...

2004-01-01 Thread Tim Meader
I'm looking for help trying to do away with an error I get from time to 
time in my access control session logic. Here is my session setup from the 
php.ini:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = gsfc.nasa.gov
session.cookie_secure = On
session.serialize_handler = php
session.gc_probability = 100
session.gc_maxlifetime = 1800
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 32
session.entropy_file = /dev/urandom
session.cache_limiter =
session.cache_expire = 180
session.use_trans_sid = 0
Now, to my understanding, with this setup, the session cookie should be 
good for as long as the browser is open, the garbage collector will be run 
on any session startup, and a session should be considered garbage after 3 
hours.  My problem is that these settings don't always seem to be followed. 
Even after sitting for only 60 minutes sometimes, if I click on the logout 
button in my interface (which executes the following code), I get a 
session_destroy error, about it the session being called for destruction 
not being found

if ((!empty($_GET['action']))  ($_GET['action'] == logout)) {
session_unset();
if (!empty($_SESSION['logged_in'])) {
session_destroy();
}
 }
The only other code is simple HTML output. The session variable logged_in 
is set upon successful login initially. My rationale for that variable is 
that if the session file gets removed via the garbage collector, then that 
check above should fail, and the session_destroy function won't be called. 
But this doesn't seem to ever work. Is there anything I'm missing here? Any 
help would be appreciated. This is all running on Apache 1.3.29, using 
Redhat 8 with all current updates, and PHP 4.3.4.

Thanks in advance for any help you may have.



---
Tim Meader
CNE ODIN Unix Group
Lockheed Martin Information Technologies
[EMAIL PROTECTED]
(301) 286-8013 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Please help on session_destroy error...

2004-01-01 Thread Tim Meader
I'm looking for help trying to do away with an error I get from time to 
time in my access control session logic. Here is my session setup from the 
php.ini:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = gsfc.nasa.gov
session.cookie_secure = On
session.serialize_handler = php
session.gc_probability = 100
session.gc_maxlifetime = 1800
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 32
session.entropy_file = /dev/urandom
session.cache_limiter =
session.cache_expire = 180
session.use_trans_sid = 0
Now, to my understanding, with this setup, the session cookie should be 
good for as long as the browser is open, the garbage collector will be run 
on any session startup, and a session should be considered garbage after 3 
hours.  My problem is that these settings don't always seem to be followed. 
Even after sitting for only 60 minutes sometimes, if I click on the logout 
button in my interface (which executes the following code), I get a 
session_destroy error, about it the session being called for destruction 
not being found

if ((!empty($_GET['action']))  ($_GET['action'] == logout)) {
session_unset();
if (!empty($_SESSION['logged_in'])) {
session_destroy();
}
 }
The only other code is simple HTML output. The session variable logged_in 
is set upon successful login initially. My rationale for that variable is 
that if the session file gets removed via the garbage collector, then that 
check above should fail, and the session_destroy function won't be called. 
But this doesn't seem to ever work. Is there anything I'm missing here? Any 
help would be appreciated. This is all running on Apache 1.3.29, using 
Redhat 8 with all current updates, and PHP 4.3.4.

Thanks in advance for any help you may have.



---
Tim Meader
CNE ODIN Unix Group
Lockheed Martin Information Technologies
[EMAIL PROTECTED]
(301) 286-8013  

[PHP] Please help on session_destroy error...

2004-01-01 Thread Tim Meader
I'm looking for help trying to do away with an error I get from time to
time in my access control session logic. Here is my session setup from the
php.ini:
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = gsfc.nasa.gov
session.cookie_secure = On
session.serialize_handler = php
session.gc_probability = 100
session.gc_maxlifetime = 1800
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 32
session.entropy_file = /dev/urandom
session.cache_limiter =
session.cache_expire = 180
session.use_trans_sid = 0
Now, to my understanding, with this setup, the session cookie should be
good for as long as the browser is open, the garbage collector will be run
on any session startup, and a session should be considered garbage after 3
hours.  My problem is that these settings don't always seem to be followed.
Even after sitting for only 60 minutes sometimes, if I click on the logout
button in my interface (which executes the following code), I get a
session_destroy error, about it the session being called for destruction
not being found
 if ((!empty($_GET['action']))  ($_GET['action'] == logout)) {
 session_unset();
 if (!empty($_SESSION['logged_in'])) {
 session_destroy();
 }
  }
The only other code is simple HTML output. The session variable logged_in
is set upon successful login initially. My rationale for that variable is
that if the session file gets removed via the garbage collector, then that
check above should fail, and the session_destroy function won't be called.
But this doesn't seem to ever work. Is there anything I'm missing here? Any
help would be appreciated. This is all running on Apache 1.3.29, using
Redhat 8 with all current updates, and PHP 4.3.4.
Thanks in advance for any help you may have.



---
Tim
[EMAIL PROTECTED] 

[PHP] Apologies for multiple posts.

2004-01-01 Thread Tim Meader
I was getting a posting failure message from this listserv's 
auto-responder, but they appear to have posted anyway.

---
Tim
[EMAIL PROTECTED] 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Slow file uploads.

2003-01-07 Thread Tim Meader
Unfortunately not that I know of with PHP. However, I had to do the same 
thing for our users here and I found a great solution to be mod_perl for 
Apache. It writes to disk into a temporary file and then copies that file 
into the dir you specify. This isn't evangelism, just informing you of how 
I eventually solved the same problem on my end. Also look into libapreq for 
Apache... simplifies things even more. However, I'd stick with Apache 
1.3.27 if you go this route though, mod_perl's Apache 2 version isn't quite 
up to production snuff.

Hope this helps.

At 06:26 PM 1/7/2003 +0100, Claes Gustavsson wrote:
Hi

I'm developing a site where the user shall be able to upload files. The 
size of theese files can range from
approx. 1-500 Mb. The problem is that the file upload is stored in memory
and starts to swap with large files (~  100 Mb).
I want the uploaded file to be written directly to disk.
Is there any settings for this?

Server info:
Cobalt RaQ 4
512 Mb RAM
Cobalt Linux release 6.0 (Shinkansen-Decaf)
apache 2.0.43
PHP 4.2.3


/Claes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


---
Tim Meader
ODIN Unix Group
ACS Government Services, Inc. - (301) 286-8013
[EMAIL PROTECTED] 


[PHP] LOOKING FOR CODE LOCATION IN PHP SOURCE....

2001-01-29 Thread Tim Meader

Hey all, I've come to the realization that if I intend to be able to write 
a file to disk AS it's being uploaded via http, I will need to modify the 
PHP source directly. Just wondering, anyone know in what source file I 
should be looking for the HTTP UPLOAD handling code, I've looked through 
quite a few files in the /ext/standard source directory, to no avail yet. 
Thank you in advance to any and all for your help


Tim Meader
[EMAIL PROTECTED]
ACS Government Solutions Group


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Urgent answers needed for FILE UPLOAD problem....

2001-01-25 Thread Tim Meader

Hello all. I've spent the past month or two implementing a file upload 
utility for the web based on PHP's http upload method. It works fine for 
smaller files, and it's been working fine for files I've tried up to and 
including 400 megs at a time. The problem I'm having is that we want to 
roll this out on a center-wide scale, but that would most likely mean files 
up to 1Gig being uploaded at a time. Is this possible through the http 
upload process. I've been unsuccessful thus far to upload a file this large 
for some reason. Upon checking the Apache error_log, I found the following 
message:

FATAL: erealloc(): Unable to allocate 112568001 bytes
[error] PHP Warning: File Upload Error - No Mime boundary found after start 
of file header in unknown line 0

Now, am I correct in thinking that the second line is merely a result of 
the failed upload? If so, then I suppose that can be disregarded, but which 
program is generating the erealloc(), Apache or PHP?

I've been following threads on File Upload for quite a while now, and all 
relevent settings in the php.ini are set correctly to allow file uploads of 
this size (at least in theory). All settings having to do with upload 
limits are set at "20", however, no documentation states what value 
this setting stands for (kb, Mb, etc.), so this SHOULD roughly be equal to 
2Gigs, assuming that it defaults to bytes. Also the timeout has been set to 
86400 seconds, ie a 24hour period.

The current box this is running on is a Ultra 5 running Solaris 7, Apache 
1.3.14, with PHP 4.0.4. It has 256 megs of ram, and the partition being 
used for this test phase is 18 gigs, so size shouldn't be an issue. The 
temp upload directory in the php.ini has also been set to use a temp folder 
on this same partition.

PLEASE, any suggestions you have would be MUCH appreciated. Thank you in 
advance for any and all replies. Hope to hear something soon!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] A second question about http File Upload...

2001-01-25 Thread Tim Meader

In my previous message I stated how some uploads were failing past a 
certain size. What I want to know is, is it possible to force PHP to write 
the uploaded contents as it receives them, or must they all be written at 
the end? In other words, does the file you are currently uploading have to 
completely fit into Memory (physical or virtual) before it can be written 
to disk? There is a perl script available that allows for file uploads that 
lets you write to disk as it's uploaded, instead of in one fell swoop at 
the end. Is this functionality available in PHP, and if so, where might I 
find it? I've never seen any mention of this ability in the documentation 
unfortunately.  


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]