<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>PHP on Mazer.dev</title><link>https://mazer.dev/en/tags/php/</link><description>Recent content in PHP on Mazer.dev</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2016-2025 Ademir Mazer Junior. All Rights Reserved.</copyright><lastBuildDate>Sun, 15 Dec 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://mazer.dev/en/tags/php/index.xml" rel="self" type="application/rss+xml"/><item><title>How to resolve the error: SoftException in Application.cpp 267 File /home/public_html/index.php is writeable by group</title><link>https://mazer.dev/en/php/posts/how-resolve-error-softexception-application-cpp/</link><pubDate>Sun, 15 Dec 2024 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/how-resolve-error-softexception-application-cpp/</guid><description><![CDATA[<p>The error &ldquo;SoftException in Application.cpp:267: File &lsquo;/home/username/public_html/index.php&rsquo; is writeable by group&rdquo; frequently occurs on servers using cPanel, especially when the environment is configured with the suPHP PHP handler. This handler requires strict permissions for files and directories, and excessive permissions can trigger security errors.</p>
<p>In this article, we cover how to identify and fix this problem using chmod and chown, common tools for managing
files and permissions in Linux.</p>

<h2 id="understanding-the-softexception-in-applicationcpp-error" data-numberify>Understanding the SoftException in Application.cpp error<a class="anchor ms-1" href="#understanding-the-softexception-in-applicationcpp-error"></a></h2>
<ol>
<li><strong>Inappropriate Permissions</strong>: Files configured as group-writable (for example, with permissions <code>0666</code>) pose a security risk and are not supported by some environments configured with suPHP or other security restrictions.</li>
<li><strong>Incorrect ownership</strong>: If files are not assigned to the correct user, this can also lead to permission conflicts.</li>
<li><strong>Server Configuration</strong>: Changes to the PHP handler (from DSO to suPHP) make permissions stricter. In suPHP, files need to be owner-readable and write-safe by third parties.</li>
</ol>

<h2 id="resolving-the-softexception-in-applicationcpp-error" data-numberify>Resolving the SoftException in Application.cpp error<a class="anchor ms-1" href="#resolving-the-softexception-in-applicationcpp-error"></a></h2>
<p>Some ways to resolve the SoftException in Application.cpp error include:</p>]]></description><enclosure url="https://mazer.dev/images/php/index-writeable-by-group.jpg" length="417252" type="image/.jpg"/></item><item><title>How to resolve GitHub API Rate Limit with Composer</title><link>https://mazer.dev/en/php/composer/how-resolve-github-api-rate-limit-composer/</link><pubDate>Thu, 05 Dec 2024 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/composer/how-resolve-github-api-rate-limit-composer/</guid><description><![CDATA[<p>When using Composer in Laravel or PHP projects, developers may encounter the
error &ldquo;Create a GitHub OAuth token to go over the API rate limit&rdquo;.  This error occurs when the rate limit of the
GitHub API is timed out, preventing Composer from accessing the information needed to install
the dependencies.</p>

<h2 id="causes-of-the-error" data-numberify>Causes of the Error<a class="anchor ms-1" href="#causes-of-the-error"></a></h2>
<p>GitHub imposes rate limits to protect its API from abuse and ensure service availability.
Anonymous requests, such as those made by Composer without authentication, are subject to lower limits.
Exceeding this limit results in the error in question.  The main causes include:</p>]]></description><enclosure url="https://mazer.dev/images/git/github-rate-limit.jpg" length="157091" type="image/.jpg"/></item><item><title>What are code quality tools ?</title><link>https://mazer.dev/en/software-engineering/code-quality/tools/</link><pubDate>Fri, 05 Apr 2024 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/software-engineering/code-quality/tools/</guid><description><![CDATA[<p>Code quality tools are designed to help developers and teams maintain healthy codebases, promote consistency, and
catch  potential problems before they become real issues.</p>
<p>Code quality tools are essential in the development of software, serving as the vigilant sentinaries that ensure
your codebase is not only efficient and bug-free but also adheres to the best practices and standards of coding.</p>
<p>These tools can enhance the maintainability, readability, and performance of the software you develop, making the
codebase more accessible and easier to manage for both current and future developers. One of their primary goals is
to ensure standards throughout the codebase across all your teams.</p>]]></description></item><item><title>How to Generate a Random String with PHP</title><link>https://mazer.dev/en/php/posts/php-generate-random-string/</link><pubDate>Sun, 15 Oct 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/php-generate-random-string/</guid><description><![CDATA[<p>From time to time in software development, we encounter the need to generate random strings for passwords, tokens, or other purposes. In this article, we&rsquo;ll explore how to generate random strings in PHP, looking at various methods and understanding the security and complexity levels of each approach.</p>

