Jump to content

Punk Rock Geek

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Everything posted by Punk Rock Geek

  1. Cool, thanks, that worked. But is there any way I can call "/home/*****/public_html/" without typing it out? I'm going to be using this on different servers, and I want everything to be automatically defined.
  2. For simpicity's sake, I have been changing it to "upload" in this topic. (I just forgot to change it that time.) The name of the actual directory is videos. And yes, it exists in my root folder, and it is CHMOD'd to 777. $target_path = "videos/"; uploads correctly. And $target_path = $_SERVER["DOCUMENT_ROOT"] . "videos/"; returns the error in my previous post.
  3. Got these errors when I turned on all PHP errors: Warning: move_uploaded_file(/var/www/html/upload/homepage01.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/*****/public_html/modules/add_file.php on line 94 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpVUAjh7' to '/var/www/html/upload/homepage01.gif' in /home/*****/public_html/modules/add_file.php on line 94 (***** kept blank for privacy reasons.)
  4. Okay, thanks, I changed target path to $target_path = $_SERVER["DOCUMENT_ROOT"] . "upload/"; I removed the extra / as well. When I echo it, I get: /var/www/html/upload/ However, the file is still not uploading.
  5. Hmm, echoing $target_path when$ target_path= "$_SERVER["DOCUMENT_ROOT"]/upload/"; returns absolutely nothing. Even the "/upload/" part is missing.
  6. The form works when I put the upload folder inside of the same directory as the php file. So: $target_path = "upload/"; Works. However, if the upload folder is in a parent directory, it does not work. I have tried: $target_path = "$_SERVER["DOCUMENT_ROOT"]/upload/"; And $target_path = "../upload/"; Help?
  7. Awesome, thanks! It worked! What would I need to change if I wanted every option in the select box (NOT just the options selected) to be returned in the javascript?
  8. I have a form containing a multiple select box, as follows: Please assume that I already have knowledge of how basic AJAX is structured. I only need to know how the above particular example will differ from basic ones. (For example, if I have an empty name field, and I fill in the name and press submit, my code already successfully adds that name to the database and shows the new name on the page without a refresh.) I am not able to replicate this with multiple options at once however. Specifically, how can I get every option that is selected, to be transferred to the "my_javascript" function? Furthermore, after I send those options from the javascript to the PHP (I assume this step will be identical to "basic" AJAX implementations?), then how do I add each option to the database in my PHP file? Thanks!
  9. With the code: include ($_SERVER['DOCUMENT_ROOT'] . 'plugins/content/jumi/originals/language/file.php'); I am getting no errors. The only error that shows up is this: And that's only because the language variables within file.php are not being included. I used: error_reporting(E_ALL); ini_set('display_errors', '1'); To report the errors.
  10. The variable isn't empty. It just isn't including anything. I don't know what else to add.
  11. Didn't work. Thanks though.
  12. The URL of the file I'm trying to include is: http://www.mydomain.com/plugins/content/jumi/originals/language/file.php
  13. I changed include ($_SERVER['DOCUMENT_ROOT'] . '/directory/file.php'); to include ($_SERVER['DOCUMENT_ROOT'] . 'directory/file.php'); And it got rid of the double slash. Still doesn't work though.
  14. Hmm, nope. I'll need access to the functions and variables still.
  15. When I use var_dump, I get this: The bolded part is what is returned from $_SERVER['DOCUMENT_ROOT']
  16. I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that I wish to include is in. So, here's what I have written: include ('file.php'); This works without any problems. However, I wish to link to this file using an absolute path, rather than a relative one. According to most online tutorials, I would use the following code: include ($_SERVER['DOCUMENT_ROOT'] . '/directory/file.php'); However, this does not work. Does anyone know what the problem might be?
  17. Thanks. It turns out that they don't match. The formvariable is a 38 and the normalvariable is a 34. No idea of how to fix this though?
  18. I have a strange problem. While I know how to replace quotation marks with another character, for some reason it no longer works if the string was created using data from an input form. Here is the start of my code. The first variable was created through an html form. The second one was created without a form: $formvariable = stripslashes($formvariable); $normalvariable = '"'; If I echo $formvariable and $normalvariable at this line, they both return a double quotation mark. They are identical. My code continues: $formvariable = str_replace('"',"", $formvariable); $normalvariable = str_replace('"',"", $normalvariable); Now when I echo them both, the normalvariable's quotation mark gets replaced, while the formvariable stays the same. Even though they were both the same and they both had the same thing done to them. Anyone have any idea of what could be happening? ???
  19. I have a select query: $query = mysql_query ("SELECT * FROM tablename where id=1"); I would like to specifically return the 2nd result as a variable. How would I got about doing this? I have tried this: while ($row = mysql_fetch_array($query)) { $result = $row[1][fieldname]; } But it doesn't seem to do anything meaningful. Help?
  20. Darn, changed it, but it didn't work. Are these difference important? Working server: Registered PHP Streams php, file, data, http, ftp, compress.zlib, https, ftps Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Non-working server: Registered PHP Streams php, file, data, http, ftp, compress.zlib Registered Stream Socket Transports tcp, udp, unix, udg
  21. The only php related setting that I have ever seen that causes a problem with the amount of output is the output_buffering setting. What does a phpinfo(); statement show for it on both a system that works and on the one that does not? Beyond that, you probably have a broken web server/php installation that is cutting off content greater than a certain size. I think there is a web server setting that can cause this (I don't know what the setting is called) and there are patched versions of php that attempt to make it more secure but only cause problems for legitimate users. In any case, you need to be contacting the web host to solve this type of problem. Hmm, you may be on to something. On my server that works, output_buffering is set at 4096. On my server that doesn't work, it is set at no value.
  22. Okay, please ignore my previous post, as I am about 100% confident that the error is not within my code. Not only did this module work on my server before the upgrade, but I also set up a new server today and tested it there. It works there. It does not work on the server it is currently on. I wonder, are there any buggy versions of mysql or php out right now? My current server is: PHP version 5.2.8 MySQL version 5.0.77-community
  23. I get more errors when it actually uploads, strangely... Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined property: usercpForms_members::$do_url in .../public_html/forum/admin/applications/core/modules_public/usercp/manualResolver.php on line 232 Notice: Undefined index: 3e5f4c916b9204579d70445293025481 in .../public_html/forum/admin/sources/classes/session/publicSessions.php on line 1522 And here's the errors when it doesn't upload: Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883 Notice: Undefined index: queryKey in .../public_html/forum/ips_kernel/classDb.php on line 872 Notice: Undefined index: calcRows in .../public_html/forum/ips_kernel/classDb.php on line 883
  24. post_max_size 8M for both local and master value upload_max_filesize 8M for local and 2M for master Yet I can't upload anything larger than 10 KB... I should note that I don't get any errors when I try to upload something larger than 10 KB. Just a blank white screen.
×
×
  • 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.