dsjoes
-
Posts
149 -
Joined
-
Last visited
Never
Posts posted by dsjoes
-
-
webhost online
-
it shows nothing it just goes to the 500error after trying to upload
-
yes they are showing what they are set at
-
I have looked through the log files but there are none to do with the upload script errors and none are from around the the time i got the error.
I have tryed changing them to the below but it is still the same
post_max_size = 450M
memory_limit = 900M
upload_max_filesize = 150M
-
i have an upload form that lets me upload files but when i try to upload a file 116mb i get a 500 error. i have changed the following in the php.ini but it still does it.
upload_max_filesize = 150M
post_max_size = 150M
memory_limit = 150M
<?php if(isset($_FILES['upload'])){ $target = "uploads/".basename($_FILES['upload']['name']) ; print_r($_FILES); if(move_uploaded_file($_FILES['upload']['tmp_name'],$target)) echo "OK!"; } else{ } ?>
-
thanks got it working
-
how would i loop the below script so that more than one file can be uploaded. my form lets you select more than one image but i am not sure how to loop the below.
if( isset($_POST['submit']) ) { include('thumbnail.php'); $userfile = $_FILES['uploaded_image']['name']; $file_size = $_FILES['uploaded_image']['size']; $file_temp = $_FILES['uploaded_image']['tmp_name']; $file_err = $_FILES['uploaded_image']['error']; $folder = $_POST['folder']; $path = "../../gallery/gallery_files/gallery/$folder/"; $path1 = "../../gallery/gallery_files/gallery/$folder/thumbnails/"; $image = new SimpleImage(); $image->load($file_temp); $image->resizeToWidth(600); $image->save($path.$userfile); $image->resizeToWidth(110); $image->save($path1.$userfile); } else { }
-
how do i have a div popup when a link is pressed.
the below is the div that i want to popup and the link needs to have ?old=$folderName so that the form gets the correct info.
<a href='?old=$folderName'>Rename</a> <div id="Rename" style="display:none"><iframe src="form.php?old=<?php echo $old=$_GET['old'] ?>" frameborder="0"> </iframe></div>
can someone help point me in the right direction.
thanks
-
i have a div with an iframe in it that when i click on a link it pops up but what i am trying to do is add ?old=$folderName to the link but when i do the popup is blank. so does anyone know something i can try. (i am using facebox to create the popup)
this is the link for the popup <a href='#Rename' rel='facebox'>Rename</a> this is with ?old=$folderName added this displays the blank popup <a href='#Rename?old=$folderName' rel='facebox'>Rename</a>
this is the div with iframe
<div id="Rename" style="display:none"><iframe src="form.php?old=<?php echo $old=$_GET['old'] ?>" frameborder="0"> </iframe></div>
-
anyone know anything i can do or try to get it working.
-
The script below works but it goes straight to the junk folder only since i added the parts below to the form. (the form is in another file)
How do i stop it from going to the junk folder.
$error = $_GET['error'];$httpagent = getenv ('HTTP_USER_AGENT');
$url = $_SERVER['HTTP_REFERER'];
<?php require_once "Mail.php"; $optional = $_POST['optional']; $error = $_POST['error']; $url = $_POST['url']; $httpagent = $_POST['browser']; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; $from = "Web server <removed>"; $to = "Admin <removed>"; $subject = "Someone has submitted an error."; $body = "Someone has submitted an error.\n". "Error: $error\n". "URL: $url\n". "Web browser: $httpagent\n". "Anything else you want to add?: $optional\n". "IP: $ip\n"; $host = "removed"; $username = "removed"; $password = "removed"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { header('Location: thank-you.html'); } ?>
-
thanks that works
-
how do i get the url using the below? I have set up my error pages so that there is an iframe with a form on so the error can be reported but because i have the below on the iframe it gets the iframe url and not the url that produced the error.
it is displaying this
example.com/error/report.php
but it should be this
example.com/fake.php
$requri = getenv ("REQUEST_URI"); $servname = getenv ("SERVER_NAME");
-
what would be the best way to rename a folder on button click by using show/hide div with form inside or an iframe/popup box with form on separate page.
or do you know a better way.
this will be used for changing folder names and image names on my gallery so it will be on the page alot so i want the best way so that the page is not slowed down by alot of repeated code.
thanks
-
thank you that works i had to change the part below because it deleted all folders and images instead of the selected folder.
if(isset($_POST['file']) && is_array($_POST['file'])) { foreach($_POST['file'] as $file) { $dirname = $path.$file;
-
fixed it but now i get a load of unlink rmdir errors
Warning: unlink(../../gallery/gallery_files/gallery/Group1/.) [function.unlink]: Is a directory
Warning: rmdir(../../gallery/gallery_files/gallery/Group1) [function.rmdir]: Directory not empty
Warning: unlink(../../gallery/gallery_files/gallery/Group1/..) [function.unlink]: Is a directory
Warning: unlink(../../gallery/gallery_files/gallery/Group1/thumbnails) [function.unlink]: Is a directory
-
directory not found.
-
nothing has changed just the error is displayed
-
i get this error now
Warning: readdir(): supplied argument is not a valid Directory resource
-
bump?
-
it has a separate form that i use to select a check box and then click delete that works it is just the delete part of the script.
-
what do i need to do then?
-
i have the below script but it doesn't work it just refreshes the page anyone know what is wrong
<?php $path = "../../gallery/gallery_files/gallery/"; if(isset($_POST['file']) && is_array($_POST['file'])) { foreach($_POST['file'] as $file) { $dirname = $path; //Recursive Delete Function function DELETE_RECURSIVE_DIRS($dirname) { // recursive function to delete // all subdirectories and contents: if(is_dir($dirname))$dir_handle=opendir($dirname); while($file=readdir($dir_handle)) { if($file!="." && $file!="..") { if(!is_dir($dirname."/".$file))unlink ($dirname."/".$file); else DELETE_RECURSIVE_DIRS($dirname."/".$file); } } closedir($dir_handle); rmdir($dirname); return true; } } } ?>
-
ok i have been messing with this bit
<center><h1>Newsletter</h1></center>
it display ok with out the tags but if i just have center tags that adds a small gap but when i ass the h1 tags it adds the big gap but if i have both then it is just the big gap so the css i posted earlier is not working.
anyone know what i could try?
file upload
in PHP Coding Help
Posted
is there another way to upload files to my web host through a web page with out using move_uploaded_file() because my web host is useless and changes to the below do nothing.
post_max_size
memory_limit
upload_max_filesize
i am wanting to be able to upload video files between 50mb and 100mb but at the minute the only way i can do it is when i logon to the webserver filemanager or with filezilla