<h2 id="what-is-a-random-string" data-numberify>What Is a Random String?<a class="anchor ms-1" href="#what-is-a-random-string"></a></h2>
<p>A random string is a sequence of characters generated randomly. Sounds simple, right? But the implications are vast. These strings are commonly used in situations like authentication tokens, temporary passwords, and even unique identifiers.</p>]]></description><enclosure url="https://mazer.dev/images/php/php-random-strings.webp" length="480066" type="image/.webp"/></item><item><title>PHP String Interpolation</title><link>https://mazer.dev/en/php/posts/php-string-interpolation/</link><pubDate>Tue, 10 Oct 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/php-string-interpolation/</guid><description><![CDATA[<p>String interpolation is one of those features in PHP that make the language both powerful and easy to use. It allows you to embed variables directly within strings, making string manipulation more intuitive and readable.</p>
<blockquote>
<p>You&rsquo;ll understand better, but just to clarify, in PHP, string interpolation only works with double quotes or Heredoc.</p>
</blockquote>

<h2 id="basic-syntax-of-string-interpolation-in-php" data-numberify>Basic Syntax of String Interpolation in PHP<a class="anchor ms-1" href="#basic-syntax-of-string-interpolation-in-php"></a></h2>
<p>In PHP, simple string interpolation is performed using the <code>$</code> symbol (yes, the same symbol that defines a variable).</p>]]></description></item><item><title>How to Require a Specific Branch Name on Composer</title><link>https://mazer.dev/en/php/composer/how-to-require-specific-branch-name-composer/</link><pubDate>Sat, 05 Aug 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/composer/how-to-require-specific-branch-name-composer/</guid><description>&lt;p>Composer is a dependency management tool for PHP. It allows you to specify the exact versions of packages that your
project needs. This is useful for ensuring that your project is always using the latest stable versions of its
dependencies, or for testing out new features that are not yet released in a stable version.&lt;/p>
&lt;p>In some cases, you may want to require a specific branch of a package instead of a specific version. This can be
useful for testing out a new feature that is not yet released in a stable version, or for using a branch that fixes
a bug that has not yet been merged into the master or main branch.&lt;/p></description><enclosure url="https://mazer.dev/images/php/composer-specific-branch-name.webp" length="93446" type="image/.webp"/></item><item><title>Laravel's CreateOrUpdate Upsert Technique: A Comprehensive Guide with Use Cases</title><link>https://mazer.dev/en/laravel/posts/createorupdate-upsert-technique/</link><pubDate>Tue, 04 Jul 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/posts/createorupdate-upsert-technique/</guid><description><![CDATA[<p>Laravel offers a variety of methods for interacting with databases. Among these, the <code>createOrUpdate</code> method, also known as the upsert technique, is a powerful tool that allows developers to streamline their code and improve efficiency. This article provides an in-depth look at the <code>createOrUpdate</code> method, its usage, and its advantages, along with practical use cases and examples.</p>

