[PHP] Re: Newbie question on Tutorials?

2001-12-06 Thread The Big Roach

Bunch of them!
Check php.net's links and sift through those.
Web Monkey has a good primer on PHP  MySQL.

Geoff E [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Okay, probably been asked zillions of times already, but I couldn't find
 reference to it in the last 5 minutes. :)

 Where can I find newbie-novice tutorials on php/mysql?

 My server is PHP4/MySql on a Apache/FreeBSD.

 I want to learn how to make these types of sites: Dating, BuySell,
Forums,
 etc...

 I have VB, Delphi, and C programming experience, so I'm hoping it won't be
 too hardcore. :)

 Cheers,

 - Geoff





-- 
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]




Re: [PHP]I know I know, but quick Apache/PHP question

2001-12-06 Thread The Big Roach

Chris,

I'm a bit lost... what exactly is your question?

Chris Cocuzzo [EMAIL PROTECTED] wrote in message
010e01c17e0d$d28e72b0$ae687780@webs224">news:010e01c17e0d$d28e72b0$ae687780@webs224...
hey-

I have php 4.0.6 on Win 2k with Apache 1.3.20 ... I figure I'm close to
getting this installed correctly. I've edited my httpd.conf file to the
point where if I call the php file I want, I get the source in the browser

here's what my .conf file says?

ScriptAlias /php/ c:/php/

and then further down in the file...

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php C:/php/php.exe

can someone point me in the right direction ..?

-chris-




-- 
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] Re: Large file uploads timeout - ouch!

2001-12-05 Thread The Big Roach

I've had the same problem.
I'll get back to you with what I know.
Just give me some time - I'm late for work!


Fred [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm designing a simple content management system with PHP, and it is
 going great, except...

 I do seem to have one problem - I'm trying to use PHP's copy function to
 upload files through a web browser.  It works fine on small files, but
 times out on large ones, like a 20 MB file I'm sending.  I'm on a 1Mbps
 DSL connection, and routinely download 600MB iso images with no problem,
 and seem to be having no connection problems on this end.  My client is
 also getting timeouts on large files, and they're on a different network.

 The web server is running Debian Linux kernel 2.2.19; Apache/1.3.9; PHP
 4.0.6 at a web hosting company.

 I checked the PHP manual, it said that the default maximum file upload
 size is 2MB.  I used phpinfo() to show the server settings, and it reports
 that it is:

 upload_max_filesize=2M
 post_max_size=8M
 max_execution_time=30

 which is the global file upload maximum and POST maximum and execution
 limit.  I changed /cgi-bin/php.ini to include the lines

 upload_max_filesize=200M
 post_max_size=200M
 max_execution_time=2400
 memory_limit=120M

 and saved it.  I tried my upload again, but it still times out. Does
 Apache need to be restarted for the change to take effect?  I ran
 phpinfo() again, and it shows

 upload_max_filesize=200M
 post_max_size=200M
 max_execution_time=2400

 so it looks like it took the change to php.ini.

 I successfully uploaded a 1.8MB file, a 2.2MB file, a 4.1MB file, a 5.4MB
 file, a 6.1MB file, a 6.9MB file, and a 7.05MB file, but a 7.248MB file
 and a 7.6MB file timed out like the larger one.

 I'm doing the upload from IE 6.0 on Windows 2000 (running on my Linux box
 with VMware). I got the same results on Mozilla 0.9.6 on Mandrake Linux
 8.0.

 I've read that PHP file uploads are done in RAM, so perhaps that is part
 of the problem?

 Unfortunately, my client plans to upload ~90MB files this way, and I'd
 like to leave PHP file upload as the only method needed.

 Here's part of the page using the upload/rename/delete script.  It works
 flawlessly on smaller files.

 The only timeout (that I *know of!*) that I don't know how to change is
