Don E Posted July 15, 2013 Share Posted July 15, 2013 Is it possible his php.ini upload settings are not set correctly or even disabled all together? Link to comment Share on other sites More sharing options...
justsomeguy Posted July 16, 2013 Share Posted July 16, 2013 You can't disable a setting, there's always a default. It's possible that he's uploading a file larger than post_max_size though. Link to comment Share on other sites More sharing options...
Pavlin24 Posted July 16, 2013 Author Share Posted July 16, 2013 (edited) I saw the "post_max_size" settings . It is 60M. And upload_max_filesize is 50mB. I saw this with phpinfo() function.( see attachment). The file I try to upload is 14kB. So the the size of the file is not the reason. Doc4.doc Edited July 16, 2013 by Pavlin24 Link to comment Share on other sites More sharing options...
justsomeguy Posted July 16, 2013 Share Posted July 16, 2013 Use print_r or var_dump to print all of $_POST and $_FILES so you can see what is getting received by PHP. Link to comment Share on other sites More sharing options...
Pavlin24 Posted July 22, 2013 Author Share Posted July 22, 2013 Must I create some tables or data base with sql before run all these scripts? Link to comment Share on other sites More sharing options...
justsomeguy Posted July 22, 2013 Share Posted July 22, 2013 No, your code isn't using a database. Link to comment Share on other sites More sharing options...
Pavlin24 Posted August 7, 2013 Author Share Posted August 7, 2013 Finaly I succeed to upload a file. The problem was resolved by itself. I have not done anything. But my hosting deliverer have had problems. After my site ren again I succeed to upload. Thank you for the help. Link to comment Share on other sites More sharing options...
Pavlin24 Posted September 9, 2013 Author Share Posted September 9, 2013 Hi again. I have a question related to this topic. In the code above are allowed image files for uploading. Now I want to allow .php files for uploading. What script exactly I must put. I mean, for images script is ($_FILES["file"]["type"] == "image/jpeg") What will be for php "? /php" Link to comment Share on other sites More sharing options...
justsomeguy Posted September 9, 2013 Share Posted September 9, 2013 PHP files are probably text/plain, like other text files. The browser chooses that type though, so it might change depending on the browser and computer. Link to comment Share on other sites More sharing options...
Pavlin24 Posted September 9, 2013 Author Share Posted September 9, 2013 I tried with "text/plain" - do not work. I tried also with: "text/php" "application/php" "application/x-httpd-php" - (that is shown on the server as type) Not work Other suggestions? Link to comment Share on other sites More sharing options...
justsomeguy Posted September 9, 2013 Share Posted September 9, 2013 If you're trying to figure out which MIME type your browser sets for PHP files, then just print out what PHP gets from the upload and see for yourself. Link to comment Share on other sites More sharing options...
Pavlin24 Posted September 10, 2013 Author Share Posted September 10, 2013 Yes.Thank you. It turned out that the type is "application/download". This is for Firefox. But for IE it is "application/octet-stream". Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now