<h2 id="what-is-upsert" data-numberify>What is Upsert?<a class="anchor ms-1" href="#what-is-upsert"></a></h2>
<p>Upsert is a portmanteau of &ldquo;update&rdquo; and &ldquo;insert&rdquo;. It&rsquo;s a method used in database management where a row is either updated if it already exists or inserted if it doesn&rsquo;t. Laravel provides the <code>createOrUpdate</code> method to perform this operation, which can be a significant time-saver and can help keep your codebase clean and efficient.</p>]]></description><enclosure url="https://mazer.dev/images/laravel/createorupdate-upsert.webp" length="57910" type="image/.webp"/></item><item><title>PHP Composer, error: Invalid version string</title><link>https://mazer.dev/en/php/posts/php-composer-error-invalid-version-string/</link><pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/php-composer-error-invalid-version-string/</guid><description><![CDATA[<p>Recently working with <code>PHP Composer</code> on a project that is based on the Laravel framework, I came across the error:
<strong>Invalid version string</strong>. More precisely when performing the attempt to install a <a href="/en/laravel/">Laravel package</a> that allows me to use models with the logical strategy of Eloquent to access <a href="/en/tags/mongodb/">MongoDB databases</a>.</p>
<p>The package name is <code>Laravel MongoDB</code>, created by Jens Segers, and can be found in the Github <a href="https://github.com/jenssegers" target="_blank" rel="noopener noreferrer">jenssegers repository<i class="fas fa-external-link-square-alt ms-1"></i></a>
<strong><a href="https://github.com/jenssegers/laravel-mongodb" target="_blank" rel="noreferrer noopener">laravel-mongodb</strong></a>.</p>]]></description><enclosure url="https://mazer.dev/images/php/software-bug.webp" length="40104" type="image/.webp"/></item><item><title>Increasing the Memory Limit in PHP for WordPress</title><link>https://mazer.dev/en/php/posts/increasing-memory-limit-php-wordpress/</link><pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/increasing-memory-limit-php-wordpress/</guid><description>&lt;p>Since WordPress is a CMS (Content Management System) with the possibility of using external themes and plugins, it is common for some errors to happen after the installation, even for testing, of a new extension of this nature on your site.&lt;/p>
&lt;p>It is also susceptible to some errors when a PHP or Apache or Nginx version upgrade occurs, due to the complexity of keeping all these plugins and themes up to date and with compatibility with the most current versions of these softwares.&lt;/p></description><enclosure url="https://mazer.dev/en/php/posts/increasing-memory-limit-php-wordpress/featured-wordpress.png" length="50485" type="image/png"/></item><item><title>Executing protected and private methods in PHP</title><link>https://mazer.dev/en/php/posts/executing-protected-private-methods-php/</link><pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/executing-protected-private-methods-php/</guid><description>&lt;p>Private and protected methods should not be accessed outside the permissible scope of class or subclasses. But there are some situations where this is necessary, for me in some contexts of automated testing (unit or integration), or in others where I am implementing a feature and want to perform punctual executions to verify behaviors.&lt;/p>
&lt;p>Regardless of why, and the good practice guideline in which I would claim, do not call private or protected methods outside of their scopes, several languages provide support for this possibility.&lt;/p></description><enclosure url="https://mazer.dev/en/php/posts/executing-protected-private-methods-php/featured-private.jpeg" length="192600" type="image/jpeg"/></item><item><title>PHP Dates: Fetching the Previous Day or Month pr Year</title><link>https://mazer.dev/en/php/posts/php-dates-fetching-previous-day-month-year/</link><pubDate>Sat, 10 Jun 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/php-dates-fetching-previous-day-month-year/</guid><description><![CDATA[<h2 id="get-the-previous-dates-in-php" data-numberify>Get the Previous Dates in PHP<a class="anchor ms-1" href="#get-the-previous-dates-in-php"></a></h2>
<p>Dates and timestamps are crucial in many software systems and web applications. They allow us to track events,
analyze patterns, and provide users with pertinent information based on time. In this post we&rsquo;ll explore how to handle
dates in PHP, specifically on how to get the date for the last day, or last month or even last year.</p>

<h2 id="get-the-previous-month-in-php-date" data-numberify>Get the Previous Month in PHP date<a class="anchor ms-1" href="#get-the-previous-month-in-php-date"></a></h2>
<p>Imagine you&rsquo;re working on a PHP project and you need to fetch last month&rsquo;s date. The PHP <code>date()</code> and <code>strtotime()</code>
functions are here to help. However, these functions can lead to misunderstandings if not used correctly.</p>]]></description><enclosure url="https://mazer.dev/images/php/php-previoius-date.jpg" length="161310" type="image/.jpg"/></item><item><title>How to create Copyright date with automatic year on your blog or website with PHP, WordPress and Laravel</title><link>https://mazer.dev/en/php/posts/how-create-copyright-date-with-automatic-year-php-wordpress-laravel/</link><pubDate>Thu, 01 Jun 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/how-create-copyright-date-with-automatic-year-php-wordpress-laravel/</guid><description><![CDATA[<p>Adding the copyright information with the current year in the footer of websites and blogs is important to convey to
your audience the information that the content they find is &ldquo;alive&rdquo; and updated on this site. It is also interesting
to add the year of the beginning of the site, the more information about the maturity and evolution of the blog, the
more credibility it will pass to the reader.</p>]]></description><enclosure url="https://mazer.dev/en/php/posts/how-create-copyright-date-with-automatic-year-php-wordpress-laravel/featured-copyright.webp" length="53250" type="image/webp"/></item><item><title>PHP Timeouts - Max Execution Time and Best Practices for Performance and Reliability</title><link>https://mazer.dev/en/php/posts/php-timeout-max-execution-time/</link><pubDate>Mon, 10 Apr 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/php-timeout-max-execution-time/</guid><description><![CDATA[<p>When executing PHP scripts called by web browsers, it is important to monitor their execution time to prevent timeouts
from occurring.</p>
<p>In this guide, we will explore different methods to increase the PHP max execution time, ensuring your scripts have
enough time to complete their tasks without affecting server performance.</p>

