Jump to content

gw1500se

Members
  • Posts

    1,033
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. It doesn't unless you tell it. There are two ways to specify a file location, absolute and relative. If the path starts with a '/' then the path is absolute, otherwise it is relative to the document root. If just the filename is specified then it expects it to be in the document root. If you want it to look "down" then specify the directory without a leadlng '/'.
  2. What is the error? What exactly did you change? When you say you upgraded PHP code do you mean you upgraded PHP itself? If so from what version to what version?
  3. Not sure what is not working since you don't say what error you are getting. .htaccess is managed by httpd and has nothing to do with PHP or "bringing it in." It appears to me like 2 different problems. Let's start with problem one. What URL do you want to rewrite and what do you want the rewritten URL to be?
  4. I am getting the impression you don't have a database and are not using user logins at all. That being the case there is no good way to accomplish what I think you are asking.
  5. Sessions are always hidden (from the user's perspective) so I'm not sure what you are asking. Also, the time a session exists is limited unless you specifically change it. It seems to me the most secure way to handle this is to store the viewed image names in your user database with each user name. The check to see if the user has already viewed it. You just have to be careful about how you handle interrupted image uploads.
  6. Like I said, you can limit the upload size with the php.ini parameter or use requinix suggestion. However, a malicious user could change that parameter in the HTML page.
  7. You can't know that from PHP (server side) directly. You can use Javascript/Ajax (client side) to send the file size back to PHP. However, the question is why do you care about the file size before upload? If you want to prevent files over a certain size from being uploaded you can set that with 'upload_max_filesize' in php.ini. The default is 2M.
  8. After you json_decode without the true do the following: echo "<pre>"; print_r($result); echo "</pre>"; That will show you the resulting associative array so you can see how to reference the elements by key.
  9. If it is running as 'daemon', then that is the user you need to set permissions for.
  10. No it can't. Add that code to the PHP file giving you the error then run that code as a user normally would from a web browser. In the case of Linux, the user will normally be 'apache'.
  11. First your code is very difficult to read. Edit the post and use the code icon (<>) at the top of the menu and specify PHP or HTML as appropriate. Then post the error message you are getting making sure you have error reporting turned on. error_reporting(E_APLL); If no error then explain what you are getting that is different than what you expect.
  12. What is the URL returning? If it is returning JSON then you need to decode it which results in an array. If so you want to array_merge.
  13. SSH keys go in the home directory by default. You can change that in /etc/ssh/sshd_config by modifying the AuthorizedKeysFile directive to point where ever you want.
  14. How can we help you if you don't post the errant code? The link I gave you has examples to do what you want.
  15. Where do you "addAttachement" and reference the uploaded file? I think you did not post your complete code.
  16. Its possible your loop itself is failing after the first pass. Make sure you have error reporting on: error_reporting(E_ALL);
  17. Which field is missing and post the code where you think it is being displayed? Also make sure you have error reporting turned on. error_reporting(E_ALL);
  18. Sounds like a syntax issue. Post your code.
  19. For that you would need to use a database (e.g. MySQL).
  20. Don't use $_REQUEST. It has been deprecated. Use $_POST or $_GET depending on your form, which you did not post. Be sure to turn on error reporting. You don't do any error checking of your database query either.
  21. It is not clear what you want displayed in that cell. Post the code you tried and tell us what is not working or what error you get.
  22. Not sure I understand the question but it sounds like you need to use JavaScript/Ajax on the new page. That code would itself be static but the result would be dynamic.
  23. Passwords should be stored securely in a database (MySQL).
  24. Reading the manual is a good place to start.
  25. Post the actual code and the actual error message. Be sure to use the code icon (<>) in the top menu and specify PHP.
×
×
  • 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.