No matter what I change in this script, when I go to upload the file, the page is looking for the action do-nothing.htm. This is what the ACTION of the plugin is set to in the downloaded example, but I have changed it.
I have also changed some lines in the Javascript to see if I could get something working, but nothing. In fact I can't seem to find any reference to do-nothing.htm yet the console still gives me a 404 error do-nothing.htm not found. Any ideas?
the example works.
Related
I am trying to use an image slider like anything slider. When I place all the contents on the same file it works without a glitch, but when I separate the code into the header include, footer include and then the file itself it no longer works.
I checked my file paths and all seems to be correct and I run into the same issue when I use other image sliders. Not sure how to resolve the issue.
Thanks for your help
Try a developper console to obtain some debug information (Press 'F12' on chrome or install the firebug extension on Firefox).
There should be a "Network" tab that shows what requests are made from the page.
And a "JS console" that may reveal some JS errors.
Maybe it will help you understand what is happening.
Don't hesitate to post results here, and a link to your page.
Hi I have the following problem. I use jQuery file upload plugin and want to implement file uploader in one of my website pages. I am using the UI version so the thing is working, the files are uploaded but when i try to delete them i have an 404 error on the request. I am using POST request. The problem is that I get 404 header error and that is screwing the code. My page is responding with the right JSON data but the header is 404 I searched the whole [uploader class][3], but i can't find where the header is set and even if I comment that 404 line
if (!$this->is_valid_file_object($file_name)) {
return $this->header('HTTP/1.1 404 Not Found');
}
Nothing happens so I cant understand where in which javascript file or in the upload handler class the headers go wrong and how to fix the problem.
So my ajax return is like follows:
_method:DELETE
/my_domaing/some_page/uploadAction/file:action_test_file_3%20%281%29.doc
POST 404 Not Found text/plain jquery.js:8706 Script 991 B 360 B 20 ms 20 ms
I think the problems comes from my framework cause in plain php I can upload and delete files. But when i open the page in my browser with that link I can see the JSON response which is:
{"file":{"name":"action_test_file_3.doc", "size":61440,
"url":"http:\/\/my_domain\/files\/action_test_file_3.doc",
"deleteUrl":"http:\/\/my_domain\/some_page\/uploadAction\/file:action_test_file_3.doc\/
_method:DELETE\/file:action_test_file_3.doc\/_method:DELETE","deleteType":"POST"}}
I don't know what I need to get so the file be deleted, but I know that the header information is gone wrong cause I can open it and see the information but the POST request sees the 404 error and just doesn't do nothing.
The framework I use have a .htaccess rewrite rule which is the following:
RewriteEngine On
RewriteRule !\.(js|ico|gif|jpg|png|css|swf|htc|txt|doc|docx|xls|xlsx|pdf|htm|html|
bmp|flv|xml|zip|plist|ipa|woff|ttf|svg|eot)|^design(.*)|^sks(.*)$ index.php
But I don't think the rule has anything to do with this upload. My framwork uses Smarty. I really can't find the way to solve the problem the uploading is working perfectly so why not the deleting. And I have write/delete permissions on the directory.
I don't get any javascript errors and in my php log there are not errors regarding this page.
So I think the problem is with the header information and if it returns 404 the file is just not deleted that is all. But I can't understand where and how this is happening.
So feel free to ask me anything but I can't send you a live demo cause it is a developer server, but I will do anything to try and resolve this problem cause I am struggling with it for almost 2 days. Any help is and will be appreciated!
I am having problem running script of PHPWord.
I am trying to run sample example. Text.php after running it doesn't show anything. I checked it loads class successfully. Documentation.
I would like to able to run script anyone has this problem.
This is what i did -
Downloaded PHPWord_0.6.2_Beta.zip from Download link.
Extracted the zip under htdocs/core/phpword.
Created swap.php and pasted the whole code what was mentioned at Link
Commented, this is it was showing error.
//$myTextElement->setBold();
//$myTextElement->setName('Verdana');
//$myTextElement->setSize(22);
Now i run swap.php file and helloWorld.docx successfully created. You can flag a message if you want in that file. Let me know if you have any query.
I have a weird unexplainable phenomenon going on.
I downloaded some source code from a website, a basic PHP script. It came with an SQL to reference numbers as part of the script.
I uploaded the file called post.php and SQL file to my server and ran it - but - instead of executing the code in the PHP file, it loads the content of the webpage of the author of the source code. and stays on my server URL.
The code in the file has nothing to do with the author's site, or graphics or links or redirects or anything.
EVEN IF I delete the entire contents of the post.php file, run the empty file and it STILL LOADS CONTENT from the author's website, where I downloaded it from.
Refreshed browser, restarted, reloaded, you name it. How is this physically possible?
-----UPDATE
In addition when I try renaming PHP files on my server, they become permanently broken "oops broken link" error.
It would be very helpful if you could post some more specific details about what the script was, etc. But, here is my guess. Firstly, make sure that your web server is not doing any caching. If the problem persists, try getting rid of the post.php file itself. Then, I would check to see if the PHP script has created any HTML/PHP files on its own. If all else fails, try going into the code that you downloaded and see what its doing.
I feel pretty stupid asking this... but I have a small php script that generates a image based on some GETs and output's it to the browser.
It works fine on my server, but I moved it over to the client's server and I get a 404 error instead of the image. Problem is I have no ideea how to see what is wrong.
Normaly I get an error in the browser so I know what is going on... but not beacase the output is an image I get nothing.
LE: I tried this, at the begining of the script:
error_reporting(E_ALL);
ini_set('display_errors', true);
but nothing.
If you get a 404, the PHP script is either not found or redirects to another resource (a generated and cached image file?) but the path to it is wrong (or the image file can't be generated because of right issues?).
As suggested, remove the header() if any (it's also probaly using a header if the script redirects to the real file after generation).
If the script is delivering the image directly without any redirect, then enabling errors won't help on a not found URL ;-)