<h2 id="php-timeout" data-numberify>PHP Timeout<a class="anchor ms-1" href="#php-timeout"></a></h2>
<p>In PHP, a <code>timeout</code> refers to the <em>maximum amount of time that a script is allowed to run</em> before it is terminated
automatically. This is done to prevent runaway scripts from consuming excessive server resources, like memory and CPU,
or causing performance issues.</p>]]></description><enclosure url="https://mazer.dev/en/php/posts/php-timeout-max-execution-time/featured-php-timeout.webp" length="59946" type="image/webp"/></item><item><title>How to resolve the error "iconv(): Wrong charset, conversion from UTF7-IMAP to UTF-8//IGNORE is not allowed" on PHP and Laravel</title><link>https://mazer.dev/en/php/posts/how-resolve-error-iconv-wrong-charset-conversion-from-utf7-imap-utf8-ignore-not-allowed/</link><pubDate>Fri, 24 Mar 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/how-resolve-error-iconv-wrong-charset-conversion-from-utf7-imap-utf8-ignore-not-allowed/</guid><description><![CDATA[<p>When working with different character encodings in PHP and Laravel, you might encounter errors on charset convertion like the following: <code>iconv(): Wrong charset, conversion from 'UTF7-IMAP' to 'UTF-8//IGNORE' is not allowed</code></p>
<p>This error occurs when attempting to use the iconv() function to convert a string from the &lsquo;UTF7-IMAP&rsquo; charset to &lsquo;UTF-8//IGNORE&rsquo; charset. In this article, we&rsquo;ll explore the possible causes of this error and provide solutions to fix it.</p>

<h2 id="causes-of-the-error-iconv-wrong-charset-conversion-from-utf7-imap-to-utf-8ignore-is-not-allowed" data-numberify>Causes of the Error iconv(): Wrong charset, conversion from ‘UTF7-IMAP’ to ‘UTF-8//IGNORE’ is not allowed<a class="anchor ms-1" href="#causes-of-the-error-iconv-wrong-charset-conversion-from-utf7-imap-to-utf-8ignore-is-not-allowed"></a></h2>
<p>There could be a few possible reasons for this error:</p>]]></description><enclosure url="https://mazer.dev/en/php/posts/how-resolve-error-iconv-wrong-charset-conversion-from-utf7-imap-utf8-ignore-not-allowed/featured-wrong-charset-php.webp" length="95066" type="image/webp"/></item><item><title>How to resolve the error "Call to undefined function mb_strcut()" on Laravel</title><link>https://mazer.dev/en/laravel/troubleshooting/how-resolve-error-call-to-undefined-function-mb_strcut-php-laravel/</link><pubDate>Tue, 21 Mar 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/troubleshooting/how-resolve-error-call-to-undefined-function-mb_strcut-php-laravel/</guid><description><![CDATA[<p>The error &ldquo;Call to undefined function mb_strcut()&rdquo; typically occurs with PHP softwares or Laravel projects, when the PHP Multibyte String (mbstring) extension is not installed or enabled in your server environment. Laravel requires this extension for string manipulation with multi-byte characters. To resolve this error, you need to install and enable the mbstring extension.</p>
<p>Here are the steps to do this on various platforms:</p>

