How to make viewforum.php?foo=bar request serve a file instead of a PHP code?

I’m archiving a phpBB forum into flat HTML files, without any PHP code anymore.
I used wget (see How to: Archive a phpBB forum using Wget and preserve styling), and I now have these files:

enter image description here

How to make that Apache will serve example.com/forum/viewforum.php?f=2&start=25 as a file, and not as a request to viewforum.php with a query string? The latter does not work obviously and gives a 404.

I already tried this htaccess with no success:

RemoveHandler .php .phtml .php3
RemoveType .php .phtml .php3
php_flag engine off

Note: this is how I archived the forum:

wget -m -p -np -R "*sid=*,ucp.php*,memberlist.php*,*mode=viewprofile*,*view=print*,viewonline.php*,search.php*,posting.php*" https://forums.example.com

How to display a parent category in a product card

On my site there are product cards with my product. Each product has a category and a subcategory (it functions as Brand> Collection). Using the brands plugin doesn’t work for me.
the display on the product page itself is correct and excellent. (screenshot below). But on the product card, a subcategory is shown that belongs to the product, and I need a parent one. Can someone suggest how to do this?

enter image description here
enter image description here

Wrong image is displayed on browser breakpoints

I wrote a PHP image display function. There is no problem with the function. But I have a problem with breakpoints. On mobile it shows the big picture. I couldn’t understand how to solve the problem.

function imglazy($filen,$altn,$classn) {
    global $imagepath;
    global $cdnsource;
echo '<picture>
<source media="(min-width: 1025px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-fl.webp"
    type="image/webp">
<source media="(max-width: 1024px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-bg.webp"
    type="image/webp">
<source media="(max-width: 768px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-md.webp"
    type="image/webp">
<source media="(max-width: 500px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-sm.webp"
    type="image/webp">

<source media="(min-width: 1025px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-fl.jpg"
    type="image/jpeg">
<source media="(max-width: 1024px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-bg.jpg"
    type="image/jpeg">
<source media="(max-width: 768px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-md.jpg"
    type="image/jpeg">
<source media="(max-width: 500px)"
    data-srcset="'.$cdnsource.$imagepath.$filen.'-sm.jpg"
    type="image/jpeg">
<img
    data-srcset="'.$cdnsource.$imagepath.$filen.'-bg.jpg,
        '.$cdnsource.$imagepath.$filen.'-md.jpg,
        '.$cdnsource.$imagepath.$filen.'-sm.jpg"
    data-src="'.$cdnsource.$imagepath.$filen.'-fl.jpg"
    alt="'.$altn.'"
    class="lazyload '.$classn.'">
</picture>';
}

Connect Office 365 use POP3 – PHP

I have a trouble with Office 365 use POP3 method.

Currenty, I can’t connect to this server:

   outlook.office365.com 
   port:995

This is my code example:

<?php
$host = 'outlook.office365.com';
$port = '995';
$username = 'outlook_mail';
$password ='password';
$mbox = imap_open('{'.$host.':'.$port.'/pop3/ssl/novalidate-cert}', $username, $password);

echo "<h1>Mailboxes</h1>n";
$folders = imap_listmailbox($mbox, "{".$host.":".$port ."}", "*");

if ($folders == false) {
    echo "Call failed<br />n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />n";
    }
}

echo "<h1>Headers in INBOX</h1>n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />n";
    }
}

imap_close($mbox);

If I change port to 993, it’s OK.
Anyone know this problem? Many thanks!

Yii1 CDbHttpSession not working correctly

I used database session storage approach for using my sessions,

And I used this article too: slow-db-session-table

So I created YiiSession table in my db with this script:

 CREATE TABLE YiiSession
 (
  id CHAR(32) PRIMARY KEY,
  expire INTEGER,
  data BLOB,
  KEY expire_idx (expire) USING BTREE
 );

And my config in config/main.php:

'session' => [
    'class' => 'CDbHttpSession',
    'connectionID' => 'db',
    'sessionTableName' => 'YiiSession',
    'timeout' => 3600 * 24 * 30,
    'autoStart' => false,
    'autoCreateSessionTable' => false
],

I stores all user cart info session values as an object like this:

Yii::app()->session[‘user-cart’] = $this->cartInfo;

Issue

There are some issues,

1- Session, after page redirect sometimes no have any value,there is this problem
with using CDbHttpSession and no in session file working approach.

2- Sometimes session stores but unset session not works, and maybe after calling two
more time the method clears sessions it works.

