Jump to content

gw1500se

Members
  • Posts

    828
  • Joined

  • Last visited

  • Days Won

    14

gw1500se last won the day on June 21

gw1500se had the most liked content!

4 Followers

Profile Information

  • Location
    Georgia, USA

Contact Methods

  • Skype
    gw1500se

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

gw1500se's Achievements

Prolific Member

Prolific Member (5/5)

68

Reputation

1

Community Answers

  1. 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.
  2. 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.
  3. 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.
  4. If it is running as 'daemon', then that is the user you need to set permissions for.
  5. 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'.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. Where do you "addAttachement" and reference the uploaded file? I think you did not post your complete code.
  11. Its possible your loop itself is failing after the first pass. Make sure you have error reporting on: error_reporting(E_ALL);
  12. 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);
  13. Sounds like a syntax issue. Post your code.
  14. For that you would need to use a database (e.g. MySQL).
  15. 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.
×
×
  • 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.