<h2 id="fix-call-to-undefined-function-mb_strcut-on-linux-ubuntu--linunx-debian--linux-mint" data-numberify>Fix “Call to undefined function mb_strcut()” on Linux Ubuntu / Linunx Debian / Linux Mint:<a class="anchor ms-1" href="#fix-call-to-undefined-function-mb_strcut-on-linux-ubuntu--linunx-debian--linux-mint"></a></h2>
<p>To install and enable the mbstring extension, run the following commands:</p>]]></description><enclosure url="https://mazer.dev/en/laravel/troubleshooting/how-resolve-error-call-to-undefined-function-mb_strcut-php-laravel/featured-call-to-undefined-function-mb-strcut.webp" length="55348" type="image/webp"/></item><item><title>Friendly URL rewriting in built-in web server of PHP</title><link>https://mazer.dev/en/php/posts/friendly-url-php-builtin-server-modrewrite/</link><pubDate>Mon, 27 Feb 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/friendly-url-php-builtin-server-modrewrite/</guid><description><![CDATA[<p>To work in a local development environment PHP provides an easy-to-use <strong>built-in web server</strong>.</p>
<p>The PHP built-in web server is a handy feature, but it is not an Apache nor Nginx web server. Therefore, features like Url friendly are not supported by default.</p>
<p>Today, it is common for web projects to have friendly URLs as a requirement, for example, Laravel applications depend on it. This is achieved through Apache (mod_rewrite) or Nginx specific configuration, but is not default on renders built-in PHP web server.</p>]]></description><enclosure url="https://mazer.dev/en/php/posts/friendly-url-php-builtin-server-modrewrite/featured-php-server-friendly-url.webp" length="33634" type="image/webp"/></item><item><title>PHP Framework Laravel – What is</title><link>https://mazer.dev/en/laravel/b1-course/laravel-framework-what-is/</link><pubDate>Sat, 25 Feb 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/b1-course/laravel-framework-what-is/</guid><description><![CDATA[<p>PHP <a href="https://laravel.com" target="_blank" rel="noreferrer noopener">Laravel</a> is an application framework based on a <em>Open Source</em> Code, aimed at developing web systems with expressive and elegant syntax. It is developed in PHP, being easily adopted and learning.</p>
<div class="alert alert-info" role="alert"><i class="alert-icon fas fa-fw fa-info-circle me-1"></i>
<p>Its first public version was a beta released in mid-2009.</p>
</div>
<p>Its web structure provides an infrastructure and starting point for creating your app, allowing you to focus on your software&rsquo;s business rules.</p>
<p>Let <a href="/en/laravel/b1-course/framework-laravel-architecture-components/">framework take care of the details</a> such as data sanitization, user input validation rules, HTTP request header treatment, HTTP response structure formatting, among many other technical features.</p>]]></description><enclosure url="https://mazer.dev/en/laravel/b1-course/laravel-framework-what-is/featured-laravel-logo.png" length="8776" type="image/png"/></item><item><title>PHP Laravel Framework Architecture Components</title><link>https://mazer.dev/en/laravel/b1-course/framework-laravel-architecture-components/</link><pubDate>Wed, 22 Feb 2023 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/b1-course/framework-laravel-architecture-components/</guid><description><![CDATA[<p>Every development framework delivers standardized architecture to organize the activity of software project teams with good programming practices. With Laravel framework this is no different, and in this article you will have an overview of the components that make up your architecture.</p>
<p>Note that for each component of the Laravel PHP described here, a specific article may be suggested for deepening and learning in the use of it.</p>
<div class="alert alert-info" role="alert"><i class="alert-icon fas fa-fw fa-info-circle me-1"></i>
<p>If you don&rsquo;t know the Laravel framework, start with the article:</p>]]></description><enclosure url="https://mazer.dev/en/laravel/b1-course/framework-laravel-architecture-components/featured-laravel.png" length="30091" type="image/png"/></item><item><title>How to use jQuery and Twitter Bootstrap with Laravel and Vite</title><link>https://mazer.dev/en/laravel/posts/how-to-use-jquery-with-laravel-and-vite/</link><pubDate>Sat, 19 Nov 2022 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/posts/how-to-use-jquery-with-laravel-and-vite/</guid><description><![CDATA[<p>Twitter Bootstrap and jQuery are Html/CSS and JavaScript framework and library still in heavy use in the Laravel community to this day.</p>
<p>It&rsquo;s ease <a href="/en/laravel/posts/how-to-add-bootstrap-jquery-popper-js-to-laravel-mix/">add then with Laravel Mix</a>, but since Laravel v9.2.0 <code>Vite</code> is now the default bundler and a lot of users have had trouble getting it to work.</p>
<p>In this post we will go over how to install, configure, import them and how to use with Laravel 9 and Vite.</p>]]></description><enclosure url="https://mazer.dev/en/laravel/posts/how-to-use-jquery-with-laravel-and-vite/featured-vite.jpg" length="174283" type="image/jpeg"/></item><item><title>How to add Bootstrap, jQuery, and popper.js to Laravel project using laravel-mix</title><link>https://mazer.dev/en/laravel/posts/how-to-add-bootstrap-jquery-popper-js-to-laravel-mix/</link><pubDate>Wed, 16 Nov 2022 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/posts/how-to-add-bootstrap-jquery-popper-js-to-laravel-mix/</guid><description><![CDATA[<p>I had a lot of problems with using <code>laravel/ui</code> to install and then use the last updated versions of packages Twitter Bootstrap, jQuery and Popper.js. Since, for example, the Bootstrap version <code>laravel ui</code> installs is outdated, for example on Laravel 8 it is only version 4.6, and the newest version is, as of today: 5.2.2 <a href="https://github.com/twbs/bootstrap/releases" target="_blank" rel="noopener noreferrer">Bootstrap releases<i class="fas fa-external-link-square-alt ms-1"></i></a>, so i decided to try install the packages by myself using <code>laravel mix</code>.</p>]]></description><enclosure url="https://mazer.dev/en/laravel/posts/how-to-add-bootstrap-jquery-popper-js-to-laravel-mix/laravel-mix-featured.webp" length="4340" type="image/webp"/></item><item><title>How to find the php.ini file used by the command line?</title><link>https://mazer.dev/en/php/posts/how-to-find-the-php-ini-file-used-by-the-command-line/</link><pubDate>Tue, 15 Nov 2022 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/how-to-find-the-php-ini-file-used-by-the-command-line/</guid><description><![CDATA[<p>There are a few ways to locate <code>php.ini</code> file by command line on Linux Ubuntu, Linux Mint, and other Linux distributions. Some of the options showed here are also compatible with Windows, specially usin WSL.</p>

