Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [php]

PHP is a server-side scripting language, used for building browser-based applications. This includes websites as well as programs that don't really need any form of interaction with the user.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

Problem- getting basic PHP files to execute instead of just being read on WSL V2 Ubuntu Linux 20.04

The problem Just a heads up, I was figuring this out for several hours. I tried all the different ways that other people were doing and none of them worked for me. I figured that if this was this ...
user avatar
0 votes
0 answers
3 views

PHP8.0 and wine-devel incompatibilities on 20.04

Installing wine on my PC I am getting this: ❯ sudo aptitude install wine-devel Se instalarán los siguiente paquetes NUEVOS: gstreamer1.0-plugins-base:i386{a} libasn1-8-heimdal:i386{a} ...
user avatar
0 votes
0 answers
41 views

Broken package error while installing PHP8.1 [duplicate]

I'm trying to install PHP but this error keep occurring and I don't know how to solve it. Can someone help me? error ❯ sudo apt-get install php Reading package lists... Done Building dependency tree ...
user avatar
0 votes
1 answer
19 views

Apache Video Stream Error

Making video stream website(localhost) But Problem is not working My html code (test.html) <video> <source src="/home/$user/Documents/video/test.mp4" type="video/MP4&...
user avatar
0 votes
0 answers
29 views

unable to save file