unset(Yii::app()->session[‘user-cart’]);

What is the problem?
I don’t have any problem with working with session file approach, but db session not working correctly in my codes.

Yii version -> 1.1.23

PHP version -> 7.4

Database Problem: “The page isnt working, if the problem continues, contact the site owner.” [closed]

I created a database in phpmyadmin,
I wrote PHP code in connect.php,
I wrote code in signin.html,
I connected them all together.
But still, it does not work.

Here is my signin.html code:

<form method="post" action="connect.php">
<label>First Name...</label>
<input type="text" placeholder="" id="firstName" name="firstName">
<label>Last Name...</label>
<input type="text" placeholder="" id="lastName" name="lastName">
<label>Email</label>
<input type="email" placeholder="" id="email" name="email">
<label>Password...</label>
<input type="password" placeholder="" id="password" name="password">
<label>Comfirm Password...</label>
<input type="password" placeholder="">
<input type="submit" value="Submit" name="btn btn-primary">
</form>

Here is my connect.php code:

    <?php
$firstName = filter_input(INPUT_POST, 'firstName');
$lastName = filter_input(INPUT_POST, 'lastName');
$email = filter_input(INPUT_POST, 'email');
$password = filter_input(INPUT_POST, 'password');
if (!empty($firstName)){
if (!empty($lastName)){
if (!empty($email)){
if (!empty($password)){
$host = "localhost";
$dbusername = "root"; 



$dbpassword = "";
$dbname = "accounts";
// Create connection
$conn = new mysqli ($host, $dbusername, $dbpassword, $dbname);
if (mysqli_connect_error()){
die('Connect Error ('. mysqli_connect_error() .') '
. mysqli_connect_error());
}
else{
$sql = "INSERT INTO registration (firstName, lastName, email, password)
values ('$firstName', '$lastName', '$email', '$password')";
if ($conn->query($sql))}
echo "New record is inserted sucessfully";
}
else{
echo "Error: ".$sql . "<br>". $conn->error;
}
$conn->close();
}
}
else{
echo "Password should not be empty";
die();
}
}
else{
echo "Username should not be empty"
die();
}
?>

I have watched countless of videos of this problem,
but nothing seems to explain the problem.
I know really little about PHP and databases in general.

Thank you for reading through,
I hope you can help.
If you need more information, please contact me.

Next semantic version php (laravel)

Hi I would like to update a semantic version number using php for a three digit system in string form.
An example :

'1.0.0' => function => '1.0.1'
'1.0.12' => function => '1.0.13'

Does anyone know a solution to this problem?
Thanks in advance

Upgrade from Symfony 3.4 to 4 : Errors when upgrading symfony

I try to upgrade my Symfony 3.4 project to Symfony 4. I cleaned my project of all deprecations but now when I want to upgrade, I have theses issues and I don’t know how to do.