<h2 id="what-is-phpini" data-numberify>What is php.ini<a class="anchor ms-1" href="#what-is-phpini"></a></h2>
<p>The <code>php.ini</code> file is the configuration file that is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI versions, it happens on every invocation.</p>]]></description><enclosure url="https://mazer.dev/en/php/posts/how-to-find-the-php-ini-file-used-by-the-command-line/php-ini-featured.webp" length="15712" type="image/webp"/></item><item><title>How to increase Laravel session lifetime</title><link>https://mazer.dev/en/laravel/posts/how-to-increase-laravel-session-lifetime/</link><pubDate>Wed, 09 Nov 2022 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/posts/how-to-increase-laravel-session-lifetime/</guid><description><![CDATA[<p>A session is a way to store information (in variables) to be used across multiple HTTP Requests, to simulate a &ldquo;state&rdquo; across pages navigation.</p>
<p>Laravel ships with a variety of session backends managers that are accessed through an expressive, unified API. Support for popular backends such as Memcached, Redis, and databases is included.</p>
<p>As far as session timeout is concerned, you can increase the session lifetime in Laravel by making some adjustments in the <code>session.php</code> file.</p>]]></description><enclosure url="https://mazer.dev/en/laravel/posts/how-to-increase-laravel-session-lifetime/featured-laravel-session-lifetime.webp" length="160962" type="image/webp"/></item><item><title>How to change PHP session timeout</title><link>https://mazer.dev/en/php/posts/how-to-change-php-session-timeout/</link><pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/php/posts/how-to-change-php-session-timeout/</guid><description><![CDATA[<p>A session is a way to store information (in variables) to be used across multiple HTTP Requests, to simulate a &ldquo;state&rdquo; across pages navigation.</p>
<p>Unlike a cookie, the information is not stored on the end users computer but in the application server.</p>
<p>For security reasons, sessions has a time limit to exist than they expire. PHP has a default timeout session limit and sometimes it is not the timeout your application needs. In this post we gonna learn how to change the PHP Session Timeout.</p>]]></description><enclosure url="https://mazer.dev/en/php/posts/how-to-change-php-session-timeout/featured-php-session-timeout.webp" length="61040" type="image/webp"/></item><item><title>Good practices to write clean code</title><link>https://mazer.dev/en/software-engineering/clean-code/boas-praticas/</link><pubDate>Sat, 02 Jul 2022 22:13:38 +0000</pubDate><guid>https://mazer.dev/en/software-engineering/clean-code/boas-praticas/</guid><description><![CDATA[<p>In this article I present tips for developing software, writing with good clean code practices, which generally means writing more readable code blocks in some more fluid and well -structured contexts.</p>
<p>There is a mistake on the part of junior -level developers that the &ldquo;concept&rdquo; of clean code almost translates into writing less code. In my experience, in addition to theoretical readings, a clean code is a code that follows good programming practices, standardization, which make it readable to other developers, or even to you in future maintenance.</p>]]></description></item><item><title>How to solve “COMPOSER_AUTH” does not match the expected JSON schema no Laradock</title><link>https://mazer.dev/en/docker/laradock/troubleshooting/how-solve-composer_auth-does-not-match-the-expected-json-schema/</link><pubDate>Sat, 18 Jun 2022 17:42:58 +0000</pubDate><guid>https://mazer.dev/en/docker/laradock/troubleshooting/how-solve-composer_auth-does-not-match-the-expected-json-schema/</guid><description><![CDATA[<p>When using <a href="/laradock-instalacao-e-configuracao/">Laradock</a>, by accessing the container <code>Workspace</code> I have sometimes received the following error when trying to execute PHP <code>composer</code>:</p>
<pre tabindex="0"><code class="language-bash"" data-lang="bash"">COMPOSER_AUTH&#34; does not match the expected JSON schema, this may result in errors and should be resolved:  
   - Boolean value found, but an object is required  
