-
Posts
15,199 -
Joined
-
Last visited
-
Days Won
424
requinix last won the day on October 4
requinix had the most liked content!
About requinix
Profile Information
-
Gender
Not Telling
-
Location
America/Los_Angeles
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
requinix's Achievements
-
If you're asking why it shut down unexpected, it may be due to a blocked port, or missing dependencies, or improper privileges, or a crash, or a shutdown by another method. To find out why, you should press the Logs button to view error logs. You can also check the Windows Event Viewer for more clues. But if that still doesn't work, you can copy and post the entire log window in the forums.
-
Seems you've already done that. So what's the problem?
-
Yes it will. If something throws an exception, it bubbles up to the closest try/catch, and if that doesn't handle it (or throws it again) then it continues up to the next-closest try/catch, and so on. Doesn't matter what functions those try/catch blocks are in.
-
What do you mean "ideally"? That is how it will work: if any of those three methods throws an exception then the try/catch will catch it. Because that's what it does.
-
If you're asking what you have to do to make this work, the answer is: I don't know what the answer is because all you've given me to work with is a bit of HTML and something that may or may not match the CSS rules you're actually using. What I do know is that what you're trying to do, in principle, does work. Which is why I offered the advice of how you can find out what the problem is, by which I mean a way for you to "debug" the CSS. Find out what rules are and are not applying, with your actual site that only you can see, and that should help you get closer to finding out what you have to do to make this work.
-
Working for me. https://jsfiddle.net/w936eko0/ No, you can have as many rules as you want, even duplicates, but it does mean you need to pay attention to conflicting rules. Which is what I think is going on here. Use your browser tools to force the .porto-ibanner into a hover state, then check what CSS rules it is and isn't applying.
-
So fix the code to include the charge with the withdrawl amount when attempting to deduct from the balance? Remember that we have no idea what you're working with, let alone any clue about the sorts of code involved, so it's going to hard for us to say much unless you can provide quite a bit more information...
-
Just arbitrarily rearranging elements like that, not really. You can't change the fundamental structure of the page. But you can, to some extent, make things appear in different locations or arrangements. Depends on the exact markup and the sorts of CSS things you want to do with them...
-
git is a tool to track and manage changes to files. There's no way to properly explain it here, but the point of it is that you can make changes to files and keep a full history of everything that's happened. It's something you should start learning to work with now, as it's practically universal with software programming, but you can slowly ease yourself into it. The main concepts to deal with now are cloning (making a copy of the repository that's in GitHub), pulling (downloading recent changes), committing (saving the changes you've made locally), pushing (uploading everything back to GitHub).
-
Regarding Docker, there are two fairly common problems with software: 1. If I want to edit and test and run code, if the code has particular requirements, I have to set up my machine with those requirements. And that makes it hard to edit/test/run other code which has similar but different requirements. 2. When I want to deploy my edited code, it has to run on a server, and that server has basically the same sorts of requirement problems. What Docker does is solve those by providing a self-contained environment. So I can edit and test and run code in its own isolated environment, with its own requirements, then do that with other code at the same time without worrying about the two of them conflicting. Those problems used to be solved, not that long ago, by virtualization. Which is a self-contained environment too. The difference is that virtualization was basically a tiny little software-based computer that you'd have to boot up and such just like an actual computer, while Docker uses features in your operating system to give you something isolated without having to deal with that full "computer" experience. "Docker Hub" is a central place for people to upload their "images", which are basically archives of all the files needed for whatever. For PHP, there are images that give you php-fpm, and those images contain all the files php-fpm needs to run. Same for MySQL, and Apache, and tons and tons of other things. What one typically does is then assemble those images into a "stack" and then add a little configuration to make them talk to each other. So you take php-fpm plus MySQL plus Apache, have php-fpm talk to MySQL, have Apache talk to php-fpm, and then you can point your browser to the Apache piece and have a fully-functioning site. All without having to actually install php-fpm or MySQL or Apache on your computer. It's not a total improvement, though. Like, it is going to take up more disk space: those images have php-fpm/MySQL/Apache installed in them, but remember that each image is isolated, and that means each image also needs some amount of installed libraries and whatnot, resulting in taking up more space. Plus, the way images work, there's also some wasted space going to happen. However, the benefits of dealing with Docker greatly outweigh concerns of space usage - especially in a day and age where disk space is plentiful and cheap. GitHub provides an internet-hosted git repository for you to use, but it's not a replacement to having files on your own computer. You still want everything available to you to edit and all that. But it does offer a number of advantages, like acting as a backup, and having a place to coordinate work with other people, and a bunch of other things. That's why I say you don't have to worry about it for now. It doesn't provide some sort of brand-new development experience that will fundamentally change what you're doing now. It provides additional features. That said, the one thing that would be useful to take out of it now would be as a place to back up your work: do what you want, "commit" (save) your changes, "push" (upload) them to GitHub, and then not have to worry about losing all your work because your computer caught on fire. GitHub isn't the only such place, of course. GitLab and Bitbucket are two popular alternatives, and they all provide basically the same sorts of features. "Mode" isn't right, but otherwise yes. When you make a git repository in GitHub, you have the choice of making it public or private. Public repositories are public: anyone can see it and read the code, anyone can "fork" (copy) it for themselves, and anyone can "submit pull requests" (suggest changes) - though you're not forced to accept the changes, of course. Private repositories are the opposite. And yes, you can change your mind later.
-
Forcing HTTPS on the domain disables website functions
requinix replied to zaaba's topic in PHP Coding Help
That there is especially important code you have to look at - it does say "http://" after all. But you should fix this by not doing any https:// or HTTP_HOST stuff. You should use simple URLs that are just paths on your site. As in "/admin/propertyImages/stuff.jpg" and not "https://www.luxurybeach.com/admin/propertyImages/stuff.jpg". The browser can take the path and figure out the rest perfectly well. So with that $ImageUrl variable, keep the /admin/ because your URLs in the database don't have that, but get rid of the rest. I would do it like: $printTXT = ""; while ($line = mysql_fetch_row($resuls)) { $ImagePath = "/admin/" . $line[2]; $pname = $this->wordcount(trim(str_replace("Puerto Vallarta Rental", "", str_replace("-","", $line[1]))), 25); $printTXT .= "<div class=\"sldie\">\n"; $printTXT .= " <a href=\"/". $line[0] . "/" . $line[1] ."\"><img alt=\"$pname\" border=\"0\" height=\"390\" src=\"$ImagePath\" width=\"625\" /></a>\n"; $printTXT .= " <div class=\"caption\"><h2><a href=\"/". $line[0] . "/" . $line[1] ."\">" . $pname . " <span>" . $line[4] . "</span></a></h2></div>\n"; $printTXT .= "</div>\n"; } $printTXT .= "\n"; return $printTXT; where I get rid of $prphost and $host, rename $ImageUrl to $ImagePath (it's more accurate of a name that way), and write the "/" and "/admin/" prefixes right there on the lines (since it's just a slash now and not the more complicated stuff). -
Forcing HTTPS on the domain disables website functions
requinix replied to zaaba's topic in PHP Coding Help
You test it by entering "http://luxurybeach.com" in your browser and seeing what happens. But I'll do it... The redirects look fine. You're using Apache and really ought to be doing the redirects with that instead of PHP. I saw a 404 on the homepage once but couldn't see what it was for, and I'm not seeing it again, so I don't know. I do see that a lot of images are being loaded over HTTP, but the browser is being smart and knowing it should go over HTTPS instead. You still ought to fix that. The images are /admin/propertyImages/stuff.jpg and I don't know for sure where those particular URLs are coming from. Now, Correct. But this isn't a PHP problem. This is a server configuration problem. It doesn't know how to handle a URL like /real-estate-sales/1/2. My guess is that you have a HTTP server configuration and a second HTTPS server configuration, and the latter isn't set up the same way as the former.