PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i have a CURL script to upload to a site a listing file which is in a range of 100MB on an average. When I tried to upload as POST request and tried to get the file as file_get_contents(), it managed to get around 2MB which is well below the expected limit so I need some solution to upload larger files. The reason I am using CURL is because the target server is using HTTP authentication only.
memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)
1. I need your opinion on how to optimise PHP and HTTPD settings. Our server is running Fedora Core 5.
2. Are there are any better ways to upload large files like 100 MB ones?
feyd, the system supports HTTP authentication and HTTP POST upload so I am afraid I cannot use FTP.
Is there is anyway like instead of storing file contents in a string variable is it possible to send N bytes by N bytes until the end of the file.
i have a doubt, normally most of the target system expect content-length, should it be in characters or in bytes, because if we use strlen() then we have to get content in string variable which the system cannot handle.
Suse:/var/www # /opt/lampp/bin/php fsock.php
tempData:
replication:
involves one master and many slaves
master chooses which databases to use for gener
tempData:
ate binary logs
slave has settings about master name, ip, user, password
and the database whic
tempData:
h needs replicated
and also specify the tables to be ignored in each database
also can specify ret
tempData:
ry time
slave has two threads
1. gets data from binary log of server into relay log
2. reads th
tempData:
e relay log and executes it
the slave thread communicates with server asking about some database
tempData:
log with the last read position
the other read also has a marker to know which position it last rea
tempData:
d from the relay log
Error number: 0
Error string:
Return response: HTTP/1.1 200 OK
Date: Tue, 17 Oct 2006 15:22:52 GMT
Server: Apache/2.0.54 (Fedora)
X-Powered-By: PHP/5.0.4
Content-Length: 22
Connection: close
Content-Type: text/html
Array
(
)
Array
(
)
Appears like this target script loads all data from POST into memory and finally writes the file with the content stored in memory but I want it to create a file as soon as it gets POST data and keep transferring to the file until all the POST data is received.
Notice: fwrite(): send of 100 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28
Notice: fwrite(): send of 100 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28
Notice: fwrite(): send of 100 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28
Notice: fwrite(): send of 100 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28
Notice: fwrite(): send of 100 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28
Notice: fwrite(): send of 100 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28
Notice: fwrite(): send of 28 bytes failed with errno=32 Broken pipe in /var/www/fsock.php on line 28