Jump to content

Ionisis

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by Ionisis

  1. If i remove the brackets from the name of the form fields, leaving them only as "multimedia", then i get ONE form field's information from the _FILES array: Array ( [multimedia] => Array ( [name] => phphaXl17 [type] => application/octet-stream [tmp_name] => /Multimedia/servers/http/0-logic/temp/phpPSJdFl [error] => 0 [size] => 268552 ) ) Here's another thing: if i manually number the indices for the file names (eg, "multimedia[4]"), then the _FILES array is still empty --that means it MUST be an issue with the way php is processing them or handling them, and NOT a browser / html issue. I'm going to have to move on with this, i've already lost too much time on it. I'm going to have to manually name each of the form fiels (multimedia_1, etc), and handle them that way. I can't believe that i haven't figured this out already........
  2. In this example, i check it as SOON as it's posted back, with: print_r($_FILES);print_r($_SERVER);exit; So, it's empty right off the bat, before any processing at all... Uploading only 1 of the 4 files does the SAME thing. Forgot to mention that i'm using FF4. I'm going to try this with another browser, brb........... Arora: same thing. Chrome: who knows, it sucks so bad that you can't focus a form field without it crashing. POS.......... FF4 - Linux: me, you know the result FF4 - Windows: same thing.
  3. phpinfo shows the same as my specified settings. AFAIK i don't have that patch installed. The 4 test images that i'm trying to upload are less than 100k each, and my upload limits are over 128M, so that's not it either. IDK, this is so aggravating........ Relevant fields from phpinfo: file_uploads On On max_file_uploads 16 16 max_input_time 192 192 memory_limit 152M 152M post_max_size 144M 144M upload_max_filesize 160M 160M upload_tmp_dir /Multimedia/servers/http/0-logic/temp /Multimedia/servers/http/0-logic/temp Also forgot to mention that there is no relevant error in /var/log/httpd/error_log PHP Version: 5.3.5 Server: Fedora 14 Apache: 2.2.17
  4. I've got an upload form, and it works FINE. I tried to modify it to allow for MULTIPLE uploads, and it doesn't work suddenly. I've tried EVERYTHING, and i've googled this for HOURS now. <form method="post" action="" accept-charset="UTF-8" enctype="multipart/form-data"> <div class="con"> <h1 class="headline">Multimedia Upload</h1> <div class="sec"> <input type="hidden" name="MAX_FILE_SIZE" value="67108864"/> <strong class="fnt_ff0000">Each File must be more than 0 bytes,<br/>ALL FILES must TOTAL less than <?=floor($remaining)?>mb</strong> <br/> <label for="multimedia">Choose a fie: Audio, Video, Image</label> <br/> <input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/> <br/> <input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/> <br/> <input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/> <br/> <input tabindex="1" class="button_link" type="file" multiple="true" id="multimedia[]" name="multimedia[]" style="width:98%;" value=""/> <br/><br/> ..... </div> </div> </form> file_uploads = On upload_tmp_dir = /Multimedia/servers/http/0-logic/temp max_execution_time = 200 max_input_time = 192 memory_limit = 152M post_max_size = 144M upload_max_filesize = 128M max_file_uploads = 16 print_r($_FILES);print_r($_SERVER);exit; I get the content length of the TEXT fields --826, but NOTHING for the images (~200kb each). When observing my temp directory during an upload, the files ARE BEING UPLOADED. So, WTF? FTR, action="" is not the issue, neither is id="multimedia[]". I've tried using different ways of each parameter, as well as adding and removing parameters, etc. NOTHING works. Yet, if i REMOVE all of the input fields but 1, it works again... This is killing me --i've wasted HOURS of time on this already. Any ideas? TIA
  5. Sorry guys, i meant to update this last night. The voip server was legitimately refusing the connection. I had to configure it to allow access fro the web. It was not a php issue. I hope this helps the next guy.
  6. Ok, first off, i run my own voip servers, and wanted to integrate a "click to call" on my company's website. I've seen several examples using fsockopen with php, but i keep getting "connection refused" errors. I tried converting the code to use cURL, but i guess that i do not understand enough about fsockopen and the SIP protocol to properly transpose it to cURL. One of the files had something like this: $extension="100" ; //where 9999 is the extension you would like to call $socket = fsockopen("server.ip","5060", $errno, $errstr, 60); fputs($socket, "Action: Login\r\n"); fputs($socket, "UserName: xxxx\r\n"); fputs($socket, "Secret: xxxx\r\n\r\n"); $wrets=fgets($socket,128); echo $wrets; fputs($socket, "Action: Originate\r\n" ); fputs($socket, "Channel: SIP/$extension\r\n" ); fputs($socket, "Exten: $extension\r\n" ); fputs($socket, "Context: outbound-dialing\r\n" ); fputs($socket, "Priority: 1\r\n" ); fputs($socket, "Async: yes\r\n\r\n" ); $wrets=fgets($socket,128); echo $wrets; echo $errstr; ?> and that didn't work. I even tried using ini_set('user_agent','Mozilla Firefox'); just in case my httpd.conf was blocking it (which it SHOULD have nothing to do with this, since we're going to port 5060), and, as expected, that made no difference. I tried using the fields above as curl headers, and to convert the approach to curl, and used the curl_setopt to set the port option to 5060, but it's not working. In my php.ini i have allow_url_fopen = On. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.