the
 Apache timeout of 300 seconds.  It appears that it is indeed timing out
 after 300 seconds (five minutes). It shows as HTTP_KEEP_ALIVE = 300 in
 phpinfo().

 All of this is done on a virtual server at a web host, so I don't have
 access to the httpd.conf for Apache, although they *might* change it if I
 know what to ask them...  ;-)

 TIA

 Fred

 /* New to Linux (nine months) and PHP (2 weeks) but loving it! */

 ==

 TABLE BORDER=0 WIDTH=100% CELLSPACING=2 CELLPADDING=2 ALIGN=CENTER

 ?php
 //print(\$Clientcode = $Clientcode, \$Usercode = $Usercode\n);
 /* This file lists all the information for files in a directory and allows
the user to delete, upload and rename files.
 */

 if ($Upload) { // Handle file uploads.
   print (TRTD COLSPAN=4 ALIGN=CENTERUploaded file name:
$File_name/TD/TR\n);
   print (TRTD COLSPAN=4 ALIGN=CENTERUploaded file size:
$File_size/TD/TR\n);
   if (copy ($File, documents/$Folder/$File_name)) {
   print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $File_name, was
successfully uploaded!/TD/TR\n);
   } else {
   print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $File_name, could not
be copied./TD/TR\n);
   }
   unlink ($File);
   print (TRTD COLSPAN=4 ALIGN=CENTERnbsp;/TD/TR\n);
 }

 if ($Delete) { // Handle file deletions.
   for ($i = 0; $i  count ($Delete); $i++) {
   if ( unlink (documents/$Folder/$Delete[$i]) ) {
   print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Delete[$i], was
successfully deleted!/TD/TR\n);
   } else {
   print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Delete[$i], could not
be deleted./TD/TR\n);
   }
   }
   print (TRTD COLSPAN=4 ALIGN=CENTERnbsp;/TD/TR\n);
 }

 if ($Rename) { // Handle file renaming.
   for ($n = 0; $n  count ($Rename); $n++) {
   $OldFilename = $Rename[$n];
   $Old = documents/$Folder/$OldFilename;
   $New = documents/$Folder/$NewName[$OldFilename];
   if ( rename ($Old, $New) ) {
   print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Rename[$n], was
successfully renamed!/TD/TR\n);
   } else {
 print (TRTD COLSPAN=4 ALIGN=CENTERYour file, $Rename[$n], could not
be renamed./TD/TR\n);
   }
   }
   print (TRTD COLSPAN=4 ALIGN=CENTERnbsp;/TD/TR\n);
 }

 // Start the form.
 $HTTP_KEEP_ALIVE = 2400;
 print (FORM METHOD=POST ENCTYPE=\multipart/form-data\
ACTION=\files.php\\n);
 print (input type=\hidden\ name=\MAX_FILE_SIZE\
value=\2\\n); // max file size set to
 200 MB
 print (TRTDh2Folder bi$Folder/i/b:/h2/TD/TR\n);
 print (TRTDBFile Name/B/TDTDBFile
Size/B/TDTDBDelete/B/TDTDBRename/B (Enter the New Name in
the Box)/TD/TR\n);

 // Read the files from the directory.
 $Open = opendir 

[PHP] Re: Large file uploads timeout - ouch!

2001-12-05 Thread The Big Roach

Don't know if you're still there...



-- 
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] Re: A few questions on switching redoing site in PHP

2001-12-04 Thread The Big Roach

Some philosophical observations:
My personal opinion would be to stick to a unix environment (Sun, Linux,
FreeBSD...) and hold on to the Oracle part. I find that JSP is a bit
cumbersome to maintain and program.

An alternative to Oracle would be Postgres/SQL as they handle transactions
relatively similarly. There was an article in Webtechniques which described
the general security of using Postgres instead of MySQL when you can't
afford Oracle. So you should check into that since you'll be handling
sensitive information which can't get lost if someone unplugs the server or
there's a power failure, or some other general disaster. The point being,
the article explained how Postgres can handle data recovery (something stops
in the middle of a process) while with MySQL, I wouldn't be so sure.
(Personally, I love MySQL... because its so easy to use, but I wouldn't rely
on it when it comes to sensitive stuff like keeping track of purchased
goods... I could be wrong. Although I do use it for relatively indifferent
needs! Subscriptions  other traditional database stuff.).

As far as Windows goes, great to play with but I wouldn't trust it with my
life. Something to think about: basic security on Windows is a a hassle. The
OS doesn't behave well when you create .htaccess files (just one example),
I've been able to get past these quite easily using Windows. This on the
otherhand is quite straight forward in unix. And if you forget Windows, you
can then forget about the general head-ache of configuring PHP with IIS and
the SQL server that exists.

