Posts by Mario de M. Barros Neto • 472 points
19 posts
-
0
votes1
answer296
viewsA: Links of the Docker-Compose - Laravel + Redis
I managed to solve the problem in a simple way. Just passing as the redis host, the string redis referring to the service name on the Docker.
-
-1
votes1
answer296
viewsQ: Links of the Docker-Compose - Laravel + Redis
I am creating a development environment for a Docker-based 5.0 Standard project. I managed a file docker-compose.yml for http://phpdocker.io and I made some modifications, he’s this way:…
-
1
votes0
answers49
viewsQ: Configure a PHP script to use minimal system resources?
I have a php script that is not heavy, basically it makes a giant amount of records in a Mariadb database. The point is that this robot will take a few hours (maybe more than a day) to fully run,…
phpasked Mario de M. Barros Neto 472 -
0
votes1
answer50
viewsQ: What Ips and Ports do I need to have cleared to work with Composer and Git?
The company in which I work will implement an enterprise network in which, there are several blocks of Ips and Ports. I need to raise all the Ips and ports I need to use to request the release of…
-
1
votes1
answer1147
viewsQ: SELECT in a parent table where ALL children are in the same situation - Mariadb/Mysql
I need to select in a parent table, where all children in that table NEED to be in the same situation. For example: In the parent table I have the following fields: pai_id, pai_nome In the table son…
-
0
votes0
answers107
viewsQ: Jquery $.each sync
I have a GRID on a screen where, each line has a button that calls a javascript method passing some values. In this method, a call is made via getJSON. The problem is that even in this call,…
-
18
votes2
answers445
viewsQ: Is it wrong for me to use a static method to retouch a collection of objects?
First of all, I know that I should not go out making classes with various static methods but in this case that I bring here, I do not understand why it can be considered bad practice. Let’s say I…
-
0
votes3
answers313
viewsA: Login problems using the crypt() function in PHP
From what I noticed, you are not generating the password hash typed by the user again during login. Change the following line: if($userRow['PASSWORD']==$upass) To:…
-
0
votes1
answer117
viewsA: Make PHP show folder files
Follow an example to list the files (of a certain type) in a directory. chdir( 'path' ); $files = glob("{*.pdf,}", GLOB_BRACE); foreach($files as $file) echo $file; Remembering that as commented,…
-
0
votes1
answer150
viewsQ: router.php on the internal server does not work properly
I created a router.php file in the published root of my project, this file was made as guidance in the PHP documentation for the built-in server. It works as a native change to . htaccess which is…
phpasked Mario de M. Barros Neto 472 -
0
votes2
answers368
viewsA: Select dynamic as you type in a Textbox
If the table where this select is made is well indexed. My suggestion is that you make a full select on it even before the user input in the field. You store the result array somewhere that you can…
-
1
votes1
answer259
viewsA: How to create a product relationship with php and Mysql
A suggestion: First, if I’m not mistaken, you shouldn’t make an HTML ID array like this: id="product[]" (leave only the name) Now: In the database part, simply create an intermediate table to relate…
-
2
votes5
answers375
viewsA: Make <a> change href=" button on each new visitor ( IP ) on a given page
In my view, you will need to capture all individual accesses to always add +1 on this link according to the number of the visit. You can do this by maybe saving in a database very light the access…
phpanswered Mario de M. Barros Neto 472 -
3
votes2
answers7609
viewsQ: SQLSTATE[23000]: Integrity Constraint Violation: 1062 Duplicate entry '0' for key 'PRIMARY'
When trying to perform an INSERT in my table with PDO, I get the following error: SQLSTATE[23000]: Integrity Constraint Violation: 1062 Duplicate entry '0' for key 'PRIMARY' I’ve researched enough…
-
1
votes0
answers278
viewsQ: Configure domain names for the same site (different files) IIS WS2012
I have a site that caters to multiple companies. However, the domain is the same. Two new domains have been acquired to solve these problems but the site will be maintained on the same IIS server.…
-
1
votes2
answers497
viewsQ: Conflict of types in function
I’m trying to create a list structure using struct. Only when compiling my code, I get an error because even specifying the type Lista, he’s in some kind of trouble. Follow the full code: #include…
-
4
votes2
answers1898
viewsA: Read a Serasa Data String
Applying an urlencode only in the parameter, the error does not occur.
-
0
votes2
answers1898
viewsQ: Read a Serasa Data String
I need to make in my application a query to the services of Rasa via Serasa Experian. I have already assembled the entire layout and when I make the request directly through the browser, I have the…
-
3
votes1
answer130
viewsQ: How to ignore an exception in php?
I am consuming a legacy system method that generates scans some Ftps directories and searches for files. However, if it accesses a directory that does not have files, it creates an exception. Is…
phpasked Mario de M. Barros Neto 472