</code></pre><p>According to <a href="https://github.com/laradock/laradock/issues/3189" target="_blank" rel="noreferrer noopener">this issue</a>of Laradock project, the problem has being solves, but if you still come across it, there is a simple way to get around until you update your containers.</p>]]></description></item><item><title>How to fill the file upload input field with old data, in PHP and Laravel</title><link>https://mazer.dev/en/laravel/posts/how-fill-file-upload-input-field-with-old-data-php-laravel/</link><pubDate>Sat, 04 Dec 2021 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/laravel/posts/how-fill-file-upload-input-field-with-old-data-php-laravel/</guid><description>&lt;p>After validating data entry forms, which return to the user with information from the errors that should be corrected, the best practice is to fill the fields with the last (old) values, but is not possible to apply this techinique to upload field files, both in Laravel PHP and in any other language.&lt;/p>
&lt;p>This is a browse safety measure to avoid malicious programs to try to fool the user by forcing them to upload files with sensitive data.&lt;/p></description><enclosure url="https://mazer.dev/en/laravel/posts/how-fill-file-upload-input-field-with-old-data-php-laravel/featured-image-upload-scaled.webp" length="70246" type="image/webp"/></item><item><title>Laradock, Installation and Configuration</title><link>https://mazer.dev/en/docker/laradock/installation-and-configuration/</link><pubDate>Fri, 03 Sep 2021 19:43:07 +0000</pubDate><guid>https://mazer.dev/en/docker/laradock/installation-and-configuration/</guid><description><![CDATA[<p>Learn now how to install and configure Laradock, which is, as presented in the <a href="/en/docker/introduction/how-to-install-docker-and-docker-compose-on-linux-ubuntu-mint-debian/">Introductory Article</a>, a project for quick and simple configuration of PHP Web Systems Development Environments using Docker.</p>
<p>In this tutorial article, we will see more in detail how to install and configure a Laradock environment <s> to work by PHP project, that is, an installation for each project </s>. Or how to use an installation for multiple projects.</p>]]></description><enclosure url="https://mazer.dev/en/docker/laradock/installation-and-configuration/featured-laradock-laravel-docker.webp" length="28518" type="image/webp"/></item><item><title>Open data repositories for developers</title><link>https://mazer.dev/en/blog/posts/open-data-repositories-for-developers/</link><pubDate>Thu, 02 Sep 2021 00:00:00 +0000</pubDate><guid>https://mazer.dev/en/blog/posts/open-data-repositories-for-developers/</guid><description><![CDATA[<h2 id="awesome-data-table-references" data-numberify>Awesome Data Table References<a class="anchor ms-1" href="#awesome-data-table-references"></a></h2>
<p>Awesome Data Table References is a repository of my responsibility, where I curate references to open data tables from Brazilian and world institutions.</p>
<p>Whenever it is necessary to create a field of choice of municipalities, Brazilian states, search for zip code, identification by race or color, developers find themselves by building this data manually, often with various codes of base registration tables.</p>
<p>Currently the repository provides data files to download in original CSV, XLS, SDG, XML or JSON versions.</p>]]></description><enclosure url="https://mazer.dev/en/blog/posts/open-data-repositories-for-developers/featured-dados-brasil.webp" length="117522" type="image/webp"/></item><item><title>Laradock – Containers Docker for your PHP and Laravel Projects - Introduction</title><link>https://mazer.dev/en/docker/laradock/introduction-containers-docker-php-laravel/</link><pubDate>Tue, 31 Aug 2021 00:50:46 +0000</pubDate><guid>https://mazer.dev/en/docker/laradock/introduction-containers-docker-php-laravel/</guid><description><![CDATA[<p>Laradock is a complete web development environment for Docker, which was born to meet the development of Laravel systems and currently provides containers for various situations for PHP development.</p>
<p>It supports a variety of common services, all pre-configured to provide a PHP development environment, [Laravel]({&lt;Relref &ldquo;Laravel&rdquo;&gt;}}), WordPress, Joomla, Drupal, Cakephp, among others, and totally ready to up and ease use.</p>
<p>In this introductory article you will have an overview of the project, the features of Laradock, and a quick configuration explanation.
To go further with it&rsquo;s use and settings read the tutorials accessible by the section menu.</p>]]></description><enclosure url="https://mazer.dev/en/docker/laradock/introduction-containers-docker-php-laravel/featured-laradock.webp" length="6444" type="image/webp"/></item><item><title>Routing in Laravel does not work</title><link>https://mazer.dev/en/laravel/troubleshooting/rounting-laravel-does-not-working/</link><pubDate>Sat, 14 Aug 2021 00:12:45 +0000</pubDate><guid>https://mazer.dev/en/laravel/troubleshooting/rounting-laravel-does-not-working/</guid><description><![CDATA[<p>This article deals with the Laravel routing not to working in new projects, taking into account a very specific context, when you have new Apache server installations.</p>