when I edit a php.ini file I get this error: [error writing /etc/php/7.4/apache2/php.ini : No such file or directory. Im currently setting up a media server - Ampache. Thanks for taking time to help ...
user avatar
0 votes
0 answers
15 views

Simple Machines Forum PHP error - Ubunbu 20.04 [duplicate]

Error: Critical Error! Your environment does not support the required mbstring library. Please enable mbstring and try again.
user avatar
2 votes
0 answers
209 views

add-apt-repository broken in Ubuntu 22.04 for php [duplicate]

I am attempting to install php7.4 after officially upgrading from 20.04 to 22.04 cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22....
user avatar
  • 155
0 votes
0 answers
139 views

Apache PHP modules not upgraded in 22.04

After upgrading from 21.10 to 22.04, Apache server does not start anymore: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php8.0....
user avatar
  • 315
0 votes
0 answers
55 views

How can I use Php7.4 in my Apache in Ubuntu 22.04? [duplicate]

Recently I upgrade my Ubuntu from 20.04 to 22.04. I was using Php7.4 in Ubuntu 20.04 with the Apache server. After upgrading to Ubuntu 22.04, the Php Upgrades to 8.1 automatically. After that, I ...
user avatar
0 votes
1 answer
24 views

XAMPP is not working on Ubuntu 20.04.4 LTS

I have been using XAMPP to work on personnal project using PHP. XAMPP used to work before when I first installed it but now there seems to be an issue that I can't seem to resolve. Here's what happens:...
user avatar
1 vote
0 answers
144 views

Unable to correct problems, you have held broken packages when trying to install PHP

I am new to using Ubuntu OS, I am trying to install PHP so that I can use the interpreter in for PHPStorm. The commands I have used: sudo apt-get update sudo apt install php then I get the following ...
user avatar
0 votes
1 answer
82 views

How to safely replace Ondrej PHP with Ubunbu 22.04 original PHP repositories?

I have this problem and now I don't know how to safely replace Ondrej PHP with Ubunbu 22.04 original PHP repository? I have PHP-FPM. Thanks!
user avatar
0 votes
0 answers
201 views

The following packages have been kept back: PHP

I get this message after 22.04 upgrade on a Digital Ocean LAMPSTACK droplet: The following packages have been kept back: libapache2-mod-php7.4 php7.4-bz2 php7.4-cli php7.4-common php7.4-json php7.4-...
user avatar
0 votes
1 answer
104 views

Error restarting apache after changing php version

Im trying to downgrade to php7.4 from 8 on ubuntu 20.04. Fresh install from the Digital Ocean "Marketplace" LAMP setup. Trying to follow guides to do this: I can select the cli php like ...
user avatar
  • 101
0 votes
1 answer
31 views

Building mod_php5 For Ubuntu Apache2 [closed]

I need to install mod_php5 for Apache 2.4 under Ubuntu in my homelab, in order to test an upgrade to an application whose installed version will not run under PHP>5 and whose current version will ...
user avatar
0 votes
0 answers
25 views

Some PHP codes aren't running in ubuntu 20.04

I'm very frustrated because of PHP codes that are not executing in my Ubuntu 20.04 but working smoothly in windows 10. There are many codes that are not running I have attached one. `<...
user avatar
0 votes
1 answer
20 views

Help with installing apache2 and PHP (silly question)

I need to install wordpress, so I'm installing LAMP Stack with PhpMyAdmin following this TecMint step-by-step It was working just fine until step 12: Next, test if Apache is working in conjunction ...
user avatar
0 votes
1 answer
158 views

How work Phpmyadmin for php 5.6 on Ubuntu 20.04?

I have a problem with the installation of phpMyAdmin in my server Ubuntu 20.04. My version of php is 5.6 but when I install phpMyAdmin and open url /phpmyadmin in my browser, I get the error HTTP ...
user avatar
  • 1
2 votes
1 answer
185 views

Is there a way I can install php 7.2.31 on ubuntu 20.04?

Oddly enough I couldn't seem to find anything about this. Baffles me, except I'm an Ubuntu noob (switched over about 6 months ago, and absolutely loving it). I'm simply trying to install php 7.2.31 (...
user avatar
  • 21
0 votes
1 answer
12 views

re-configure php for imagemagic and openjpeg

My PHP scripts cannot read jpeg2000 files, and neither can the imagemagick command line. I installed Ubuntu 18.04 server from the standard download, it installed imagemagick and PHP for me. Apparently ...
user avatar
0 votes
0 answers
350 views

How to specified pharPath on VSCode settings.json file in Ubuntu 20.04, for using PHP Formatter extension?

I have installed PHP Formatter extension on VSCode. I' trying to Format Document but I have this log: Neither a pharPath or use of Composer was specified. Aborting... I installed php based on Ondrej ...
user avatar
  • 101
0 votes
0 answers
111 views

How to run php code in VSCode in Ubuntu 20.04, when it was installed with XAMPP server?

I want to execute php files on VSCode (php was installed with XAMPP server), so I find the executable path of my php with whereis php, after this I got: php: /opt/lampp/bin/php , so on VSCode settings....
user avatar
  • 101
1 vote
1 answer
109 views

vagrant box not available after update of virtualbox

I upgraded my virtualbox to 6.1.32-dfsg-1~ubuntu1.21.10.1 (I think, from 6.1.18 before) and now the vagrant boxes are not available any more in the browser via the box-IP like it used to work before ...
user avatar
  • 29.9k
0 votes
1 answer
173 views

Ubuntu 20.04 LTS, Unable to Upgrade to PHP 8.0 from PHP 7.2.2

I have carefully followed guideline provided from these sources: Upgrade from PHP 7 to 8 and How to install PHP 8 on Ubuntu 20.04. Unfortunately, when I run the command php -v am getting the following ...
user avatar
  • 1
0 votes
0 answers
15 views

What would be a good Apache2 web server configuration given the resources?

I am trying to figure out how to calculate and implement a good Apache2, MPM Event, PHP-FPM configuration on a VPS with dedicated resources as follows: 64 GB RAM 32 vCPUs The server would be mainly ...
user avatar
0 votes
1 answer
32 views

postgresql is active with pgadmin4 but not showing anything in my php code

I'm new to ubuntu community or linux sounds better. so I don't have much knowledge of repositoies and packages. So, I've installed xampp, postgresql and pgadmin4 in my ubuntu 20.04 LTS. nothing showed ...
user avatar
0 votes
0 answers
57 views

Dockerfile (php7.2) not routes

DockerFile: FROM php:7.2-apache RUN apt-get update && apt-get install -y RUN docker-php-ext-install mysqli pdo_mysql RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli ...
user avatar
0 votes
0 answers
52 views

Atom Flatpak using sandboxed runtimes and executables in package settings

I'm using the flatpak version of Atom. I want to install a linting package for PHP, so that code errors are easier to spot. However it requires access to the php binary. Now since this is a Flatpak, ...
user avatar
0 votes
0 answers
59 views

how to stop all unnecessary services in ubuntu server 20.03 LTS for lamp server?

I have linode 1 gb ram and 1 cpu the bare minimum server. I want to know what are the best steps to run lamp server on ubuntu 20.03 LTS. I want to run Apache2 mysql 8 php 7.4 but on my server there ...
user avatar
0 votes
1 answer
68 views

Anyone know how to fix this 403 - Forbidden error when trying to view my lighttpd info.php file?

I'm working on a lab project for one of my cybersecurity classses and am getting an error message where one shouldn't be. We are using lighttpd and I also installed the programs below: php, php-cgi, ...
user avatar
2 votes
0 answers
65 views

Any other ways to make multiple sites on one server use different PHP versions?

I recently upgraded the PHP version on 3 production servers to 7.4, along with MySQL and Apache2. Today we learned that one of the websites is still showing 7.2 in phpinfo(), despite php -v showing 7....
user avatar
  • 21
0 votes
0 answers
29 views

Post Rsync Migration Apt Not Recognizing Installed Packages

My server was recently migrated via rsync, while everything appears to work correctly apt doesn't recognize the existence of some packages and services. Question: Is there a way to 'refresh' apt so ...
user avatar
1 vote
1 answer
55 views

LAMP Installation on Ubuntu 20.04 LTS - issue with phpmyadmin installation

I get below error when installing phpmyadmin Depends: php7.4-common (= 7.4.3-4ubuntu2.8) but 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 is to be installed E: Unable to correct problems, you have held ...
user avatar
  • 11
0 votes
0 answers
646 views

PHPMyAdmin with php < 8

So I am installing PHPMyAdmin for months now on my php 8 machine by using apt install phpmyadmin, which always worked fine, it always ran at php 7.2, the webserver at least, not sure if phpmyadmin it ...
user avatar
1 vote
1 answer
1k views

Unable to add ondrej repository apt in Ubuntu 20.04

I am unable to add ondrej to my Ubuntu 20.04 installation. sudo add-apt-repository ppa:ondrej/php The above command returns the following error Traceback (most recent call last): File "/usr/...
user avatar
  • 121
0 votes
1 answer
162 views

Trying to install apache for NextCloud, getting an error message

invoke-rc.d: initscript apache2, action "restart" failed. ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)...
user avatar
0 votes
1 answer
374 views