Consider hiring a professional unix system manager, someone with Linux or
FreeBSD experience perhaps...
Hope this helps.


Dan McCullough [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 If everyone could gather around for a minute or two.  We are looking at
switching from a
 propriatary JSP/JS/Java based system and going to PHP as our ecommerce
system.  We currently have
 Oracle db and hosted on Sun equiptment, which we are in for another 3
years, although upgrades are
 planned.  We hate the current system, it was picked for us in a closed
room environment.  We have
 been looking to get off ever since we launched, actually even before we
launched.  I have been
 developing in PHP before I got this job and advised against the vendor
that we had, now I want to
 develop my own system.  This is the backend systems we have.  One system
that I'm not to sure of
 is MQ Series, can PHP tie into that, or would we have to work around that,
MQ messages back and
 forth with our legacy system to give a real-time connection to our actual
customer and inventory
 and order processing pieces, although some C++ cdode sits between that and
the JS layer.  Another
 concern is how well does Sun and PHP get along, we have these nice boxes
that is actually
 handleing the memory hog that we have now, and I know that we couldnt just
dump the servers.
 Anyone have an idea on a site that processes between 150-250 orders and
averages $65k a day, if
 PHP and MySQL can handle that, or would I have to go to something like
MSSQL (I know I know MS and
 PHP .. hahahahahaha).  All and any suggestions are welcome.

 dan mccullough
 web technology
 603.823.5545 x 1119
 
 There is no such thing as a problem, unless the servers are on fire.
 Sometimes great opportunity comes brilliantly disguised as bad news.

 __
 Do You Yahoo!?
 Buy the perfect holiday gifts at Yahoo! Shopping.
 http://shopping.yahoo.com



-- 
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] Re: A few questions on switching redoing site in PHP

2001-12-04 Thread The Big Roach

I forgot to add:

Remember that Windows markets itself as an over-all solution to everything:
Windows Server + ASP + IIS + SQL Server.

It depends on whether you want to be outside the box!



-- 
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] Re: PHP Help required

2001-12-04 Thread The Big Roach

Eddie,

There are some good books to get you started running - literally - with PHP
and a database (usually MySQL).
I would recommend PHP Fast and Easy (blue cover with red writing). Each
chapter focuses on a given task... building tables, then adding to table,
then selecting from a table and - ofcourse - displaying the results. If you
sepnd a week just getting used to PHP (if statements, c) or you are already
familiar with these constructs, you will very quickly get involved with
MySQL.

Mrbaseball34 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] says...
  I would like to know if someone could help create:

 I was kind looking for someone to help show me the way. Not really to
 do it all. I was just notified by the league pres. that we do not have
 the budget to pay for anyone else to perform work on the site. We are
 a not-for-profit league and most all the work done on the site is done
 for free including our hosting.

 Sorry if I misled anyone in the NG. Now, if anyone still wants to help...

 Regards,
 Eddie Shipman





-- 
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] Re: link to a pdf file

2001-11-16 Thread The Big Roach

This works for what I do:
Try this and fiddle with the variables.
$conn_id is your pointer to an FTP connection.
Familiarize yourself with the FTP functions in PHP if there are any doubts.

PART I: Put this in one script (say pdf_list.php):
// list server contents
if ((!$F) || ($F==)){
  $dir_list = @ftp_nlist($conn_id, );
  if (!empty($dir_list)){
  while (list($lvar, $lvalue) = each($dir_list)){
  $S = @ftp_size ($conn_id, $lvalue);
  echo $lvaluenbsp;nbsp;$Snbsp;nbsp;[a
href=\download.pdf%20.php?F=http://$ftp_server/$my_dir$lvalueS=$S\;DOWNLO
AD/a]br;
  }
  }
  else {
  echo No files available!br;
  }
}

PART II: And save this as a separate file (download.pdf .php):
==observation: there is a space in this file name. See above: %20!
?php
//You can submit $Dir, $File_Name, $File_Extension by another script
adapting to your needs.
header(Server:Keep-Alive);
header(Accept-Ranges: $S-$S/$S);
header(Content-Length: $S);
header(Content-disposition: filename=$F);
header(Content-type: application/force-download);
readfile($F);
?

