Laravel/Mongo Not updating integer key in database

I have this code in my old version of jenssegers / mongodb

$employee = Employee::findById($user_id, true);
$employee->{'38'} = 'Php';
$employee->save();

And was updating fine,
But now i have upgraded to the latest versions laravel-mongodb with php8.3 and Lumen 10
This code is not working insted it update the 0 index of record.
How to solve this problem. please suggest as i have a big database with numeric keys.
However i have tried these solutions

$employee['38'] = 'Php';
$employee->setAttribute('38', 'Php');

but nothing worked.

PSR-4 autoloading error when installing Laravel bagisto-delivery-time-slot package manually

I’m trying to install a custom Laravel package locally by placing it inside the packages/ directory of my Laravel project.

Here’s what I’ve done so far:

I added the package to packages/Webkul/DeliveryTimeSlot

Updated my main composer.json file with the PSR-4 autoload configuration:

"autoload": {
"psr-4": {
    "App\": "app/",
    "Webkul\DeliveryTimeSlot\": "packages/Webkul/DeliveryTimeSlot/src/"
} }

After running:

composer dump-autoload

I receive the following warning:

Class CreateDeliveryTimeSlotsTable located in ./packages/Webkul/DeliveryTimeSlot/src/Database/Migrations/2020_01_27_001254_create_delivery_time_slots_table.php does not comply with psr-4 autoloading standard (rule: WebkulDeliveryTimeSlot => ./packages/Webkul/DeliveryTimeSlot/src). Skipping.

Class CreateDeliveryTimeSlotsOrdersTable located in ./packages/Webkul/DeliveryTimeSlot/src/Database/Migrations/2020_01_30_001255_create_delivery_time_slots_orders_table.php does not comply with psr-4 autoloading standard (rule: WebkulDeliveryTimeSlot => ./packages/Webkul/DeliveryTimeSlot/src). Skipping.

Here’s the relevant directory structure:

packages/
└── Webkul/
    └── DeliveryTimeSlot/
        └── src/
            └── Database/
                └── Migrations/
                    ├── 2020_01_27_001254_create_delivery_time_slots_table.php
                    └── 2020_01_30_001255_create_delivery_time_slots_orders_table.php

It looks like the issue is with PSR-4 autoloading for the migration classes. Do I need to define namespaces in those migration files? If so, what should the correct namespace be?

Thanks in advance for your help!

Laravel Reverb does not get Events from the worker

when using in Production, my reverb server wont get any events from my queue worker, the client connection is successfull and ping pong is working, but when i fire an event, the reverb server wont recognice it.

My nginx config:

map $http_upgrade $type {
    default "web";
}

