Category "php"

Batch request Google Calendar php API

I'm working on a google Calendar sync with my application. I'm using the latest google-api-php-client Now I want to update all my event, so i want to use the

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

I installed the Sonata admin bundle. After installation i refresh my page there is the cache problem then i use the following command to remove the cache: rm -

Popup Window and PHP form

I've created a contact page and a separate PHP page to receive the posted data. I'd like to make the PHP open in a popup window. I've tried methods online witho

How to get page number on dompdf PDF when using "view"

Ok, so I use the following snippet to get "views" of HTML with PHP variables loaded in as $data so that I can do things like fill in tr's of data from a databas

What is the best php library to convert html to plain text from email?

I have been testing 2 different PHP libraries (html2text & htmlpurifier) to convert html email to plain text. The problem is that none of them are formatti

WordPress Subquery returns more than 1 row on SELECT

I am executing this query with core cron by custom Wordpress plugin: // MAKE SQL CALL $SQL = "SELECT ".$wpdb->prefix."postmeta.post_id FROM ".$wpdb->

curl returning 301 error after migrating to https

We recently migrated to SSL, and the site works great with the exception of one function. The function uses curl in the code below to execute an api located on

Implementing route based models in Vue3 (Inertia.js)

I am following the following this guide, that shows how to enable "Route Based Modals" in Inertia.js. The post is written for Vue2, and I am using Vue3 - and I

admin-ajax.php - the server responded with a status of 500 (Internal Server Error)

I've drawn a complete blank with this if anyone can help. I have migrated a website from from a NGINX server to Apache. The installation works fine on NGINX but

CodeIgniter extend CI_URI undefined method

So I've been in the process of updating someones old CI 1 to CI 3 code. In process. In particular, the URI class extension is not working. I've read the CI doc

Sliders in Laravel

I am not able to show images in slider one by one, it displays all images at once. My static code is here and it works well with sliding images. <secti

Project structure for PHP

I am new to PHP and want to know the directory structure for the php projects. I have experience in Java and in java we have src contains java source files, WEB

How to display table header in every page using FPDF library?

just need your help with my code. My question is how can I get the table header from the previous page and access it on the remaining pages? If I have a large d

PhpSpreadSheet Class ZipArchive not found Error

I've just downloaded PhpSpreadsheet package via composer and I tried to generate an Excel spreadsheet. But all I get is an error "Class ZipArchive not found ".

Fetch files from next cloud storage and display in Laravel website

I have a website built with Laravel. I need to fetch files from my nextcloud storage and display in the website. I have successfully installed sabre/dav to crea

Laravel 5.2: Unable to locate factory with name [default]

I want to seed database when I use this public function run() { $users = factory(app\User::class, 3)->create(); } Add three user in database but wh

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

I get the error message in the question's title, or to be exact I get this message PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/ph

CodeIgniter 3 is generating a session file on each request, why?

I use CodeIgniter (v3.1.11) for my webapp and files as session_driver. The session library is autoloaded and configured like this $config['sess_driver']

Correctly determine if date string is a valid date in that format

I'm receiving a date string from an API, and it is formatted as yyyy-mm-dd. I am currently using a regex to validate the string format, which works ok, but I c

Difference between PHP 5.3 to PHP 7.x

My project is running on PHP 5.3. Now I want to upgrade PHP to a higher version as 7.x. Before the update I tried to search difference and complexity but could