Payment can be made with a thousand blondes from the Netherlands: in
bikinis - no camels accepted!
(Fine print: they must be pretty - the girls, not the camels!)


Sjoerd Van Oosten [EMAIL PROTECTED] wrote in message
C9F89DA57491D511BDAF00E0180C348103BFCC@ESADM01">news:C9F89DA57491D511BDAF00E0180C348103BFCC@ESADM01...
 Hello, a question again.

 I have a pdf file which can be downloaded. How can i link to this file so,
 that the file isn't opened in the browser (if acrobat reader is installed)
 but the file download popup appears?

 Greetings,

 
 Sjoerd van Oosten
 Digitaal vormgever [EMAIL PROTECTED]
 Datamex E-sites B.V.
 http://www.esites.nl
 Minervum 7368 Telefoon: (076) 5 730 730
 4817 ZH BREDA Telefax: (076) 5 877 757
 ___






-- 
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] Re: FTP Clients

2001-11-15 Thread The Big Roach

WS-FTP LE works for me.
I've used it for years now.
You can find it at Download.com

Bunch of stuff there.

Rudi Ahlers [EMAIL PROTECTED] wrote in message
012e01c16d53$5b582120$0c00a8c0@camelot">news:012e01c16d53$5b582120$0c00a8c0@camelot...
 Sorry for the totally OT question, but can anyone recommend a good, FREE,
 FTP client for windows? I now have to pay for AceFTP aswell, which used to
 be free.
 Thank you


 Rudi Ahlers




-- 
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]




Re: [PHP] Books for PHP and MySQL Class

2001-11-15 Thread The Big Roach

I think a better strategy would be to introduce them to the basics of
databases in general as opposed to trying to teach MySQL to them. A good
primer on DB's would be Databases for mere mortals by ... ? some guy! But
the cover is orange/brown and not very thick. Can't find it here... where
did I put it.

MySQL only books are a bit technical, and basically cover installation with
few good examples.
The technical and syntax bits can also get a bit heavy-going in my opinion.
Check out O'Reilly's MySQL and MSQL - pink cover. (for panzy MySQL
developers! ... oops! I've got a copy.)

But as far as PHP goes, check out PHP: Fast  Easy Web Development (blue
cover) by Julie Meloni - Prima Tech.
It covers MySQL in as far as creating tables and stuff go.
It has plenty of good examples in PHP too.
Otherwise, the WROX books really are the best.

Clint Tredway [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I also have the PHP  MySQL Web Development book and I used it to learn
PHP and MySQL. I think it is one of the better books.

 my opinion..

 Clint

 -- Original Message --
 From: [EMAIL PROTECTED] (Chris Lott)
 Date: 15 Nov 2001 19:41:18 -

 I'll be teaching a web development class in the Spring in which I plan to
 focus on PHP and MySQL as primary tools. These will be students who have
 experience with HTML And web design, but most will have no experience with
 programming at all.

 I need recommendations for book(s) that will serve as decent primers... I
 expect that the PHP book will have enough of the fundamentals of
programming
 to set them on the right path...

 Any suggestions for a MySQL book would be great. If both were in one book,
 even better!

 --
 Chris Lott [EMAIL PROTECTED]

 --
 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 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]




Re: [PHP] High-Volume Newsletter Techniques?

2001-11-14 Thread The Big Roach

Just a reminder of sorts when dealing with this kind of issue.
Where I work, we never had a need to mail 20,000+ newsletters but we do
distribute 300 or so each week.
On our initial tests, we discovered our external smtp server (our isp
account), limited our mailings to chunks of 20 emails at a time, which meant
we had to reconnect after every 20 newsletters had been sent.
We still deal with this issue, and are looking for a more efficient/friendly
isp to handle our needs.
Alternatively (plan B) we could set up our own server in-house.
We don't know yet but there could be also limits on our DSL connection
imposed by the ISP.

Still studying the problem.

Ciao, Fans!

Larry Jeannette II [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 This is something I am curious about also. We are currently building a
 system to allow people to maintain/send out newsletters (40,000+). We have
 done some initial testing of the process (which uses the mail() function)
 and have found that it takes about 30 - 40 minutes to process 4000 emails.

 Right now we are doing this through a web page so we can watch the
process,
 I myself, was perplexed when the script didn't timeout after 2.5 minutes
 (the timeout period set in php.ini) and actually finished the process. My
 question is: will this still be true when sending out 40,000 emails and
the
 process takes 5 - 6 hours? Like Sondra, I don't really want to anger
 thousands of people testing this thing out.

 Larry Jeannette



 Sondra Russell writes:

  Yes, I saw the discussion a few days earlier on this topic, but I'm
  wondering if there is still some unmined wisdom out there about
  building a script that sends a newsletter out to 25,000+ people
  The very impressive class I found (phpmailer-1.41) looked great, but
  it didn't *directly* address the high-volume issue in the readme so
  I'm still a little nervous.
 
  And, unfortunately, it's not one of those types of technical
  challenges you can keep testing over and over without seriously
  annoying the first 100 or so people on your list who *do* get the
  email before the script times out.
 
  I think the amount of trash email I get each day proves that vast
  mailings aren't TOO difficult, but I think I could use a little
  wisdom before I give it a shot.
 
  Anyone?  I'll buy you a coke!
 
  Thank you in advance,
  Sondra Russell
 
  --
  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 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] Re: Empty form variables when uploading, Help please???

2001-11-13 Thread The Big Roach

In a form you can't really have 2 submit buttons.
Either a submit submits or it is just a button.
That's because the var name is already submit (check out your
http_post_vars).
And you have it twice!
Change one of them and make it just a button (HTML4).
Recheck your post-vars.
This should help.