server {
    listen 80;
    listen [::]:80;
    server_name mypage.de;

    location /.well-known/acme-challenge/ {
        root /var/www/letsencrypt;
    }

    return 301 $host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name mypage.de;

    ssl_certificate /etc/letsencrypt/live/mypage.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mypage.de/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/mypage.de/chain.pem;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305";
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 1h;

    root /var/www/mypage/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    index index.php;
    charset utf-8;

    location / {
        try_files /nonexistent @$type;
    }

    location @web {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location /app {
        proxy_http_version 1.1;
        proxy_set_header Host $http_host;
        proxy_set_header Scheme $scheme;
        proxy_set_header SERVER_PORT $server_port;
        proxy_set_header REMOTE_ADDR $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_read_timeout 180;
        proxy_send_timeout 180;

        proxy_pass 127.0.0.1:6001;
    }

    location /apps {
        proxy_http_version 1.1;
        proxy_set_header Host $http_host;
        proxy_set_header Scheme $scheme;
        proxy_set_header SERVER_PORT $server_port;
        proxy_set_header REMOTE_ADDR $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";

        proxy_pass 127.0.0.1:6001;
    }

    location = /favicon.ico {
        access_log off; log_not_found off;
    }
    location = /robots.txt {
        access_log off; log_not_found off;
    }

    error_page 404 /index.php;

    location ~ ^/index.php(/|$) {
        try_files $uri /index.php =404;
        fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_hide_header X-Powered-By;
    }

    location ~ /.(?!well-known).* {
        deny all;
    }
}

my .env:

REVERB_APP_ID=xxxx
REVERB_APP_KEY=xxxx
REVERB_APP_SECRET=xxxx
REVERB_HOST="mypage.de"
REVERB_PORT=443
REVERB_SCHEME=https

REVERB_SERVER_HOST=127.0.0.1
REVERB_SERVER_PORT=6001

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

On the local dev env everything works fine, events get send to the client and the client js gets executed, on production the worker logs that the event is fired but in the reverb log nothing appears.

ElasticSearch without response data in PHP

This is my mapping:

$ curl -X GET -k -u elastic:elastic “http://127.0.0.1:9200/_mapping”

{"photobank":{"mappings":{"properties":{"id":{"type":"long"},"title":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}
I inserted test data like title: “aaa” and “bbb”.
But when I search I heva no response from ES:

$params = [
                    'index' => 'photobank',
                    'body'  => [
                        'query' => [
                            /*'match' => [
                                'title' => 'aaa'
                            ],*/
                            'bool' => [
                                'must' => [
                                    'match' => [
                                        'title' => 'aaa'
                                    ]
                                ],
                            ]
                        ]
                    ],
                ];
$response = $client->search($params);

$response has status 200 but nothing more. Where are result data or is my query wrong?

woocommerce wordpress logout issue

I am using storefront theme, WordPress, WooCommerce plugin.
I have been logged out again n again in 5secs
checked all
both site urls which are same,
Clearing browser cache,
activating/deact plugin themes child theme altogether and also one by one, tested page for cache giving proper count in incremental, changing to 2025 theme from storefront,cleared session from database.Nothing is working it still logs out

Force session cookie and path fix
In wp-config.php, 

define('COOKIE_DOMAIN', 'www.domain.com');
define('COOKIEPATH', '/');
define('SITECOOKIEPATH', '/');
define('ADMIN_COOKIE_PATH', '/wp-admin');
define('PLUGINS_COOKIE_PATH', '/wp-content/plugins');
define('FORCE_SSL_ADMIN', true);
already tried clearing sessions and custom paths

Laravel API in docker is returning HTML instead of JSON?

I’m dockerzing my Laravel API and going quite crazy.

Locally with either php artisan serve or symfony serve everything works well and has been working for years.

Now I’m finally dockerzing (not an expert in Docker) Laravel for production and having some problems.

The main one is that all the api routes return text/html as content type and not application/json, but locally it returns application/json.

The code base obviously is the same one. And the return of each api route is like this response()->json($data);

This is my dockerfile and it’s being used in a docker-compose file. Anyone has any idea why?

FROM php:8.3-fpm-alpine3.20
 
RUN apk update && apk upgrade
 
# Essentials
RUN echo "Europe/London" > /etc/timezone
RUN apk add git zip unzip curl sqlite supervisor
 
# Install Python
RUN apk add python3 py3-pip
 
RUN apk add nodejs npm
RUN apk add nano
 
RUN apk add php83-gd 
    php83-imap 
    php83-redis 
    php83-cgi 
    php83-bcmath 
    php83-mysqli 
    php83-zlib 
    php83-curl 
    php83-zip 
    php83-mbstring 
    php83-iconv 
    gmp-dev
 
# dependencies required for running "phpize"
# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
ENV PHPIZE_DEPS 
    autoconf 
    dpkg-dev 
    dpkg 
    file 
    g++ 
    gcc 
    libc-dev 
    make 
    pkgconf 
    re2c 
    zlib 
    wget
 
# Install packages
RUN set -eux; 
    # Packages needed only for build
    apk add --virtual .build-deps 
    $PHPIZE_DEPS
 
RUN apk add --no-cache linux-headers
 
# Packages to install
RUN apk add  curl 
    gettext-dev 
    libmcrypt-dev 
    icu-dev 
    libpng 
    libpng-dev 
    libressl-dev 
    libtool 
    libxml2-dev 
    libzip-dev 
    libjpeg-turbo-dev 
    libwebp-dev 
    freetype-dev 
    oniguruma-dev 
    unzip 
 
# pecl PHP extensions
RUN pecl install 
    # imagick-3.4.4 
    mongodb 
    redis
# Configure PHP extensions
RUN docker-php-ext-configure 
    # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296
    gd --enable-gd --with-freetype --with-jpeg --with-webp
# Install PHP extensions
RUN  docker-php-ext-install 
    bcmath 
    bz2 
    exif 
    ftp 
    gettext 
    gd 
    # iconv 
    intl 
    gmp 
    mbstring 
    opcache 
    pdo 
    pdo_mysql 
    shmop 
    sockets 
    sysvmsg 
    sysvsem 
    sysvshm 
    zip 
    && 
    # Enable PHP extensions
    docker-php-ext-enable 
    # imagick 
    mongodb 
    redis 
    && 
    # Remove the build deps
    apk del .build-deps
RUN apk cache clean 
# fix work iconv library with alphine for PHP 8.1 broken
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so
# # Installing bash
# RUN apk add bash
# RUN sed -i 's/bin/ash/bin/bash/g' /etc/passwd
 
# Installing composer
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN rm -rf composer-setup.php
 
# Configure supervisor
RUN mkdir -p /etc/supervisord/conf.d/
RUN touch /run/supervisord.sock
COPY ./docker-ops/backend/supervisord/laravel-worker.conf /etc/supervisord/conf.d/laravel-worker.conf
COPY ./docker-ops/backend/supervisord/supervisord.ini /etc/supervisord/supervisord.ini
 
# Cron Config
COPY ./docker-ops/backend/crontab /etc/crontabs/root
 
# Config PHP
COPY ./docker-ops/backend/php/local.ini /usr/local/etc/php/php.ini
# COPY ./ /var/www
COPY --chown=www-data:www-data ./my-app /var/www
COPY ./docker-ops/backend/scripts.env /var/www/resources/scripts/.env
COPY ./docker-ops/backend/.env.laravel /var/www/.env
 
 
# Install Python packages
ENV PIP_BREAK_SYSTEM_PACKAGES 1
RUN pip install -r /var/www/resources/scripts/requirements.txt
 
 
USER root
WORKDIR /var/www
 
EXPOSE 8000
 
CMD ["php", "artisan", "serve", "--host", "0.0.0.0", "--port=8000"]```

LAMP. When the owner /var/www/site/ -> www-data and group USER1, result: er

LAMP.

  • case 1:
    When the owner of /var/www/site/ -> www-data and group USER1, result: files upload on server from index.php BUT i CAN’T edit from sftp the files on server from USER1. (permission denied)

  • case 2:
    When the owner /var/www/site/ USER1 and group www-data, result: error when files uploads on server from index.php BUT i can edit from sftp the files on server from USER1.

Warning: Undefined array key “id” in C:Program FilesAmppswwwadminindex.php on line 182 [duplicate]

I have a problem, I want to make changes to a certain user’s database table. I managed to do this by opening another page.

<td><a href="includes/update.php?id=<? echo $user['id']?>" class="edit">Edit href</a></td>

The page will open as follows
page code img

But through the modal window, when I try to open the data, I get an error message: Warning: Undefined array key “id” in C:Program FilesAmppswwwadminindex.php on line 182

                <td><button tupe="hidden" name="user_id" onclick="window.myDialog.showModal()" value="<? echo $user['id']?>" class="regbtn">Edit modal</button></td>
            </tr>
            <?
        }
        ?>
        </tbody>
        </table>
                    <div class="left">
                        <dialog id="myDialog" class="modal">
                            <div class="reg-form">
                                <h6>Change the data</h6>
                                <button onclick="closeDialog()">x</button>
                                <script>
                                    var x = document.getElementById("myDialog"); 
                                    function showDialog() { 
                                    x.show(); 
                                    } 
                                    function closeDialog() { 
                                    x.close(); 
                                    } 
                                </script>
                                <form method="POST">
                                    <?
                                        $id = $_GET['id'];
                                        $query = mysqli_query($connect, query: "SELECT * from `users` where ID='$id'");
                                        while($row = mysqli_fetch_array($query)) {
                                    ?>
                                    <div class="reg-box">
                                        <input type="text" value="<? echo $row["lastname"]?>" name="lastname" placeholder="Last Name">
                                    </div>
                                    <div class="reg-box">
                                        <input type="text" value="<? echo $row["name"]?>" name="name" placeholder="Name">
                                    </div>
                                    <div class="reg-box">
                                        <input type="text" value="<? echo $row["fathername"]?>" name="fathername" placeholder="Father Name">
                                    </div>
                                    <div class="reg-box">
                                        <input type="number" value="<? echo $row["code"]?>" name="code" placeholder="Code">
                                    </div>
                                    <div class="reg-box">
                                        <input type="text" value="<? echo $row["username"]?>" name="username" placeholder="Login">
                                    </div>
                                    <div class="reg-box">
                                        <input type="number" value="<? echo $row["password"]?>" name="password" placeholder="Password">
                                    </div>
                                    <? } ?>    
                                    <button tupe="reg" class="btn">Edit</button>
                                </form>
                            </div>
                            <style type="text/css">
                                dialog {
                                    margin-inline: auto;
                                    margin-block-start: 120px;
                                    background: transparent;
                                    box-shadow: 0 0 10px rgba(0, 0, 0, 0.211);
                                    border: none;
                                    border-radius: 1rem;
                                }
                                dialog::backdrop {
                                    background-color: rgba(0, 0, 0, 0.2);
                                }
                            </style>
                        </dialog>
                    </div>
    </div>

Make a Content-Type text/css PHP file automatically update its Last-Modified header like regular stylesheet files do?

When I’m writing CSS code for a webpage, I use a JavaScript plugin which uses Ajax to check whether a CSS file has been edited every second by checking the CSS file’s Last-Modified header. If a CSS file has been edited, the JavaScript plugin forces my browser to reload the CSS file. That’s convenient because it saves my efforts to manually refresh my browser for seeing the applying of my style changes.

The JavaScript plugins works perfectly fine for regular stylesheet files such as style.css. But it does not work for PHP stylesheet file such as style.php. After my investigation, I found that the culprit is style.php lacks the Last-Modified header.

The beginning of my style.php is:

<?php

header('Content-Type: text/css; charset=UTF-8');
header('Cache-Control: max-age=315360000');
header('Expires: Thu, 5 April 2035 00:00:00 GMT');

?>

The Cache-Control and Expires headers are for forcing browsers to cache style.php.

Theoretically, I can solve the issue by adding the fourth header which would be the Last-Modified header, and then manually update the Last-Modified header every time I edited style.php. But practically, that completely defeats the purpose of using the JavaScript plugin.

It also puzzles me that a regular CSS stylesheet such as style.css is able to automatically provide an updated Last-Modified header, while a PHP stylesheet such as style.php fails to do so.

So my question is: Is it possible to make style.php automatically provide an updated Last-Modified header like regular stylesheet files such as style.css does?

Regex : get word with space and specific character except tag

I am trying to write a String substitution to match any character (a word) with a space after and a ? or : or ! but except all tag.

The goal is to retrieve single words that have after them a space and ?, : or ! to encapsulate them in a tag <span style="display:inline-block;">$1</span>

I try :

([S]* [?:!])

An example : demo link

For test1 to test4 it’s good.

For test5 I don’t want to capture it at all

For test6 I want to capture all the line

For test7 I want only test7 ?

For test8 I want only test8 <span>:</span>

For test9 I want to capture all the line

Tags are just examples

How to make a Content-type text/css PHP file cachable and easily force-reloadable? [duplicate]

Let’s say, in style.css, I need to append a query string ?version=2 after the url of a background image for force-reloading:

background-image: url(sprite.svg?version=2#icon-pencil);

Because the background image will be used through out the CSS file, I thought it’s better to turn the query string into a CSS variable var(--sprite-query-string) like the following example. But unfortunately it doesn’t work at all:

background-image: url(sprite.svgvar(--sprite-query-string)#icon-pencil);

Therefore, I have to resort to PHP variable. I turned style.css into a PHP file style.php. The defining of the PHP variable and the stylesheet reference in HTML are like:

<?php

$sprite_query_string = '?version=2';

?>
<link rel="stylesheet" href="style.php?sprite_query_string=<?php echo urlencode($sprite_query_string); ?>">

And then in style.php, I can use the PHP variable as many times as I like:

<?php header('Content-type: text/css; charset=UTF-8'); ?>

.icon-pencil {
    background-image: url(sprite.svg<?php echo $_GET['sprite_query_string']; ?>#icon-pencil);
}

.icon-star {
    background-image: url(sprite.svg<?php echo $_GET['sprite_query_string']; ?>#icon-star);
}

.icon-heart {
    background-image: url(sprite.svg<?php echo $_GET['sprite_query_string']; ?>#icon-heart);
}

But that brings up another issue: style.php cannot be cached by browsers by default.

So my question is: how to make style.php cacheable and also easily force-reloadable? For example, after I added more CSS code into style.php, I want an easy way to force visitors to reload style.php, such as appending a parameter timestamp=20250405 after style.php’s query string:

<link rel="stylesheet" href="style.php?sprite_query_string=<?php echo urlencode($sprite_query_string); ?>&timestamp=20250405">

Undefined array key for every field [duplicate]

just to clarify I’m someone with absolutely no knowledge of PHP prior to this project.

i found this problem on my code and i cant solve i am trying to follow some youtube video and it same that the code is exactly like but still i cant fix it

this the error:

Warning: Undefined array key "first_name" in   
C:xampphtdocsSocial mediaClasssignup_class.php on line 36  
Warning: Undefined array key "first_name" in  
C:xampphtdocsSocial mediaClasssignup_class.php on line 39  
Warning: Undefined array key "last_name" in  
C:xampphtdocsSocial mediaClasssignup_class.php on line 40  
Warning: Undefined array key "gender" in  
C:xampphtdocsSocial mediaClasssignup_class.php on line 41  
Warning: Undefined array key "email" in  
C:xampphtdocsSocial mediaClasssignup_class.php on line 42  
Warning: Undefined array key "password" in 
C:xampphtdocsSocial mediaClasssignup_class.php on line 43  
Fatal error: Uncaught Error: Call to undefined function create_userid() in 
C:xampphtdocsSocialmediaClasssignup_class.php:47  
Stack trace:    
#0 C:xampphtdocsSocial mediaClasssignup_class.php(26):  
Signup->create_user(Array)  
#1 C:xampphtdocsSocial mediasign_up.php(12):  
Signup->evaluate(Array)  
#2 {main} thrown in 
C:xampphtdocsSocial mediaClasssignup_class.php on line 47

my code for that particular error:

this is for the signup page

<form method= "post" action="">
  <input name="first_name" 
    type="text" style="width:300px;height:30px;border-radius:5px;margin-top:40px;margin-left:250px;padding-left:10px" 
    placeholder="First Name">
  <br>
  <input name="last_name" 
    type="text" 
    style="width:300px;height:30px;border-radius:5px;margin-top:20px;margin-left:250px;padding-left:10px;" 
    placeholder="Last Name">
  <br>
  <P style="text-align:center;">
    Gender:
  </P>
  <select name="gender" 
    style="width:300px;height:30px;border-radius:5px;margin-top:5px;margin-left:250px;padding-left:10px;"
    >
    <option value="Male">Male</option>
    <option value="Female">Female</option>
  </select>
  <br>
  <input name="email" 
    type="text" 
    style="width:300px;height:30px;border-radius:5px;margin-top:10px;margin-left:250px;padding-left:10px;" 
    placeholder="Email">
  <br>
  <input name="password" 
    type="password" 
    style="width:300px;height:30px;border-radius:5px;margin-top:20px;margin-left:250px;padding-left:10px;" 
    placeholder="enter Your Password">
  <br>
  <input name="pass2" 
    type="password" 
    style="width:300px;height:30px;border-radius:5px;margin-top:20px;margin-left:250px;padding-left:10px;" 
    placeholder=" Reetyoe Password">
  <br>
  <input 
    type="submit" 
    style="width:300px;height:30px;border-radius:5px;margin-top:20px;margin-left:250px;background-color:#4b5c77;color:white;cursor:pointer;border:none;" 
    value="Sign up">
  <br>
</form>

and this is the class where the error is coming from

public  function create_user($data)
  { // calling the database class to save the data
  $firstname = $data["first_name"];
  $lastname  = $data['last_name'];
  $gender    = $data['gender'];
  $email     = $data['email'];
  $password  = $data['password'];

  // creating a url_adress for the user and the userid
  $url_adress = strtolower($firstname) . strtolower( $lastname);
  $userid     = create_userid();

  $query = "insert into users
         (userid,first_name,last_name,gender,email,password,url_adress)
         values
         ('$userid', '$first_name','$last_name','$gender','$email','$password','$url_adress')";

  include_once("connect.php");
  return $query;
  /*
  $db = new Database();
  $db->save($query);
  */
  }
private function create_userid()
  {
  // creating a random number for the user id
  $length = rand(4,19);
  $number = "";
  for($i=0; $i<$length; $i++)
    {
    $rand_number = rand(0,9);
    $number .= $rand_number;
    return $number;
    }
  }

I have an array and want to compare its values [closed]

Hello I have an array which is structured as follows,

Array
    (
        [0] => ModelBooking Object
            (
                [category_id] => 2
                [booking_date] => 2025-01-28
                [amount] => 248692
                [category] => Lohn/Gehalt
                [category_type] => revenues
            )
    
        [1] => ModelBooking Object
            (
                [category_id] => 3
                [booking_date] => 2025-01-29
                [amount] => 36000
                [category] => Pflegegeld
                [category_type] => revenues
            )
    
    )

I now want to compare Key 0 with Key 1 to see if the category and category type are identical, so I can add up the amount for identical entries.

What’s the best way to do this? I haven’t found a solution yet.

cannot go into admin side of website anymore

i manage a website for a local youth organization and am suddenly not allow to enter the admin page anymore for some reason. i didnt build the website myself, but have taken over from the former person who managed it earlier this year. normally i’d log in to the admin page by simply adding “/admin” after the normal url, but all of a sudden when i do this it gives me an error instead of going to the wordpress login page.
Image of the error

after looking online for a bit i saw that it was probably the .htacces file. i havent changed anything to it so i doubt its the problem, also dont really see anything in there that would lock me out.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

I’ve also tried disabling cache, changing browsers and using incognito mode but none of these worked.

After all of this i asked help from one of my friends who is a bit better with this stuff than me, but for some reason he didnt get the error when he tried it on his pc. So after that i tried doing it on my phone using mobile data, but this also went straight to the error page.

Is it possible that somehow my phone and computer got locked out? how would this happen and can it be fixed?

PHP connect to hidden share network path

I’m trying to connect to a hidden network drive using ftp_connect, but I’m getting an error message when I try ftp_login.
Is this even possible with PHP?
Thank you!

$ftp_server = 'server02.abc.def.com/c$';
$ftp_user = 'abc/name.user';
$ftp_pass = 'userpwd123';

// set up a connection or die
$ftp = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");

// try to login
if (@ftp_login($ftp, $ftp_user, $ftp_pass)) {
echo "Connected as $ftp_user@$ftp_servern";
} else {
 echo "Couldn't connect as $ftp_usern";
}

// close the connection
ftp_close($ftp);