-
Posts
5,954 -
Joined
-
Last visited
-
Days Won
145
Community Answers
-
gizmola's post in Problems with Canonical in website was marked as the answer
It's unclear to me how navigation to the spanish/german versions work, but if there are links you can add rel="canonical" to all the links and that should fix things.
With that said, this issue is covered in their localization documentation:
https://developers.google.com/search/docs/specialty/international/localized-versions
If you have a sitemap file, then follow the instructions for adding entries for each language.
I'm guessing you don't have a sitemap, so an alternative is to add this type of block to the header of each page. This is very doable for you because you only have 6 pages. (2 pages x 3 languages).
This is for example only, copied right out of the google documentation and modified slightly to be closer to what you described, but otherwise what from what I linked for you above:
<head> <title>Widgets, Inc</title> <link rel="alternate" hreflang="en" href="https://example.com/index.html" /> <link rel="alternate" hreflang="de" href="https://example.com/de/index.html" /> <link rel="alternate" hreflang="es" href="https://example.com/es/index.html" /> <link rel="alternate" hreflang="x-default" href="https://www.example.com/" /> </head>
So keep in mind that something similar to this section would go into the header of all the 3 index.html files.
You will have a different section for the 3 tour.html files, that points to your 3 variations.
Language Codes come from ISO-639-1.
Country Code come from ISO 3166-1 alpha-2
Since it sounds like this might be a country specific business, you might want your hreflang codes to be:
en-GB - English - Great Britain de-DE German - Germany es-ES Spanish - Spain -
gizmola's post in A question of normalization was marked as the answer
Yes I already answered this. You make a product table. You have a product_type table as a foreign key, that to begin with will have
id name 1 Car 2 Truck 3 Package 4 Feature
Probably the best way to handle this, based on the information you provided is to create a "product_event_type" table and a "product_event" table.
product_event_type ------------------ id event 1 Receive 2 Sell by 3 Return Should be clear this allows you to classify an event for a product. You can of course add other event types to this table if they would be useful.
product_event would look like this
product_event ------------- id product_id (fk to product) event_type_id (fk to event_type) event_date notes
The handling of financials is a non-trivial requirement. It really depends on what you intend to try and do with this data within the system.
If I was designing this database, there would be requirement gathering and documentation in some manner, and review of the ERD to make sure the structure would support the requirements.
You should see at this point that the "product" table is the hub of the system, so the recording of financial data would probably be in a ledger type table, that relates to product, and to product_event rows.
-
gizmola's post in We get spam and we have a question. was marked as the answer
I worked on a similar problem for a company some years back. It was also a chat system, and every chat message was filtered for a variety of personal information disclosure. This problem of people trying to get around these filters is difficult. When they are already putting in a bunch of whitespace and other characters to obfuscate (some of which are valid) is annoying.
What I implemented was a chain of filters that would do take the original text and then strip out all the extra characters.
In your case, this would not be too difficult, given that you are looking to blacklist a phone #.
So:
Generate a version of the message that has removed any characters that are not 0-9, or A-Z Convert newlines to something known Remove all whitespace (tabs and spaces) convert newline "something known" string or non-printable character back into newline use regex to find phone # sequences This should be farily simple, since you can use character classes and match [0-9]{9,12} From this list of numbers see if you can get a full match against any of these number sequences. Hopefully you get the idea.
-
gizmola's post in who is responsible to configure docker ? was marked as the answer
I would say that usually there is a team lead who set up the development environment, sometimes working with devops if there is internal infrastructure being supplied.
These days with people using dotenv files for many things, you typically will need to create the dotenv files the project needs and in some cases set values that work for your local dev environment. I will typically create some template files with the variables needed and perhaps some examples, but before the containerized env works, some files have to be copied to the right dotenv file, and some config will probably have to be done before things will actually work.
Then beyond that, if there's a database, there might be fixtures that have to be run to setup database values.
Ideally people put the information you need into the README.md for the project, but as we all know, documenting things is often not considered a priority.
-
gizmola's post in can't get the date and time was marked as the answer
Based on what your ISP stated to you, they have a Varnish Cache server in between "clients" and your server.
The cache control headers you are setting have no effect on the varnish server. They have configured it to cache your content for some period of time.
You can learn a bit more about varnish by reading about it. Keep in mind that this is their cache server, likely to reduced overall traffic to their hosts, and seems not to be something they advertise, which is a bit shady, but such is the way of shared hosting companies.
So when they asked you if you wanted to turn it off, at least for the purposes of this exercise the answer is "YES".
This is the reason you are seeing the behavior you are seeing. The requests are going to the server, the Varnish cache server is intercepting those requests and serving a cached version of your actual response for some period of time. Once the setting expires, you see a new page.
-
gizmola's post in How to use PHP to Redirect to another page after form submition? was marked as the answer
No, just trying to use javascript to post the same data the form is posting, is not going to fix whatever is not working right now.
Did you debug the form handling using the developer tools of your browser?
You want to open developer tools and use the Network Tab. Then submit your form and you should be able to look at the request and the response. This will show you if the server is returning any errors.
As I said previously, the code you posted is simple and I see no problems with it.
It most likely does work, only you are not getting the emails, and that has nothing to do with the code, and everything to do with how email works and the way your server works.
Email deliverability is complicated, and to debug an issue with it requires a full understanding of your ISP. In most cases, to send an email, you must use a mail server they supply.
if (mail($recipient, $subject, $email_content, $email_headers)) { This is the line of code that actually sends the email, but what it really is doing is dumping the mail to your server's Mail Transfer Agent.
I can't 100% tell you this is the case without knowing more about your ISP and your server, but by default that is how it works. So to the PHP code, it looks like the mail is sent, but from there the mail will simply disappear because the MTA tries to forward the mail and that gets rejected. This does not happen in realtime, so you will never know (without looking at logs) that the mail was never delivered.
Many ISP's do not allow mail to be sent directly from a server, using the MTA, as a way of rejecting spam. So in that case, they require you to deliver mail to their internal servers, and it will then be sent by their mail server for you.
You really need support from your hosting company to debug a complicated problem like email in many cases.
-
gizmola's post in Site has stopped uploading data was marked as the answer
Right -- well as I said, yes it looks like there is something different about the login credentials for the database. Typically on Godaddy shared hosting the mysql database is a shared resource, and they should document what you need to use for the host string, as well as being able to set your login/password for a specific database. I would suggest you seek that info from GoDaddy.
-
gizmola's post in Regex pattern with extra extension for urls was marked as the answer
Seems pretty cut and dry that you just need to add an OR to optionally match the "shorts/". I don't know if the rest of the code will also return the data you are looking to scrape or not.
preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:shorts/)?|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $linkurl, $match);
-
gizmola's post in Get a list of todays events from a recurrence column was marked as the answer
Without an actual spec for what the format of the output would be, here's a simple function that returns an array of the days indicated.
function toDayofWeekArray(string $schedule) { $days = [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ]; return array_combine($days, str_split($schedule)); }
It's important to note that this must be a string in the database, because, if you for example have this: 0000100 from the database, and PHP turns that into an integer, the function above won't work, because your leading zeros will be lost. It must remain a string for this to work correctly.
Little test:
$i = "0001001"; var_dump(array_filter(toDayOfWeekArray($i))); // Should return this array(2) { ["Thursday"]=> string(1) "1" ["Sunday"]=> string(1) "1" }
This is a simplified and combined version, that includes the filtration, and removes the left over array values:
function toDayofWeekArray(string $schedule) { $days = [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ]; return array_keys(array_filter(array_combine($days, str_split($schedule)))); }
-
gizmola's post in Storing Images was marked as the answer
Scalability is also a concern. Here is some food for thought.
What is important for scalability is only the maximum number of concurrent users per second. You need tools to help you simulate this type of load before you really can get an understanding of any potential bottlenecks or what concurrent load your system can handle and still operate.
Assumption #1: you have a monolithic server.
What this means is that your application will run in a stack where everything (other than the database) will run on the same server.
Sessions will use the filesystem images will be stored on the filesystem Database can be running on the same server or not Reverse proxy will run on the same server (assuming you are employing one). This sort of setup is typical, and has limited scalability, and suffers from contention issues when load increases. If this is how your production will run, you at least want to learn a bit about how your setup performs as load increases. Everything takes memory, and databases don't work well if they run out of memory or resources. A frequent mistake people make in setting up a database is to provide inadequate memory allocation. Databases are pretty much always given their own dedicated machine to run, for anything that isn't a hobby or non-commercial endeavor.
Advantages to storing data on the filesystem:
Filesystem already buffers data and is highly efficient The cost of returning data is only IO + bandwidth Stored in a database, a read of a blob requires IO + network delivery to application + network delivery to client Stored in the db, blob storge and retrieval is often non-optimal Stored in the db, blobs balloon the size of the database dataset, making database caching less effective, and can also slow down queries that touch the table(s) with the blobs in them. In terms of security, you will need to store the files in a location that is not within web space (ie. under the webroot). It is easy enough to write the routine you need that returns the data from a location on the filesystem.
Storing in a database does have this advantage, in terms of the potential for scalability:
Making the application scalable is simpler, as you can have 1-n application servers connecting to the same database (and this is the 1st level typical of a move to a scalable architecture from what started as a monolithic app) This is another reason to start with a reverse proxy even with a monolithic architecture. Once you have app server #2 you have broken sessions You can move sessions into a database or distributed cache like memcached or redis Moving sessions into a DB can add a lot of load to the db You can use the reverse proxy to pin sessions (ie. "sticky sessions") to a specific app server. Usually this is done using a cookie that the reverse proxy adds and subsequently uses to keep traffic coming back to the same app server once an initial connection is made. The other ways to scale an application that uses images stored on a filesystem:
Use an NFS server or NAS appliance I've worked for a number of companies with large amounts of data and files. In some cases, the problem could be solved with a NAS device, which servers can then mount using NFS as a client. Use a file storage service A good example of this is AWS S3. Some ISP's have their own alternative, and there are even consumer grade services like Dropbox you can make use of if you look into it. Whether or not this is smart or feasible comes again down to the application infrastructure, but as a rule of thumb, you are more likely to have the app experience feel similar if the object storage is local/within your hosting infrastructure. For example, if you had a server hosted by Linode, they offer an S3 compatible alternative service, and I'd look into that. The downside here is additional costs for the storage of the assets and possibly egress costs to retrieve. There are a lot of different "Object Storage" companies out there, and they are intrinsically scalable, so it wouldn't hurt to do some research. Take this list with a grain of salt, but here's a way to start looking at the possible vendors: https://www.g2.com/categories/object-storage-solutions -
gizmola's post in Not displaying any results from the database was marked as the answer
The SQL statement you had was definitely wrong. LIMIT constrains a result set, and is not a valid part of a WHERE clause. Whatever you might have fixed, you also must have fixed that issue.
-
gizmola's post in PHP Form Won't Send - Missing PHP for Submit Button was marked as the answer
As an aside, when I see code like this....
$buntingRefolding = $_POST['bunting-refolding']; $firstName = $_POST['your-first-name']; $surname = $_POST['your-surname']; $emailAddress = $_POST['your-email']; //etc
I always wonder why. Did they not understand PHP variables? How to interpolate an array?
Well at any rate, before we can even begin to consider the issue, you need to define what "stopped working" means. If it means that you used to get emails and you now don't, and nothing in the code has changed, the most likely culprit is that something in your hosting setup changed so that it no longer allows emails to be sent from your server (or they are being spam filtered because you don't have the things needed for a server and domain to allow.
This code uses the mail() function, which is the lowest common denominator for sending mail, and is reliant on other MTA configuration in the OS. There isn't a lot of visibility into what happens once the mail is dropped off to the MTA, which is a big reason that more sophisticated email libraries exist. I don't know how old this code is, but wordpress has its own mailing function wp_mail() which wasn't used, so when you say that the other mail works, I would check that those routines were written the same way. They might be using wp_mail() which wraps the phpmailer library.
-
gizmola's post in Adding a where clause to query was marked as the answer
It also looks like you want to group the prior fulltext searches, so something like this?
SELECT *, l.link_id , l.url , l.title , t.term , l.content_type , d.content , d.link_id , SUM(MATCH(t.term) AGAINST('w00t' IN BOOLEAN MODE) + MATCH(url, title) AGAINST('w00t') + MATCH(d.content) AGAINST('w00t')) as `rank` FROM links l JOIN terms t ON l.link_id = t.link_id JOIN links_description d ON d.link_id = l.link_id WHERE (MATCH(t.term) AGAINST('w00t' IN BOOLEAN MODE) OR MATCH(url, title) AGAINST('w00t') OR MATCH(content) AGAINST('w00t')) AND l.content_type = 'docume') GROUP BY title ORDER BY `rank` DESC LIMIT 200;
-
gizmola's post in Mysql event didn't execute in a particular day but started to execute afterwards, how to find the root cause? was marked as the answer
Off the top of my head 2 possibilities that might explain the issue:
Event scheduler was not started in server Server is UTC, and event was UTC time, leading to confusion as to when the first event should have occurred. These are just guesses, but looking at the mysql error log, looking at the events table and commands like SHOW CREATE EVENTS and SHOW EVENTS might help you.
-
gizmola's post in Curl rate limits and time outs, limit rate under a certain amount for get requests was marked as the answer
What the heck is this code?
$customer["id"]; $customer["firstname"]; $customer["lastname"]; $customer["fullname"]; $customer["business_name"]; $customer["email"]; $customer["phone"]; $customer["mobile"]; $customer["address"]; $customer["city"]; $customer["state"]; $customer["zip"]; $customer["business_and_full_name"]; $customer["business_then_name"];
I have no idea why you would think that adding 5ms of sleep would help anything.
Your PDO code should be using a prepared statement.
Then you simply execute the statement in a loop, passing the data each time.
It is well known that MySQL inserts are much faster if you do multiples:
INSERT INTO Table (col1, col2) VALUES (?, ?), (?, ?), (?, ?).... This is one place where PDO doesn't have a built in solution, so you have to build your own, as Barand helpfully provided an example. It is possible to have limits on the size of a query, but would require a lot of data. Changing of that limit is dependent on what mysql library you are using, so I leave that to you to research. For example, if you are using mysqlnd, then a PDO runtime parameter changing that size is ignored.
A good hybrid option would be to create a batch system where you load an array of the values inside the outer foreach, build the statement from that array, and prepare the statement and pass the array to the bind.
However, the first stab I would take, would be to simply do a prepare and execute loop with a single transaction.
$query = "INSERT INTO Customer (SyncroID, CompanyName) VALUES (?, ?)"; try { $pdo->beginTransaction(); $stmt = $pdo->prepare($query); foreach ($customers as $customer) { if (!empty($customer['business_name'])) { $stmt->execute([$customer['id'], $customer['business_name']]); } } $pdo->commit(); }catch (\Throwable $e){ $pdo->rollback(); throw $e; } Todo this type of thing effectively you need to make sure that the PDO connection has $conn->setAttribute( PDO::ATTR_EMULATE_PREPARES, false ) and $conn->setAttribute( PDO::ERRMODE_EXCEPTION, true).
-
gizmola's post in Setting up an account on Web app was marked as the answer
In general, this would be called provisioning.
For the most part, this requires that your application have an underlying architecture that supports this.
In terms of DNS, you can set up a wildcard DNS entry for *.myapp.com.
Internally, your application needs code that accepts a request, examines the requested url, extracts the subdomain, and executes the routing accordingly, or you can also have a rewrite that will look for subdomains other than 'www' and rewrite those to https://myapp.com/shop1.
When a new user creates a store, you will run provisioning code in your application that does any required setup (make new database user, create database with new user assigned rights, save credentials in user profile configuration file or in database.) There are strengths and weaknesses to each approach so you have to consider the tradeoffs and security implications of each approach. For example, you could just use the primary database access user, and not create a separate database user for each customer database. There isn't one right answer for each application.
-
gizmola's post in Oracle SQL certification path? was marked as the answer
Oracle database has been around a long time, and has a lot of features and extensions that are specific to it. If you are not going to use it immediately, or need a certification for a job, I wouldn't recommend going down that rabbit hole, even though I do think that Oracle database is a great RDBMS in many ways, but it is commercial and expensive. You often see it paired with java/enterprise java applications. For reasons I won't go into, besides cost, very few people pair PHP with Oracle database. The open source database closest in design and features to Oracle is Postgresql, so if anything, exploring postgresql would be a step in that direction.
Since you use SQL Server, I would suggest getting certs in that, and in particular, learn about the specific things you listed, like transactions and concurrency (locking), and Views, stored procedures and triggers. Sprocs and Triggers are very important and highly used in SQL server development (Transact-SQL aka T-SQL), and in Oracle (which has an entirely different stored procedure language). MySQL also has stored procedures & triggers, but they are not commonly used, in comparison to the way that they are very often baked into applications that use sql server on the backend, as is the case with a lot of .NET applications.
I don't think you can really say you are confident in your SQL knowledge until you are confident in the many ways you can use joins (including self joins), and the use of grouping and aggregation, as these are some of the primary reasons people use relational databases. It also helps to learn about the way rdbms's work in terms of datatypes, constraints and indexes. You want to have a good working understanding of the different types of indexes and the ways they overlap with primary key/unique constraints. You also really need to understand concurrency and locking, as it pertains to each database, and an understanding of transactions as well as "2 phase commit" support.
While all the major relational database engines have configuration options that can be used to alter the concurrency/locking models, MySQL (and forks like MariaDB) is particularly different in that it allows for the use of different engines. For example, the original MySQL engine (myisam) is very different from the popular InnoDB engine that most companies use. It's a simple example, but MyISAM has no support for transactions, so you can write code that starts transactions and commits or does a rollback, and mysql will happily except that code, when in fact it actually ignores those statements entirely and doesn't support transactions whatsoever.
You also want to understand how you install and configure these databases, and what options and tradeoffs might be involved in how you set them up. This affects how a database might/might not recover from a crash/ lose some data/transactions (or not), have backup options, or support replication in various flavors. With the existence of Docker, it's now much easier to experiment and learn about these databases, and create local test configurations.
I think it helps to keep in mind, that there are categories of developers (DB Architects & Administrators & DB developers) who specialize in these products, and they have extensive levels of depth to them. There are some well known experts with books you might be interested in. A couple off the top of my head, are Joe Celko, who wrote some well known SQL books, and Tom Kyte, who authored many books on Oracle, and was well known for his "Ask Tom" column where he answered oracle questions and demonstrated ways certain problems could be solved.
PHPFreaks is fortunate to have a number of developers who have consistently shared their expertise with relational database design and SQL, so this is still a great place to get advice and in many cases example code.
-
gizmola's post in query not working as expected was marked as the answer
It would not work any better in Oracle, because your logic is faulty.
Keep in mind that inside your parens, if any of those items are TRUE, then the entire group is true.
team_name is not null or team_name !='' or team_name NOT LIKE '%[teamname]%') In the row you don't expect, consider each condition
team_name is not null ---> true
team_name !='' ---> true
team_name NOT LIKE '....' ---> false.
So you get the row, despite the fact that the 3rd condition is false. What it appears you really want is:
team_name is not null AND team_name !='' AND team_name NOT LIKE '%[teamname]%')
-
gizmola's post in What is the purpose of the begin and end ^ and $ characters, when should I use them and what do they do? was marked as the answer
If you are looking for -- exactly, a line that starts ... then has something you want to match, followed exactly by the end of a line, then you may want to use those anchors.
Regex is integrated into a lot of different languages and subsystems, for a number of different purposes. For example, it might be that your use case is to find, within a bunch of lines of text, a particular pattern like a phone number or a url.
Another use case, might be entirely different, as in the case of a password which must meet certain criteria. In the case of a password, you would want an exact match, including the start and end anchors, whereas, if you're looking for a phone number or a url within a bunch of other text (perhaps in a forum like this one) then you certainly would not want the match to only be made including the start and end line anchors.
In some subsystems (apache mod_rewrite for example) the context of the data available to be evaluated with regex, already assumes start and end anchors, and actually trying to apply them won't work, so that might lead to some confusion, when rewrites don't work the way you expect.
-
gizmola's post in Why can't I GROUP BY emp_name only in this query? But why am I able to GROUP BY orderid alone? was marked as the answer
The column(s) you select will generate one row(group) per unique value of that column.
Simple example of orders, assuming the order contained a column for the country_code of the customer that placed the order.
You want a result with the "Total value of orders by country".
So you would want to GROUP BY country_code.
Your result set will then have 1 row for each country, but a SUM(amount), of course will provide you the total value of orders for that country.
Let's say instead, you want a sum of orders by country, but you want the total for that country by year.
SELECT country_code, YEAR(order_date) as year, SUM(amount) FROM ORDERS GROUP BY country_code, YEAR(order_date) ORDER BY country_code, year At that point you're going to get a row for every country_code/year combination, and the SUM(amount) is relative to that grouping.
-
gizmola's post in Understanding subqueries! was marked as the answer
Simple subquery article: https://www.guru99.com/sub-queries.html
A subquery is exactly what the name describes: An inner (sub) query that is run, with a result that is then used by an outer query. It is not complicated.
In order for it to be used in a "WHERE column =" the subquery must return at most 1 value. If it can return multiple rows/values, then you need to use "where column IN" or possibly NOT IN.
My 1st tip: a subquery can't possibly work as a subquery, if it doesn't run by itself in standalone fashion. You want to investigate, whether or not you can use a HAVING clause without a GROUP BY.
-
gizmola's post in Loading Youtube video in Magnific pop up window was marked as the answer
Yes you are missing something obviously different, which is that you are including jquery and the magnific popup code in the wrong order AND loading it in the body rather than the head section. Try changing it to this:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> Document </title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> <script src="jquery.magnific-popup.js"></script> <link rel="stylesheet" href="magnific-popup.css"> <script> $(document).ready(function() { $('.popup-youtube').magnificPopup({ type: 'iframe' }); }); </script> </head> <body> <div> <a class="popup-youtube" href="https://www.youtube.com/watch?v=Euy4Yu6B3nU">Air</a> </div> </body> </html>
-
gizmola's post in rating system was marked as the answer
So what people are trying to say is that something must run the submit_rating.php when a review is posted. The same script needs to be run when a page is loaded, as it returns the data you need for your page to update the numbers you want to see updated in a json structure.
We can surmise that the way to do the ajax calls is with jquery, since jquery was included in the html you provided.
Here is the jquery documentation. Read through that and try and adapt their examples. Just to simplify things for you you can focus on the $.ajax() method, as the other methods are just HTTP request type wrappers around $.ajax.
The html page you provided needs some jquery code to:
define the handler code you need that will submit the form data to submit_rating.php bind that handler to the submit button of the form define a function that takes the json results returned from submit_rating.php (which are the actual stored ratings) and using those to update the various places in the Dom where the relevant numbers are required. Doing that can also be done with jquery, which has various methods to select and then manipulate DOM elements. Currently there is no code to do these things, that you have presented. If you need to write that code yourself, then you now have a basic step by step guide as to what you need to do. It's also a pretty standard way of doing things, although jquery has fallen out of favor in recent years as javascript frameworks like vue and react have become popular. Neither of those frameworks are relevant to your code though.
I will mention in closing, that it would be very helpful for you to understand submit_rating and it's dual purpose. That script is designed both to update the statistics if the review form was submitted, and to also get the statistics, and those 2 functions are not mutually exclusive. You must understand how to construct a POST structure in your function that is meant to handle a form submission, by getting the input from the field(s) needed and passing that in the post. Make sure you understand how to get that code to be triggered when the form is submitted, and not triggered when it's not needed (ie when it's just a GET request to load the page).
Hope this helps you move forward.
-
gizmola's post in Error message copying data from one database to another on the same server was marked as the answer
You are clearly new to doing queries with the php mysqli extension.
First of all, why are you including extraneous parens and punctuation in your query?
What you are doing:
$sql= "select * from cic_remus.contacts where (id='$id');"; What it should be:
$sql = "select * from cic_remus.contacts where id=$id"; Your problem is likely a logic issue as Kicken has pointed out, but you should also address the underlying issue for debugging purposes:
This is telling you that you have an uncaught exception, so try surround the code with a try..catch block for that and then display the actual exception message and query next time you do this.
try{ // sql query code } catch(Exception $e) { echo "Error: " . $e->getMessage(); }
I'm not sure why you are doing what you are doing, when instead you can just do a query:
INSERT INTO cic_kenobi.contacts AS select * from cic_remus.contacts ON DUPLICATE KEY IGNORE If the tables don't exactly match (you can craft the individual values statement in the same way you already have been). You can run this from PHP but unless you are doing this frequently, having it scripted within php doesn't have a lot of value to it.
-
gizmola's post in how to add extension in php? was marked as the answer
I don't know what you found on SO, but it's unrelated to the intl extension.
What operating system are you running? What version of php? How is your development environment configured? Are you using Docker?
Note: The library you are trying to use states that it is "depreciated" (sic). It was also forked by the originator to a different repo, with the intention of passing it on to other maintainers.
Since you are using Laravel, this one might be a better fit for your project: https://github.com/TechTailor/Laravel-Binance-Api
It states it is still in alpha, but depending on what you intend to do it might be a better fit for you.