Jump to content

gw1500se

Members
  • Posts

    1,029
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by gw1500se

  1. This is an SSL certificate issue. Make sure you have OpenSSL’s default CA bundle implemented properly. Alternatively, though not the best idea, you could turn off SSL verification by setting options 'verify_peer' and 'verify_peer_name' both to false.
  2. This comes back to the earlier question. Why do you need the quotes in the first place?
  3. The link to the manual has examples.
  4. Use array_count_values to determine which keys occur how many times. If you want an array of just the counts you can build an array from that with just the values.
  5. First please use the code icon (<>) for your code and specify PHP. As for your specific problem, I don't know how those variables are generated (that is where the space is coming from) but simply using rtrim should solve the problem. $fields[$k] = rtrim($v);
  6. All you needed to post was create.php which is where the error is. Now you need to tell us which is line 50.
  7. You need to post your code here. Few here will risk going to a 3rd party web site. Be sure to post it using the code icon (<>) on the menu and select PHP.
  8. Sorry. echo "<a href=\"$row['url']\" title=\"$row['title']\">$row['icon'] $row['header']"; Got carried away with my escape quotes.
  9. Embedding PHP like that is confusing, hard to debug and unnecessary. Use double quotes but escape those you want to keep as HTML and be consistent. Single quotes are OK for indices. <li> <?php echo "<a href=\"$row['url']\" title=\"$row['title']\">$row['icon'].\" \".$row['header']"; ?> </a></li>
  10. Just for the record here is the algorithm in PHP. $d=sqrt(pow($q2-$1q1,2)+pow($q4-$q3,2)+pow($q6-$q5,)+...); What you use for those values and how many is up to you.
  11. The algorithm is not difficult to implement in PHP but it seems the problem (for me) is what values to use. Between what values are you looking to test similarity? Point 1 and 2 of room 413 or point 1 of rooms 413 and 415? Each point can have only 1 value, not a range of values.
  12. You need to open a terminal session on the MySQL server and run it from the command line.
  13. You can't store an array in a database as a single column. I already suggested what to do. Alternatively you can store the array in a join table where each item is a column.
  14. If you have PHPAdmin with admin rights then you need to check GRANTs for user 'apache'. That is likely the crux of your problem.
  15. Where you are running it as a client is irrelevant. Is the MySQL server on Windows or Linux? Is the httpd server Windows or Linux? Are they the same server?
  16. Your code is a bit confusing so I'm not sure I am following what you are trying to do. You convert $_POST["active"] to a comma separated string ($newvalues) but when you store it in the database you are binding an array ($_POST["active"]) to a column. You can't store an array per se as a column in MySQL. You should be binding $newvalues to a string column in your database.
  17. Are you on Linux? If so 'apache' is running the script, not you. I am referring to 'mysql' from command line.
  18. But the user running the script may not. Did you check as I suggested?
  19. Log in to MySQL from the command line using the same credentials as your PHP script (usually 'apache' in Linux). Then enter the following commands: USE DATABASE <your database name>; SHOW PRIVILEGES; As Barand says, you need to see the FILE privilege. If it is not there, you will need to log in as root (or have your sys admin do it) and GRANT that privilege for that database and user.
  20. You have to move_uploaded_file to get it to the desired folder. However, unless I don't understand what you want to do, there is no need to move it at all. Process the file into the database as you are.
  21. It is the line # I am looking for which you didn't post. And post that line with the code around it. Also post any code that produces variables used. I suspect the first warning may have produced the 2nd.
×
×
  • 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.