php

laravel 8 installation failed

laravel 8 installation failed Question: i use this command for install laravel + Authentication composer global require laravel/installer laravel new laravel–jet Laravel Installer 4.0.2 but showing this error on cmd: Which Jetstream stack do you prefer? [0] livewire [1] inertia > Aborted. and i using this commands: composer create-project –prefer-dist laravel/laravel laravel composer require laravel/jetstream …

Total answers: 7

Extract presenter notes from PPTx file (powerpoint)

Extract presenter notes from PPTx file (powerpoint) Question: Is there a solution in python or php that will allow me to get the presenter notes from each slide in a power point file? Thank you Asked By: Raven || Source Answers: You can use python-pptx. pip install python-pptx You can do the following to extract …

Total answers: 1

Can't execute python script from PHP (apache2)

Can't execute python script from PHP (apache2) Question: I want to execute Python script from PHP file using apache2 on my macos. I am able to execute simple python script like: From PHP: $result = shell_exec(“python /Library/…./example.py ‘$name’ ‘$email’ ”); var_dump($result); To Python import sys x = sys.argv[1] y = sys.argv[2] print(“name: ” + x …

Total answers: 2

Python 'No module named …' when script is executed by php with shell_exec()

Python 'No module named …' when script is executed by php with shell_exec() Question: I wrote a python script that import a specific module that I have installed with pip. When I run this script on terminal like python test.py everything work fine and when I run help(“modules”) I can see my module in the …

Total answers: 3

how to grant www-data user access to python salt module?

how to grant www-data user access to python salt module? Question: I’m maintaining a small legacy php5 application (based on CodeIgniter) that acts as a salt web UI that allows me to run salt commands and schedule repeating jobs. The web app runs python scripts which invoke the salt api to execute the commands. The …

Total answers: 1

Python PHP equivalent

Python PHP equivalent Question: I have been using PHP for a while now with my Apache2 web server on my raspberry pi. It works great, but I get tired of always having to think "how do I X in PHP" or "what was the function name for this in PHP". I am under the strong …

Total answers: 1

Odoo creating an invoice with Web Service API (PHP)

Odoo creating an invoice with Web Service API (PHP) Question: I am trying to create an invoice on Odoo using Odoo Web Service API (via PHP) which is based on XML-RPC using the code example in the official API documentation. I have succeeded to create a customer using the code provided in the documentation : …

Total answers: 1

youtube-dl get direct download url

youtube-dl get direct download url Question: Is there a way to get the direct download URL using youtube-dl? I tried it with youtube-dl -g https://www.youtube.com/watch?v=xxx It returns a URL that looks correct at the first sight, but it leads to a blank page that shows the video player. I want to extract the direct download …

Total answers: 2

Passing JSON to PHP not working

Passing JSON to PHP not working Question: I’ve been trying to get my python code to transfer SQL query data from client running python to web server running PHP, then input that data into a MySQL database. The below is the python test code simulating a single row: #!/usr/bin/python import requests import json url = …

Total answers: 1

call php function from python

call php function from python Question: My PHP code: function start($height, $width) { # do stuff return $image; } Here my Python code: import subprocess def php(script_path): p = subprocess.Popen([‘php’, script_path], stdout=subprocess.PIPE) result = p.communicate()[0] return result page_html = “test entry” output = php(“file.php”) print page_html + output imageUrl = start(h,w) In Python I want …

Total answers: 2