Otherwise you're loosing your post vars somehwere in the fire-wall.
That's bad!


Sandra Rascheli [EMAIL PROTECTED] wrote in message
003601c16abd$3985ae70$c46223c8@srascheli">news:003601c16abd$3985ae70$c46223c8@srascheli...
Hi everybody,

I hope someone is able to help me with this, I've been having this problem
for  a couple of months now and I have not been able to find a solution. I
have a form to upload a file which submits to itself, and has two submit
buttons, one called eliminarfoto (deletephoto) and salvar (savephoto),
but for some weird and unexplainable reason (it only happens to some users,
not all of them) when they hit any of these two submit buttons, the form
returns empty variables.

This is part of my script, has anybody had a similar problem before??? Any
help would be greatly appreciated.

 FORM ENCTYPE=multipart/form-data ACTION=foto.php METHOD=POST
 TABLE border=0 cellPadding=2
 TR
  TD VALIGN=TOPPFONT face=Verdana size=1BFoto/B
  (opcional,brtamaño máximo: 20k,brformatos permitidos: JPEG,
GIF)/FONT/TD
  TD
  ? if ($foto)
  {
  echo IMG align=bottom border=0 width=140 height=160
src=\../fotos/$foto?nc= . time() .\br;
  }
  ?
  INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
  INPUT NAME=userfile TYPE=file
  INPUT TYPE=submit NAME=eliminarfoto VALUE=Eliminar
  INPUT TYPE=hidden NAME=foto VALUE=? echo $foto ?
  /TD
 /TR
 TR
  TD VALIGN=TOP COLSPAN=2 ALIGN=CENTER
  font face=Verdana,Arial,Helvetica,Sans-serif size=2
  INPUT TYPE=SUBMIT NAME=salvar VALUE=Continuar -/TD

 /TR
 /TABLE
 /FORM







-- 
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] I Need To Upload Massive Huge Files : 20Mb

2001-11-13 Thread The Big Roach

Fans!

I need your help, but first you must worship me.
Does PHP have a flakey file upload limit? Or what could be wrong?

max_upload_size and all that is set to 32Mb.
post_max_size is also set to 32Mb.
max_exec_time is set to 0 (unlimited).
apache's timeout is set to 1800 (30 mins).

And my 6Mb or less files upload.
But not my 7+Mb files.
This is frustrating.

But I think Rasmus can answer this for me.
Rasmus, over to you...

