October 22, 2024
Chicago 12, Melborne City, USA
PHP

How to password protect a directory that contains an OpenCart shop

I have installed OpenCart in a folder on a hosted server. The reason why it’s in a folder and not the root, is that I only want people who login to have access to the shop and stay logged in while shopping. This has nothing to do with logging into OpenCart as they would have

Read More
PHP

PHP cURL OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054

I’m trying to run the PHP cURL request example of an API from a Windows/IIS web server Here is the code: <?php $curl = curl_init(); curl_setopt($curl, CURLOPT_SSLCERT, 'C:\...\cacert.pem'); curl_setopt($curl, CURLOPT_VERBOSE, true); $streamVerboseHandle = fopen('php://temp', 'w+'); curl_setopt($curl, CURLOPT_STDERR, $streamVerboseHandle); curl_setopt_array($curl, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30,

Read More
PHP

srmklive/paypal AUTHORIZE Order with platform_fee in 2024

I need to setup paypal orders for a upcoming marketplace website (buyers, merchants and me the platform), but i fail to implement the platform_fee. Internet searches lead me to some paypal marketplace api that I cannot find in my sandbox dev account. The payment goes from buyer to merchant without deducting the platform_fee. I read

Read More
PHP

“Notice: Undefined variable”, “Notice: Undefined index”, “Warning: Undefined array key”, and “Notice: Undefined offset” using PHP

When I run it in browser it says Access Denied for user root, but when I checked it out, all the privileges were on for root user, it also gives a warning as: Undefined variable $pdo I don’t know why I have defined in $pdo but in a separated page, and the a used the

Read More
PHP

How to get files on root folder drive PHP MS Graph SDK

It can be easy question but the documentation is not clear or has a bug. When you want to get files from known folder, this is the way: GET /drives/{drive-id}/items/{item-id}/children <?php use Microsoft\Graph\GraphServiceClient; $graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes); $result = $graphServiceClient->drives()->byDriveId('drive-id')->items()->byDriveItemId('driveItem-id')->children()->get()->wait(); you have a DriveId and DriveItemdId, and then you ask files… But if you

Read More
PHP

IPC server error in the MadelineProto PHP library

I am using Madeline Proto in the CodeIgniter 3 framework. Library link: https://github.com/danog/MadelineProto I log in with more than 30 Telegram accounts, and for each account, I create a separate folder to store the session. Additionally, I generate individual log files for each account, but a general log file called madelineproto.log is automatically saved in

Read More
PHP

Render form fields in own BE module with TYPO3 FormEngine

Thanks to the power of TCA and FormEngine, it’s no problem to have complex forms with enriched form fields (to enter dates, select links or records, use richtext editors etc.) rendered in the backend. So we know that the TYPO3 backend can do that. It therefore seems obvious to use the same capabilities to render

Read More
PHP

how to pull data from gitlab with php script in laravel?

I create new project in gitlab. I upload my project in host, I need get last update form gitlab with function in laravel. My function: function execPrint($command = "git pull user:pass@gitlab.com/myProject.git") { $result = array(); exec($command, $result); print("<pre>"); foreach ($result as $line) { print($line . "\n"); } print("</pre>"); } After run this function: ssh: Could

Read More
PHP

Azure WAF is blocking URL with .php

We are using own cloud for cloud storage, whenever we upload file to own cloud, we are facing issues in WAF Detection which ever url has .php in it, the url is getting blocked from azure. From azure we are getting error message "Method is not allowed by policy" I had tried to give user

Read More
PHP

How to read code from Azure Blob storage in to PHP?

I have a WordPress plugin that reads and displays image files from the plugin folder, the plugin reads and displays the images name from a CSV as there is almost 200+ files. Now the client wants to migrate the images to Azure Blob storage. The current code looks like below. ‘<div style="background-image: url(‘+csvData[‘logo’]+’)">’ + ‘<div

Read More