COMPOSER_MEMORY_LIMIT=-1 composer update “symfony/*”
–with-all-dependencies Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is
deprecated and some packages will not be available. You should upgrade
to Composer 2. See
https://blog.packagist.com/deprecating-composer-1-support/ Updating
dependencies (including require-dev) Your requirements could not be
resolved to an installable set of packages.

Problem 1
– symfony/options-resolver v6.0.0 requires php >=8.0.2 -> your PHP version (7.2.14) does not satisfy that requirement.
– Conclusion: don’t install symfony/symfony v4.4.35
– Conclusion: don’t install symfony/symfony v4.4.34
– Conclusion: don’t install symfony/symfony v4.4.33
– Conclusion: don’t install symfony/symfony v4.4.32
– Conclusion: don’t install symfony/symfony v4.4.31
– Conclusion: don’t install symfony/symfony v4.4.30
– Conclusion: don’t install symfony/symfony v4.4.29
– Conclusion: don’t install symfony/symfony v4.4.28
– Conclusion: don’t install symfony/symfony v4.4.27
– Conclusion: don’t install symfony/symfony v4.4.26
– Conclusion: don’t install symfony/symfony v4.4.25
– Conclusion: don’t install symfony/symfony v4.4.24
– Conclusion: don’t install symfony/symfony v4.4.23
– Conclusion: don’t install symfony/symfony v4.4.22
– Conclusion: don’t install symfony/symfony v4.4.21
– Conclusion: don’t install symfony/symfony v4.4.20
– Conclusion: don’t install symfony/symfony v4.4.19
– Conclusion: don’t install symfony/symfony v4.4.18
– Conclusion: don’t install symfony/symfony v4.4.17
– Conclusion: don’t install symfony/symfony v4.4.16
– Conclusion: don’t install symfony/symfony v4.4.15
– Conclusion: don’t install symfony/symfony v4.4.14
– Conclusion: don’t install symfony/symfony v4.4.13
– Conclusion: don’t install symfony/symfony v4.4.12
– Conclusion: don’t install symfony/symfony v4.4.11
– Conclusion: don’t install symfony/symfony v4.4.10
– Conclusion: don’t install symfony/symfony v4.4.9
– Conclusion: don’t install symfony/symfony v4.4.8
– Conclusion: don’t install symfony/symfony v4.4.7
– Conclusion: don’t install symfony/symfony v4.4.6
– Conclusion: don’t install symfony/symfony v4.4.5
– Conclusion: don’t install symfony/symfony v4.4.4
– Conclusion: don’t install symfony/symfony v4.4.3
– Conclusion: don’t install symfony/symfony v4.4.2
– Conclusion: don’t install symfony/symfony v4.4.1
– Conclusion: don’t install symfony/symfony v4.4.0
– Conclusion: remove liip/imagine-bundle 2.7.3
– Conclusion: don’t install symfony/symfony v4.3.11
– Conclusion: don’t install symfony/symfony v4.3.10
– Conclusion: don’t install symfony/symfony v4.3.9
– Conclusion: don’t install symfony/symfony v4.3.8
– Conclusion: don’t install symfony/symfony v4.3.7
– Conclusion: don’t install symfony/symfony v4.3.6
– Conclusion: don’t install symfony/symfony v4.3.5
– Conclusion: don’t install symfony/symfony v4.3.4
– Conclusion: don’t install symfony/symfony v4.3.3
– Conclusion: don’t install symfony/symfony v4.3.2
– Conclusion: don’t install symfony/symfony v4.3.1
– Conclusion: don’t install symfony/symfony v4.3.0
– Conclusion: don’t install symfony/symfony v4.2.12
– Conclusion: don’t install symfony/symfony v4.2.11
– Conclusion: don’t install symfony/symfony v4.2.10
– Conclusion: don’t install symfony/symfony v4.2.9
– Conclusion: don’t install symfony/symfony v4.2.8
– Conclusion: don’t install symfony/symfony v4.2.7
– Conclusion: don’t install symfony/symfony v4.2.6
– Conclusion: don’t install symfony/symfony v4.2.5
– Conclusion: don’t install symfony/symfony v4.2.4
– Conclusion: don’t install symfony/symfony v4.2.3
– Conclusion: don’t install symfony/symfony v4.2.2
– Conclusion: don’t install symfony/symfony v4.2.1
– Conclusion: don’t install symfony/symfony v4.2.0
– Conclusion: don’t install symfony/symfony v4.1.13
– Conclusion: don’t install symfony/symfony v4.1.12
– Conclusion: don’t install symfony/symfony v4.1.11
– Conclusion: don’t install symfony/symfony v4.1.10
– Conclusion: don’t install symfony/symfony v4.1.9
– Conclusion: don’t install symfony/symfony v4.1.8
– Conclusion: don’t install symfony/symfony v4.1.7
– Conclusion: don’t install symfony/symfony v4.1.6
– Conclusion: don’t install symfony/symfony v4.1.5
– Conclusion: don’t install symfony/symfony v4.1.4
– Conclusion: don’t install symfony/symfony v4.1.3
– Conclusion: don’t install symfony/symfony v4.1.2
– Conclusion: don’t install symfony/symfony v4.1.1
– Conclusion: don’t install symfony/symfony v4.1.0
– Conclusion: don’t install symfony/symfony v4.0.15
– Conclusion: don’t install symfony/symfony v4.0.14
– Conclusion: don’t install symfony/symfony v4.0.13
– Conclusion: don’t install symfony/symfony v4.0.12
– Conclusion: don’t install symfony/symfony v4.0.11
– Conclusion: don’t install symfony/symfony v4.0.10
– Conclusion: don’t install symfony/symfony v4.0.9
– Conclusion: don’t install symfony/symfony v4.0.8
– Conclusion: don’t install symfony/symfony v4.0.7
– Conclusion: don’t install symfony/symfony v4.0.6
– Conclusion: don’t install symfony/symfony v4.0.5
– Conclusion: don’t install symfony/symfony v4.0.4
– Conclusion: don’t install symfony/symfony v4.0.3
– Conclusion: don’t install symfony/symfony v4.0.2
– Installation request for kriswallsmith/assetic (installed at v1.4.0) -> satisfiable by kriswallsmith/assetic[v1.4.0].
– Installation request for liip/imagine-bundle (installed at 2.7.3, required as ^2.7) -> satisfiable by liip/imagine-bundle[2.7.3].
– Conclusion: don’t install symfony/symfony v4.0.1
– liip/imagine-bundle 2.7.3 requires symfony/options-resolver ^3.4|^4.4|^5.3|^6.0 -> satisfiable by symfony/symfony[v3.4.49, v4.4.0,
v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15, v4.4.16,
v4.4.17, v4.4.18, v4.4.19, v4.4.2, v4.4.20, v4.4.21, v4.4.22, v4.4.23,
v4.4.24, v4.4.25, v4.4.26, v4.4.27, v4.4.28, v4.4.29, v4.4.3, v4.4.30,
v4.4.31, v4.4.32, v4.4.33, v4.4.34, v4.4.35, v4.4.4, v4.4.5, v4.4.6,
v4.4.7, v4.4.8, v4.4.9], symfony/options-resolver[v3.4.0, v3.4.1,
v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16,
v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23,
v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30,
v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37,
v3.4.38, v3.4.39, v3.4.4, v3.4.40, v3.4.41, v3.4.42, v3.4.43, v3.4.44,
v3.4.45, v3.4.46, v3.4.47, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9,
v4.4.0, v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15,
v4.4.16, v4.4.17, v4.4.18, v4.4.19, v4.4.2, v4.4.20, v4.4.25, v4.4.27,
v4.4.3, v4.4.30, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9,
v5.3.0, v5.3.4, v5.3.7, v5.4.0, v6.0.0].
– Can only install one of: symfony/symfony[v4.0.0, v3.4.49].
– don’t install symfony/options-resolver v3.4.0|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.1|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.10|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.11|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.12|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.13|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.14|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.15|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.16|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.17|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.18|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.19|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.2|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.20|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.21|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.22|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.23|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.24|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.25|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.26|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.27|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.28|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.29|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.3|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.30|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.31|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.32|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.33|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.34|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.35|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.36|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.37|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.38|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.39|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.4|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.40|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.41|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.42|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.43|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.44|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.45|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.46|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.47|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.5|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.6|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.7|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.8|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v3.4.9|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.0|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.1|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.10|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.11|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.12|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.13|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.14|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.15|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.16|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.17|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.18|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.19|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.2|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.20|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.25|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.27|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.3|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.30|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.4|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.5|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.6|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.7|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.8|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v4.4.9|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v5.3.0|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v5.3.4|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v5.3.7|don’t install symfony/symfony v4.0.0
– don’t install symfony/options-resolver v5.4.0|don’t install symfony/symfony v4.0.0
– Installation request for symfony/symfony ^4 -> satisfiable by symfony/symfony[v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13,
v4.0.14, v4.0.15, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7,
v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13,
v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9,
v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4,
v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.10,
v4.3.11, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8,
v4.3.9, v4.4.0, v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.14,
v4.4.15, v4.4.16, v4.4.17, v4.4.18, v4.4.19, v4.4.2, v4.4.20, v4.4.21,
v4.4.22, v4.4.23, v4.4.24, v4.4.25, v4.4.26, v4.4.27, v4.4.28,
v4.4.29, v4.4.3, v4.4.30, v4.4.31, v4.4.32, v4.4.33, v4.4.34, v4.4.35,
v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9].

Here is my composer.json :

{
    "name": "beyonds/base",
    "license": "Beyonds",
    "type": "project",
    "autoload": {
        "psr-4": {
            "AppBundle\": "src/AppBundle"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        },
        "files": [
            "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
        ]
    },
    "repositories": [
        {
            "type": "vcs",
            "url":  "[email protected]:alexandre.bru/admin-generator-bundle.git"
        }
    ],
    "require": {
        "php": "^5.5.9|>=7.0.8",
        "algolia/search-bundle": "4.0.0",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/inflector": "^1.4|^2.0",
        "doctrine/orm": "^2.7",
        "excelwebzone/recaptcha-bundle": "^1.5",
        "friendsofsymfony/ckeditor-bundle": "^2",
        "friendsofsymfony/jsrouting-bundle": "^2.2",
        "friendsofsymfony/user-bundle": "~2.0",
        "helios-ag/fm-elfinder-bundle": "^9.3",
        "incenteev/composer-parameter-handler": "^2.0",
        "lexik/translation-bundle": "^4.0",
        "liip/imagine-bundle": "^2.7",
        "nochso/html-compress-twig": "^2.0",
        "sensio/framework-extra-bundle": "^5.4",
        "stof/doctrine-extensions-bundle": "^1.3",
        "symfony/monolog-bundle": "^3.6.0",
        "symfony/polyfill-apcu": "^1.23",
        "symfony/swiftmailer-bundle": "^3.3",
        "symfony/symfony": "^4",
        "thormeier/breadcrumb-bundle": "^2.2",
        "twig/extensions": "^1.2",
        "twig/twig": "^1.0||^2.0",
        "vich/uploader-bundle": "^1.4"
    },
    "require-dev": {
        "beyonds/cms-generator-bundle": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "^3.4",
        "symfony/phpunit-bridge": "^6.0"
    },
    "scripts": {
        "symfony-scripts": [
            "Incenteev\ParameterHandler\ScriptHandler::buildParameters"
        ],
        "post-install-cmd": [
            "@symfony-scripts"
        ],
        "post-update-cmd": [
            "@symfony-scripts"
        ]
    },
    "config": {
        "sort-packages": true,
        "component-dir": "web/assets"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": null,
        "symfony": {
            "allow-contrib": "true"
        }
    }
}

unable to connect codeigniter to firebase.how to do the configuration and write the model to insert and update data?

** this is my config/firebase.php file**
<?php

class firebase{

    
    public function  __construct($config = array())
    {
       
        
        $config['firebase_app_key'] = __DIR__ . '/../config/gfgh-6bbd-firebase-adminsdk-fivu8-11536116hw5.json';
    }

}
?>
   
**this is my model**

<?php
require '/vendor/autoload.php';
use KreaitFirebaseFactory;

class Login_model extends CI_Model
{

    public function __construct()
    {
        parent::__construct();
        $factory = (new Factory())
        ->withServiceAccount('gfgh-6bbd-firebase-adminsdk-fivu8-11536116hw5.json')
        ->createFirestore();
        $this->db = $factory->database();
    }

function get_data()
    {
        $document = $this->db->get();
        return $document;
    }
}

** i want to insert and update data in firebase **

i am gettingthis error- Your C:xampphtdocssolverapplicationconfig/firebase.php file does not appear to contain a valid configuration array.

Web Push Panel Post URL Redirection

I do not know much about coding, but recently I got a self-hosted web-push panel made for my website by a developer, he also gave a plugin for my WordPress website. The admin panel works fine, there is something wrong with it, maybe he didn’t fix it on purpose

Like when I send a notification of a post from my WordPress website, the notification goes but when the subscriber clicks on that post, it gets redirected to a different URL when I checked the files of the panel, I found a file called link.php

There is a code in that file in which that Redirect URL is set as if I set that URL to google.com, then after clicking on my post, the user landed on google.com and not on my post and the developer did the same With many things, I was given a script like unlimited subscribers, but the notification goes to only 10k people.

Now I am not having any contact with that developer so how can I fix this redirection problem please give any suggestion

link.php code

<?php

const BASE_PATH = __DIR__;
require_once BASE_PATH.'/system/init.php';

$linkId = (isset($_GET['linkId']) && !empty(trim($_GET['linkId'])))? SQLSecure(base64_decode($_GET['linkId'])) : '0';

$linkQuery = $DB->query("SELECT * FROM `links` WHERE `id`='{$linkId}'");
if($linkQuery->num_rows > 0){
    $LinkData = $linkQuery->fetch_assoc();
    $DB->query("UPDATE `links` SET `clicks`=`clicks`+1 WHERE `id` = '{$LinkData['id']}'");
    redirect($LinkData['full_link']);
}
redirect('https://google.com');

?> 

the other file code, mentioned in the link.php file system/init.php

<?php

ini_set('max_execution_time', 0);
ini_set('session.cookie_httponly',1);
ini_set('session.use_only_cookies',1);
ini_set('session.cookie_secure', 1);
ini_set('session.cookie_samesite', 'Strict');
session_start();

require_once BASE_PATH.'/config.php';
require_once __DIR__.'/core/database.php';
require_once __DIR__.'/core/functions.php';
require_once __DIR__.'/core/app-start.php';  

How can i get the data from database which is stored as md5 file using php

so i have been trying for a while to get the data which is password in my database which i stored using md5 function.Now what i am trying to do is,i am asking user to enter id and password then if they click the button i send that data to function.

I also change the user’s input as a md5 file to match the one in the database if it is true.

For example if user entered “hello” as password i change it with md5 file using $abc = md5($aramasonucu2);

However i can’t make this happen for some reason and would really appriciate some help.

  function func1()
                {

                    $servername = "127.0.0.1";
                    $username = "root";
                    $password="";
                    $database = "customer_list";
                    $port = 3306;
                    $con = mysqli_connect($servername,$username,$password, $database, $port);

                    $aramasonucu = $_POST['uname'];
                    $aramasonucu2 = $_POST['psw']; //user input as password
                    $abc =  md5($aramasonucu2); //user input translated to md5


                    $sql="SELECT * FROM customer_list WHERE ad_soyad  LIKE '%$aramasonucu%' AND  sifre = '$abc'";
                    $result=$con->query($sql);


                    if ($abc="ab4b5f7503")
                    {


                        ?>
                        <html>
                        <head>
                            <style>
                                table {
                                  border-collapse: collapse;
                                  width: 180%;
                              }

                              th, td {
                                  padding: 12px;
                                  text-align: left;
                                  border-bottom: 2px solid #DDD;
                              }

                              tr:hover {background-color: lightblue;}
                          </style>
                      </head>



                      <?php



                      if($row=$result->fetch_assoc())
                      {
                        echo "<table>";
                        echo "<tr>";
                        echo "<th>Ad ve Soyad</th>";  
                        echo "<th>Telefon</th>";
                        echo "<th>E-Posta</th>";
                        echo "<th>Cari Kart Kodu</th>";
                        echo "<th>Olusturma Tarihi</th>";
                        echo "<th>Guncelleme Tarihi</th>";
                        echo "</tr>";
                        echo "<tr>";
                        echo "<td> $row[ad_soyad]</td>";
                        echo "<td> $row[telefon]</td>";
                        echo "<td> $row[e_posta]</td>";
                        echo "<td> $row[cari_kart_kodu]</td>";
                        echo "<td> $row[olusturma_tarihi]</td>";
                        echo "<td> $row[guncelleme_tarihi]</td>";
                        echo "</tr>";


                    }  

                    else 
                    {
                        echo "Wrong Password!";
                    }  

                }
            }

How to add fields to Blog Page/index.php by Carbon Fields

I am trying to add fields to Blog Page/index.php by Carbon Fields but its not working

carbon.php

Container::make( 'post_meta', __( 'Blog Page Settings','carbon' ) )
        ->where( 'post_template', '=', 'index.php' )

        ->add_tab( __( 'Page Header Section','carbon' ), array(
            Field::make( 'text', 'blog_page_header_title', __( 'Title','carbon' ) )->set_width( 100 ),
            Field::make( 'text', 'blog_page_header_sub_title', __( 'Sub Title','carbon' ) )->set_width( 100 ),
        ) );

index.php

<h4><?php echo esc_html(carbon_get_the_post_meta('blog_page_header_title')); ?></h4>
<h1><?php echo esc_html(carbon_get_the_post_meta('blog_page_header_sub_title')); ?></h1>

Edit Excel Cells then download it with keeping the sheet styles

I have an Excel file that is stored in my server with some Dynamic Data. I want to Edit the Data in The Sheet then Download the Excel with Keeping the sheet format .
I am Already Editing the Data in Excel but I can’t keep the original style of the Sheet.
i am using maatwebsite/excel package with Laravel 8.

my controller code:

        public function generateArtisanalFile(Request $request){
                $lins=new ArtisanalImport();
                $data= Excel::import($lins,public_path('storage/delivered/CI-model.xlsx'));

                $export = new AsrisanalFileGenerator($lins->data);
                return Excel::download($export, 'model.xlsx');
}

The Import Class :

class ArtisanalImport implements ToCollection
  {

    public $data;

    public function collection(Collection $rows)
    {
       $rows[7][1]='karim El Hajjami';
       $rows[3][0]='Delivered';
       $this->data=$rows;
 
     }
   }

this is the Export Class:

class AsrisanalFileGenerator implements FromCollection
 {
   public $data;

   public function __construct($data){
    $this->data=$data;
  
   }

   public function collection()
   {
      return $this->data;
   }

 }