<h2 id="problem-script" data-numberify>Problem script<a class="anchor ms-1" href="#problem-script"></a></h2>
<p>At some point you will start a new project with the newly installed project with the Laravel Framework, after running the standard command to create a new composer project:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">composer create-project laravel/laravel &lt;nome-do-projeto&gt; --prefer-dist
</span></span></code></pre></div><p>All dependencies downloaded and loaded by the compose, hosted permissions on the <code>storage</code> and <code>bootstrap/cache</code> folders, so to start the work you enter a test route and a checking controller, and here&rsquo;s the error <strong>404 (File Not Found)</strong> is returned.</p>]]></description><enclosure url="https://mazer.dev/en/laravel/troubleshooting/rounting-laravel-does-not-working/featured-laravel-route.webp" length="9678" type="image/webp"/></item><item><title>Return link to the previous URL in Laravel</title><link>https://mazer.dev/en/laravel/posts/return-link-to-the-previous-url-in-laravel/</link><pubDate>Mon, 02 Aug 2021 23:01:34 +0000</pubDate><guid>https://mazer.dev/en/laravel/posts/return-link-to-the-previous-url-in-laravel/</guid><description><![CDATA[<p>At sometimes your application or website developed with
<a href="/en/laravel/b1-course/laravel-framework-what-is/">Laravel Framework</a>, there is a need to, via a
&ldquo;link&rdquo;, allow user to return to the URL- Page or route, previously called.</p>
<p>This is commonly necessary when showing a HTTP 404 error message screen - Page Not Found, or 403 - Forbidden (unauthorized).</p>
<p>However, it is not always interesting to set up this link through the <em><a href="https://developer.mozilla.org/pt-BR/docs/Web/API/History" target="_blank" rel="noreferrer noopener">History</a></em> browser navigation, which can be achieved by the <em>Back</em> method in JavaScript.</p>]]></description></item><item><title>What's New in Laravel Version 8 Release</title><link>https://mazer.dev/en/blog/news/novidades-laravel-versao-8/</link><pubDate>Tue, 08 Sep 2020 22:38:51 +0000</pubDate><guid>https://mazer.dev/en/blog/news/novidades-laravel-versao-8/</guid><description><![CDATA[<p><a href="https://laravel.com" target="_blank" rel="noopener noreferrer">Laravel<i class="fas fa-external-link-square-alt ms-1"></i></a> 8 has been released and includes many new features such as <strong>Laravel Jetstream</strong>,
a unique directory for <em>models</em>, model factory classes, migration <em>squashing</em>, improvements to quota
limitations (<em>rate-limit)</em>, <em>helpers</em> for testing dates and <em>time</em>, dynamic blade components, and many other features.</p>
<p>Before we continue the article with the new features of version 8, remember that starting from version 6,
Laravel follows SemVer (Semantic Version) and releases a new major version every six months.</p>]]></description><enclosure url="https://mazer.dev/en/blog/news/novidades-laravel-versao-8/featured-laravel-logo.png" length="8776" type="image/png"/></item></channel></rss>