Jump to content

requinix

Administrators
  • Posts

    15,289
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. Sounds like you're being bit by the Let's Encrypt kerfuffle. Upgrade to OpenSSL 1.1.0 or later.
  2. You've got more problems in there than that, but Don't do inline CSS. Give the TD a class name like "agent-status-Y" or "agent-status-N" and then create a CSS rule or two to give the TD appropriate styling accordingly.
  3. Feel like doing some troubleshooting?
  4. Sure, if you like the sounds of it. Doctrine is the main one people go for.
  5. Suggestion #1: if ($condition) { // ... } else { return $value; } // is the same as if (!$condition) { return $value; } // ... Suggestion #2: if ($condition_1) { // thing } else if ($condition_2) { // same thing } // is the same as if ($condition_1 || $condition_2) { // thing } I have two more, but let's start with those and see what you do.
  6. PDO is the standard because it supports basically every database system. Most people prefer its API over mysqli's but the differences are meaningless if you add your own abstraction on top of it. mysqli is dedicated to MySQL and can offer better support for MySQL features. I wouldn't say it's "discouraged", rather that people encourage PDO over it. Almost nobody changes database systems after using one for a while. When they do, PDO has the advantage that you can switch drivers easily, but it won't help them audit all their SQL queries for compatibility.
  7. Maybe. It depends how things are set up. The best answer to that is "try it and find out".
  8. Margins are more complicated than simply giving you spacing from the edge some nearby element. Like they'll merge and collapse with other margins. And margins can extend outside what you think the bounding box of the element is. The comment-action's margin does not push it away from the bottom of the parent div because there was nothing to push against. That bottom edge isn't a hard edge. Think of margins as a way of spacing from other unrelated elements while padding is for spacing from other related elements; use a margin with a div + div but use padding with a div > div. Of course it's not actually that simple, but it's a start.
  9. Step away from the computer for a while, eat something, then come back and look at if ($lang = "en")
  10. The number one thing it would explain is how you got PHP settings onto your machine that don't make sense, given that you didn't put them there yourself. The configs aren't messed up. They work fine. On the shared hosting server. They may not work fine for you on your personal computer. Find the php.ini and comment out (put a semicolon ; at the beginning of the line) the setting for the session.save_path. Just make sure you don't push that change back up to the server.
  11. You're way overthinking this. Forget positioning. Let the element render where it would normally because that's where you want it. Then simply align its contents right. https://jsfiddle.net/fk9n1pbz/
  12. Using something like Local would explain a lot. But I don't know Local much. Are you sure you're using it? What little I can find that describes technical details suggests that it should be running everything in a separate environment - like a separate operating system - than your own, so you shouldn't be seeing any error messages that mention files in C:\... How did you come to use Local, too? Is that something you were told to do by someone when you wanted to have a copy of the site?
  13. There's no way to craft a magical link that will do the sorts of things you're describing - without adding some code on the target page. The cleanest option is to cause the page to be rendered with the desired tab in view right from the start, which would allow you to use the # anchor immediately. But it requires changing something on the server so that it outputs the proper HTML and such so that the correct tab is shown by default. If that's not an option then you have to come up with a scheme for fragments where the target page can inspect it on load and decipher (a) that it needs to load a particular tab and (b) scrolls to the target. But it can be less complicated than it sounds: if you use #commentform as the fragment then Javascript can extract that from the URL, find the element, determine which tab it belongs to based on its ancestor elements, switch to that tab, and then do the scroll action to the element. The first option would be easier to explain if we knew the PHP (?) code on the server that renders the page; essentially you do something like /path/to/page?tab=reviews#commentform in your link, grab the "reviews" in code, and output (I assume) the correct CSS classes to set that particular tab as the default active tab. The browser would handle the scrolling. The second option would be easier to explain if we knew the markup of the tabs and comment form.
  14. That /var/cpanel is not a default setting for php.ini so something put that value there... Where is this php.ini exactly? What is the setup you have for running this site on Windows - are you using XAMPP or WampServer or what?
  15. You can't simply copy php.ini settings from one machine and put them on another machine. Same way you can't take a remote that worked on one TV and expect it to work on a different TV. Remove/undo those settings you copied.
  16. You can't detect what the user clicked on, but you most certainly can have the link tell the page what was clicked on. Such as by a query string of ?status=Hot. Grab that status from the query string and incorporate that into the query and page.
  17. ...Have you tried putting #commentform in the URL?
  18. I would say ginerjm had the answer and I just stepped in to help address a bit of confusion about it.
  19. So unfortunately there's three different "roots". Which one someone means depends on context. 1. When it comes to files and directories in Linux, / is the root. Not "home" - that's where your personal files are, and is typically /home/something. 2. When it comes to figuring out where stuff is when you're dealing with PHP code, the "root" means the place where your web server starts holding files. That would be /opt/lampp/htdocs. 3a*. When it comes to URLs and other things you see when you're browsing a website, the root is also / according to what's in your browser's address bar. Not including the http(s) or domain name but the first slash right after. The second and third are closely related: the root of where your web server is hosting files is /opt/lampp/htdocs and that is the same as / in the address bar. Unless you tell your server differently, if you go to http://localhost/MyProject/uploads/whatever.ext then the web server is going to look for the web root (/opt/lampp/htdocs) + the path portion of the URL (/MyProject/uploads/whatever.ext) and try to find a file named /opt/lampp/htdocs/MyProject/uploads/whatever.ext. What ginerjm is talking about is the second one, and whose value you can get in PHP with $_SERVER["DOCUMENT_ROOT"]. You do not set that value yourself. PHP gives it to you for free. If you want to take a file upload and always place it in the root of your web site + /MyProject/uploads/ then you need the DOCUMENT_ROOT plus that path part (and probably plus a file name itself). $fileDestination = $_SERVER["DOCUMENT_ROOT"] . "/MyProject/uploads/" . $fileNameNew; Now here you've got a slight problem: that /MyProject piece. That's not going to be there in the real site, but you have it in your setup. You have two basic choices for how to deal with that: 1. Tell your web server to host files out of MyProject. That requires going into the server configuration and changing some values. There's a right way and a wrong way of doing this, so rather than deal with that, just ignore this option. 2. Put all your MyProject files into the htdocs directory. This is really easy. The downside is that you can't have multiple websites anymore because http://localhost is always going to be what's in /opt/lampp/htdocs and that's always going to be the "MyProject" stuff. Once you've moved the files you can get rid of the "MyProject" stuff in your code and your local site will be one step closer to working like the real site will. $fileDestination = $_SERVER["DOCUMENT_ROOT"] . "/uploads/" . $fileNameNew; * There's a 3b option where you might say "well no, I consider the root of my site to be http://localhost/MyProject". Saying things like that is an easy way to get everybody confused so stick with 1, 2, and 3a.
  20. The Let/Action/Draft/Publish thing is a different concept than the Chocolate/Candy thing. Giving the latter as an example only makes the former more confusing. Are you trying to get the status of each thing as it was on a particular date? Wouldn't that mean that the status of each thing is effectively the most recent "status_to" value you have?
  21. Did you try what we said to do in your original thread?
  22. What is the exact name of the input fields?
  23. Installing the certificate may not be enough. PHP is using OpenSSL. What version of that do you have? Is it at least 1.1.0?
  24. I see that you're using the parseInt function. What does it do?
  25. If the problem is that you have multiple names in the column then you need to fix it by not storing multiple names in the column. Probably with a new table. pk | database_id | name ---+-------------+----- 1 | 1 | Joe 2 | 2 | Susan 3 | 3 | Richard 4 | 3 | Joe 5 | 4 | Jane 6 | 4 | Sam 7 | 4 | Steve 8 | 5 | Gloria 9 | 5 | Joseph
×
×
  • 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.