www-data user cannot open a file to write in php

I have an apache server running as www-data on Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-97-generic x86_64) In a php file the following line fails with error: Permission denied $f=fopen("detekst.txt","a+");...
user avatar
0 votes
0 answers
125 views

install php-rdkafka on ubuntu20.04

I am trying to install php-rdkafka lib: https://arnaud.le-blanc.net/php-rdkafka-doc/phpdoc/index.html on my ubuntu 20.04, php 8.0. With php8.0-dev package installed. the suggested installation via ...
user avatar
0 votes
0 answers
597 views

Uncaught Error: Call to undefined function pg_connect()

I have following server cofiguration: Ubuntu 20.04.3 LTS PHP 7.4.13 (cli) psql (PostgreSQL) 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1) I have moved my web service based on WordPress from Windows to Linux ...
user avatar
  • 1
0 votes
0 answers
18 views

Cronjob Set off from Web Portal

Ubuntu 20.04 Apache Is there a way for a cron job to be executed from the web portal? We have tried to trigger the cron job using different methods. PHP - Adding Cron Job static public function ...
user avatar
0 votes
1 answer
154 views

Solved: Apache doesn't resolve symbolic links in /var/www

SOLUTION(thanks to Dan): <Directory /var/www/exams> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> and chmod -R 775 ~/Sviluppo ...
user avatar
0 votes
0 answers
13 views

Showing characters on website for data saved in database

I have upgraded database to version mysql-8.0 8.0.28-0ubuntu0.20.04.3. But its starting showing the invalid characters from database on website. Can you please tell how can we resolve this. I have ...
user avatar
-1 votes
1 answer
242 views

How can i use a old version of PHP?

I am trying to use a old version of PHP - Specifically PHP 5.3.8 I really need to use this version, it is not possible to update it since the system is huge and it is very old - It needs to run on PHP ...
user avatar
0 votes
1 answer
359 views

PHP mbstring, xml and curl setup

My script installation rquires the following setup: sudo apt update, sudo apt install php-curl, sudo apt install php-mbstring, sudo apt install php-xml, sudo service apache2 restart After running the ...
user avatar
0 votes
0 answers
25 views

Switch from php7.2 to 7.4 and from alpine to ubuntu shell script/Dockerfile question

This is in a Dockerfile with FROM phusion/baseimage:hirsute as foundation. This part was working with php7.2 but we needed to switch to php7.4 The environment variable are contained in a .env file in ...
user avatar
1 vote
1 answer
150 views

install apache2 php module

My installation of apache2 is messed up. I can't get apache2's php module installed. How can I get Apache2's php module installed? What I have tried: $ sudo apt reinstall libapache2-mod-php Reading ...
user avatar
0 votes
1 answer
33 views

Trying to setup cronjob auto-browser or run scripts in Python or PHP

The situation was I wanted to set up cronjob for webserver on Ubuntu, the php / python script file would be several sql function, then run automatically update multiple tables. but after few research, ...
user avatar
0 votes
0 answers
66 views

VirtualBox ubuntu/focal64 - Error: Command not found

Description: I ran into a problem with a command and I am not sure how to handle the situation. All setup commands ran successfully, so the file structure is in place to install the template command ./...
user avatar
1 vote
1 answer
1k views

PHP Warning: Cannot load module "http" because required module "raphf" is not loaded in Unknown on line 0

When entering artisan commands in laravel- ubuntu 20.04 it shows following error PHP Warning: Cannot load module "http" because required module "raphf" is not loaded in Unknown on ...
user avatar
1 vote
1 answer
642 views

How install php7.4.11 in ubuntu

I downloaded php-7.4.11.tar.gz for the installation manual, but after extracting and entering make, the following message is displayed in the terminal: make: *** No targets specified and no makefile ...
user avatar
  • 11

1
2 3 4 5
49