Here's my code just to prove I'm not a proud ^%#@!

  $conn_id = ftp_connect($ftp_server);
  $login_result = ftp_login($conn_id, $ftp_user_name,
$ftp_user_pass);
  if ((!$conn_id) || (!$login_result)){
  echo Ftp connection failed!;
  die;
  }
  else {
  echo Connected to $ftp_server!br;
  }

  @ftp_chdir($conn_id, $my_dir);

  @ftp_pasv ($conn_id, TRUE);

  /*Using ftp_fput*/
  $local_file = fopen($source_file, r);
  $upload = @ftp_fput($conn_id, $destination_file, $local_file,
FTP_BINARY);
  /*Using ftp_put*/
/*  $upload = @ftp_put($conn_id, $destination_file, $source_file,
FTP_BINARY);*/

  if (!$upload) {
  echo Ftp upload failed!brbr;
  $headers = getallheaders();
  while (list ($header, $value) = each ($headers)) {
  echo $header: $valuebr\n;
  }
  }
  else {
  echo Ftp upload successfull!brbrUploaded $destination_file to
$ftp_server/$my_dirbrbr;
  $headers = getallheaders();
  while (list ($header, $value) = each ($headers)) {
  echo $header: $valuebr\n;
  }
  }

  @ftp_quit($conn_id);




-- 
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]




Re: [PHP] I Need To Upload Massive Huge Files : 20Mb

2001-11-13 Thread The Big Roach

Thanks Sebastian,

I'll take a look at our proxy logs.
I've also discovered a perl script deep in the bowels of our servers which
seem to be a problem.
Here's an error log excerpt:

POPSTACK
panic: POPSTACK
panic: POPSTACK
panic: POPSTACK
panic: POPSTACK
panic: POPSTACK
[Tue Nov 13 13:26:57 2001] [error] [client IP ADDRESS HERE] Premature end
of script headers:
/usr/local/etc/httpd/htdocs/imanager/wizards/fm_upload.cgi
FATAL:  erealloc():  Unable to allocate 6940001 bytes

Can't imagine why it panics when it pops the stack.
Anyhow, proof here-in lies that I'm being limited : unable to allocate
bytes.
Unforunately I have no admin rights setup for this machine to mess with this
cgi.

I'll keep you all posted... seems like there's a lot of interest in
uploading files, c.

Sebastian [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi

We encountere some problems with our Squid-Proxy.
When we user direct internet connection the sky was the limit,
but with our Proxy, the limit was 2MB...

Sebastian

 -Ursprüngliche Nachricht-
 Von: The Big Roach [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 13. November 2001 17:31
 An: [EMAIL PROTECTED]
 Betreff: [PHP] I Need To Upload Massive Huge Files : 20Mb


 Fans!

 I need your help, but first you must worship me.
 Does PHP have a flakey file upload limit? Or what could be wrong?

 max_upload_size and all that is set to 32Mb.
 post_max_size is also set to 32Mb.
 max_exec_time is set to 0 (unlimited).
 apache's timeout is set to 1800 (30 mins).

 And my 6Mb or less files upload.
 But not my 7+Mb files.
 This is frustrating.

 But I think Rasmus can answer this for me.
 Rasmus, over to you...

 Here's my code just to prove I'm not a proud ^%#@!

   $conn_id = ftp_connect($ftp_server);
   $login_result = ftp_login($conn_id, $ftp_user_name,
 $ftp_user_pass);
   if ((!$conn_id) || (!$login_result)){
   echo Ftp connection failed!;
   die;
   }
   else {
   echo Connected to $ftp_server!br;
   }

   @ftp_chdir($conn_id, $my_dir);

   @ftp_pasv ($conn_id, TRUE);

   /*Using ftp_fput*/
   $local_file = fopen($source_file, r);
   $upload = @ftp_fput($conn_id, $destination_file, $local_file,
 FTP_BINARY);
   /*Using ftp_put*/
 /*  $upload = @ftp_put($conn_id, $destination_file, $source_file,
 FTP_BINARY);*/

   if (!$upload) {
   echo Ftp upload failed!brbr;
   $headers = getallheaders();
   while (list ($header, $value) = each ($headers)) {
   echo $header: $valuebr\n;
   }
   }
   else {
   echo Ftp upload successfull!brbrUploaded
 $destination_file to
 $ftp_server/$my_dirbrbr;
   $headers = getallheaders();
   while (list ($header, $value) = each ($headers)) {
   echo $header: $valuebr\n;
   }
   }

   @ftp_quit($conn_id);




 --
 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 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]