Jump to content

gizmola

Administrators
  • Content Count

    5,133
  • Joined

  • Last visited

  • Days Won

    61

gizmola last won the day on May 26

gizmola had the most liked content!

Community Reputation

200 Excellent

2 Followers

About gizmola

  • Rank
    Prolific Member

Contact Methods

  • AIM
    gizmoitus
  • Website URL
    http://www.gizmola.com/

Profile Information

  • Gender
    Male
  • Location
    Los Angeles, CA USA

Recent Profile Visitors

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

  1. One traditional way to get around this issue is to use Expect. Expect is one of the first automation languages I am aware of and is great for handling user input prompts that come from utility programs that might be used in a shell script. It's been around for a long time and there is a version for both for linux and windows. Are you using windows btw? All the system and process functions are closely tied to the OS you are using.
  2. You just need to use the Ubuntu package installers inside the shell in your ubuntu vm, which in your case is probably something like this to get both packages: sudo apt-get update && sudo apt-get install libsodium-dev; sudo pecl install -f libsodium sudo apt install php-cas You are going to need to stop/start php-fpm & apache after you installed the packages. Do checks with php -i and phpinf() and make sure that the packages are being seen by by command line php and php in apache.
  3. Functionally, it is true that you could use a string or a timestamp to store your times. You should use a timestamp. It works better from a database standpoint, since you can do queries to find timestamps <>= NOW() or some arbitrary time. Also a timestamp takes 4 bytes, whereas a varchar takes as many bytes per row as needed to store the string one for each character, so -- 'mm-dd-yyyy hh:mm:ss' 19 bytes vs. 4 per row? String comparisons are done character by character, which might not work the way you expect, whereas mysql datetime/timestamp types work exactly as you would expect. In your case you would not need to pass anything into the query -- just determine the offset interval you want and encode that into the static query.
  4. It's really important to have a scheme like the one requinix is suggesting. Let's consider it this way (without the rewriting) #home page. You can make this the default page by routing to home if there is no route parameter index.php?route=home #rewrite route /home #contact page index.php?route=contact #rewrite route /contact #faq index.php?route=faq #rewrite route /faq #faq item #3 index.php?route=faq&item=3 #rewrite route /faq/3 #acme customer store page list of items index.php?route=shop&customer=acme #rewrite route /shop/acme #individual item #14 page in acme store index.php?route=shop&customer=acme&item=14 #rewrite route /shop/acme/14
  5. This SO thread covers a lot of the probable issues with getting phpMyAdmin running and accessing it including: Did you start the MySQL server? Did you configure phpMyAdmin to access the MySQL server? What url should phpmyadmin be at?
  6. Provide an example of what you mean by that, and how you plan to use it.
  7. Here's a really good article about this issue (and other related ones you might not have though about either: https://www.danielmorell.com/guides/htaccess-seo/redirects/https-www-and-trailing-slash For example another related problem: https://www.mysite.com/foo/bar and https://www.mysite.com/foo/bar/ Will be seen as 2 different urls, so you want to effectively remove the trailing slash when you are routing a non-directory.
  8. This is a self fulfilling prophecy of failure. First off, you don't need to be an OOP expert to use classes and objects. With all the time you've spent here explaining to everyone why you can't or won't take their advice, you could have already watched the video, and learned a few things about modern PHP. Consider this my white flag. I give up. 🏳️
  9. I'm not familiar with this protocol. Are there other details (authentication or encryption for example) that might explain your result?
  10. This is not a teacher - student situation. As it happens, I have a good friend who is a college professor, as is his wife, and we talk about his classes and students fairly regularly. I know from his point of view, having standards that students have to meet is very much part of the job. There are assignments and tests. None of this is part of our discourse. In general, one of the most important elements of a community like this is the exposure to new ideas, technologies and methodologies, as well as exposure to a consensus on a baseline of competency. Your replies frequently seem to me to have elements of both FUD and NIH. I'm guessing you are familiar with both acronyms. I understand that you are concerned about what you don't know, and are unsure in regards to your ability to learn things that are new to you in the short and long term, but these topics did not come up by happenstance. You posted questions soliciting feedback, which is what you've received. In all the replies and feedback, I don't know if there's an instance where someone gave you an answer or opinion you've agreed with, that wasn't yours to begin with. It feels to me like an echo chamber, where you only want people to tell you that you were right from the get go. You seem to want to reduce this to a matter of opinion amongst equals, when that just isn't the case. I've done system architecture and engineering for my entire career. I know what's important, and I've tried to help you understand what that is, in dribs and drabs. I could at this point make a nice list of all the things you've disregarded, along with various excuses for why you know better than me what you need right now. At the end of the day, if we listed the requirements for what you want, what you've already built and how they can be integrated, sans a serious discussion of whether your requirements are sane or logical, or even prioritized correctly, there's a best practices way to build something new, and there's a way to make spaghetti, that will likely be a costly bug ridden failure. What the experienced practitioners here all know, is that doing it the right way isn't more difficult, nor does it take longer. Quite the contrary in fact. Doing it the right way produces a better product in less time because it's based on the assembly of pre-built and tested pieces, that more often than not have documentation and support. Again, I do this to try and help others, as do the other respondents who frequent this site. Some percentage of people find what they are looking for and some percentage do not. Most of us have been participating in this forum for many years. We've seen every type of question and questioner there is at this point. You might want to consider that when you question the relevance or urgency of the advice you've received.
  11. Did you look at the links I provided? There's not much more to it. Pack will let you pack the bytes into a binary string. You make the socket connection and fwrite the packed string to it.
  12. The comments and concerns expressed in that SO question are in no way applicable to what you are talking about doing. You might also note that the author of the comment, never demonstrates the supposed danger or where the section you quoted in any way matters. The most comical thing about it, is that there is no semi-truck table. The original requirement was completely lost. The ultimate model added to the original question does nothing other than to add tables only relevant to the car tree hierarchy. Adding a unique index and referencing that as a foreign key only matters in that scenario because there is a cars table where lots of different car subtypes could go. Are you implementing a hierarchy with multiple subclasses and sub-subclasses? No you aren't. Did you look at the other answer from Walter Mitty? It literally calls out the solution I provided you with the tag shared-primary-key I made you a model and generated the DDL. You could have run it in a test db and played with it, and created a few queries. Could you create a row in a subtype table for the wrong product type? Yes. But considering the missing semi-truck table, the same issue existed in the non-solution presented and accepted in the question you referenced. The main focus of the solution was the hierarchy of car types, which again isn't relevant to your product subtypes. It's not a concern for you because the procedural code you need to write, which uses the product_type attribute to determine which child table the subtype row needs to be created in, must do that properly for your system to work. If it doesn't do that properly 100% of the time, then your system doesn't work at all, and we are talking very simple logic. If you are super paranoid, then a simple trigger could be written to prevent it happening in any of the child tables. You could also, as an alternative, write a trigger to create the row in the correct subtype table, when you insert the product row. Ordinarily I am not a big fan of MySQL triggers or sprocs, as they reduce concurrency and insert performance, but your system will not have a lot of insert/update activity against the tables in question, and will primarily be selecting the data, so it's worth considering.
  13. Aside from the things Requinix listed, another thing that influences spam scoring is having a valid reverse DNS. Here's a list of some services you can use to check your rep: https://sendgrid.com/blog/5-ways-check-sending-reputation/. You also have to make sure your domain and your MTA IP is not on a RBL. The reality is that sending email from a Shared server is only as reliable as the worst client they have had on the server, or your ISP, depending on how email works for you with your hosting company. The other issue is that some systems may consider your emails to be spammy. Most analysis works on a scoring system, so if your emails are getting rejected outright as spam, that tells you something. Throttling isn't going to help you improve your score, and depending on the server you are communicating with, getting help with finding out how and why you are being rejected may be next to impossible for you. This is another reason to use a commercial email delivery company, since it's their business to insure delivery of client emails, and they have paid staff to correspond with sysadmins of major email systems.
  14. Yes. Take a look at stream_socket_client and pack. I don't think this type of application is PHP's forte, but it is possible. Creating an executable with c, c++ or Go would be a simpler final product upon completion, but PHP is certainly capable.
×
×
  • 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.