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
0 answers
331 views

digitalocean install apache, but it says ~Package 'apache2' has no installation candidate~ [duplicate]

sudo apt install apache2 Reading package lists... Done Building dependency tree Reading state information... Done Package apache2 is not available but is referred to by another package. This ...
Md Abdul Awal's user avatar
1 vote
0 answers
691 views

Allow PHP to read Apache log files

What is the best and most secure way, to change the owner/group/permissions of the apache error log in /var/log/apache2/error.log such that it can be read by a php script i.e. in /var/www/html/errors....
lenny's user avatar
  • 111
0 votes
1 answer
73 views

Apache with more than one PHP version

I have Apache and PHP 7.4 installed on my Ubuntu 20 server on VPS. But I also need to have PHP 7.0 for one project which does not run on Php 7.4. Is this possible?
Čamo's user avatar
  • 759
0 votes
0 answers
92 views

Apache DocumentRoot

I have a Apache installed on Ubuntu 18. Config file /etc/apache2/apache2.conf does not contain DocumentRoot directive. But there is /etc/apache2/sites-enabled/000-default which defines DocumentRoot as ...
Čamo's user avatar
  • 759
1 vote
0 answers
536 views

Ubuntu server problem with FollowSymlinks

The server is from company named contabo if that makes any difference Ubuntu 20.04+lamp installed I have a PHP script and for some reason if I try to navigate on the backend all links are 404 (The ...
peakminute's user avatar
1 vote
2 answers
6k views

How to downgrade php xdebug version

I have installed xdebug in version v3.0.1 but it cause me problem with php7.2 and my symfony installation. I can not upgrade php version now so i need to downgrade xdebug version to previews (any of ...
patryno's user avatar
  • 13
0 votes
2 answers
90 views

Schedule a Task-every 10 minutes: Fetch a URL 'https://site.com/folder/cron.php' fetched Status: 404 Output: File not found

I'm a beginner, I've been looking for solutions on the net, but I haven't succeeded. Fetch a URL: https://site.com/folder/cron.php/ I rented the server recently. OS Ubuntu 18.04.5 LTS , Plesk Obsidian ...
Danyyy's user avatar
  • 1
0 votes
0 answers
909 views

The following packages have unmet dependencies: php7.4 +ubuntu 20.04

I upgraded Ubuntu from 18 to 20.04. After upgrade, my codeignator is not working. Type: Error Message: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' Filename: /var/www/tech/system/database/...
mayasakthi's user avatar
1 vote
1 answer
32 views

Not sure if PHP if updating

I have a server running Ubuntu 20.04.1 LTS. I remember reading that Ubuntu back-ports patches for PHP, Apache, and MySQL, so the version number of PHP, Apache, and MySQL doesn't change. If that's the ...
user1177071's user avatar
0 votes
0 answers
369 views

PHP Page won't display on Apache2

So I have apache2, php7.4 and mysql installed but when I try and view my .php file on the internet with my domain which I've tested and works it just shows a blank page. I'm able to view the info.php ...
vapouryh's user avatar
1 vote
1 answer
2k views

Removed /usr/bin/php

I've made a stupid mistake on a live webserver and need some help to recover. While logged in as root ( mistake #1 ) I did a wget of a file to /usr/bin/php which created the directory /usr/bin/php ...
dean winsbury's user avatar
0 votes
1 answer
688 views

can't get PHP running on apache, having run these commands to set up apache with php

can't get PHP running on apache, having run these commands to set up apache with php I have an ubuntu machine, and have been trying to get PHP running.. As you can see the PHP isn't running root@...
barlop's user avatar
  • 125
1 vote
0 answers
165 views

How can I make my MySQL database work as an SNMP agent with Ubuntu? [closed]

I have one ESP32 temperature sensor sending values to my MySQL database and storing it in the database table. I want to be able to send these values in the database to any SNMP server, can I do that? ...
Cisco Saeed's user avatar
3 votes
1 answer
9k views

After upgrading to ubuntu 20.04 from 18.04 unable to install php

I have done a release upgrade from ubuntu 18.04 to 20.04. Removed previously installed PHP. Then I run sudo apt install php-cli but I encounter the error below: The following packages have unmet ...
Sisir's user avatar
  • 657
0 votes
1 answer
2k views

Apache mod_geoip module not Working on Ubuntu 20.04

I have Installed Apache mod_geoip module on Ubuntu 20.04 sudo apt-get install libapache2-mod-geoip and edited file: /etc/apache2/mods-enabled/geoip.conf to enable: GeoIPEnable On GeoIPDBFile /usr/...
Mitra's user avatar
  • 121
1 vote
0 answers
163 views

Migrating system to another VPS

I am new to Ubuntu. Is there any management software that would save some sort of system image that I may copy to a new VPS if needed? I have a DigitalOcean droplet with Ubuntu, nginx, php-fpm, redis ...
grimdbx's user avatar
  • 11
1 vote
1 answer
17k views

Can we increase the memory limit of PHP directly from the command line? [closed]

Can we increase the memory limit of PHP directly from the command line? I am having more than one PHP installation on my ubuntu system and I am using a simple php-switch-scripts script to setup and ...
Daniel Felix's user avatar
0 votes
1 answer
2k views

When I try to upgrade to PHP 7.4, it says I already have the newest version... but I don't

I have followed these steps... sudo add-apt-repository ppa:ondrej/php sudo apt update sudo apt install php7.4 php7.4-common php7.4-cli Output is... Reading package lists... Done Building dependency ...
arnoldbird's user avatar
0 votes
1 answer
1k views

How to prevent access to a specific directory?

I am storing images on /var/www/html/assets/photos/ and I don't want users to be able to navigate via browser or any other way to this folder. I want only my PHP scripts to be able to use this folder. ...
Foobarer's user avatar
  • 367
0 votes
1 answer
3k views

What should I do if all my PHP pages come out blank with Apache2?

Here's My Problem Recently I purged all LAMP packages because I couldn't make virtual hosts work with my local wordpress installation. But then even after installing all the packages, PHP pages simply ...
cryptic's user avatar
  • 13
0 votes
1 answer
1k views

Apache multiple Virtual hosts document Root not working

Hello I try to do test that ubuntu 20.04.01 APACHE : 192.168.23.136 win10 20H2 : DHCP glpi : /var/www/glpi/index.html test.com : /var/www/test.com/public_html/index.html file : 000-...
ckris L's user avatar
1 vote
0 answers
202 views

Can't open localhost after restarting apache2

I don't really know what to send you here so please ask. The problem is I cannot access my local apache2 webserver neither via localhost or my machine's hostname nor via 127.0.0.1. At first I could ...
Wolterhon's user avatar
0 votes
0 answers
224 views

How install software that using old mysql, php version with newest LAMP version?

I try to install an old version of Invision Power Board (2.x) but when I want to configure database etc server return a blank white page You can try here to understand what I mean http://datatables....
Jack Rock's user avatar
0 votes
1 answer
3k views

How to securely allow a PHP script to save files?

I have a PHP script that is supposed to save images to /var/www/backend/images/ folder. The script is in /var/www/html/save_image.php The owner and the group of all the folders and files in /var/www/ ...
Foobarer's user avatar
  • 367
1 vote
0 answers
123 views

How to set rate limit for specific queries in php with nginx

I have a php file called "sample.php". This file contains query_string in several different ways. Some innocent users use these query_strings at maybe 100 requests per minute (no problem). ...
Benjamin's user avatar
  • 111
0 votes
1 answer
439 views

Unable to connect LAMP

I have Ubuntu 18.04, Apache, MySQL and PHP7.4 in my local environment and I have been setting up various projects locally in both Laravel and WordPress. I haven't done this in over a year since I have ...
user150107's user avatar
1 vote
1 answer
1k views

nginx.conf and php issues after Upgrade to

I just upgraded my ubunut server on AWS to Ubuntu 20.04.1 LT from Ubuntu 16.x I had some issues upgrading at first, but I was able to move past those. Once I upgraded though I could not get nginx to ...
Ten Digit Grid's user avatar
0 votes
1 answer
1k views

How to install oci8 with only an instant client using pecl

I am trying to compile OCI8 for PHP sudo pecl install ./oci8-2.2.0.tgz Asks me oracle for the path to the roacle home folder, but I get the following error "Checking ORACLE_HOME library ...
glorsh66's user avatar
0 votes
0 answers
1k views

VS Code: No PHP executable is set

I am busy with a Udemy course about WordPress. The course uses VS Code as text editor and I love it, but keep getting a "No PHP executable is set error". PHP was loaded as part of the Local-...
Johann van Vuuren's user avatar
1 vote
2 answers
2k views

Apache does not interpret php code

I have recently had to uninstall and reinstall a LAMP stack on Ubuntu 20.10. Everything appears to go well, except that PHP code is not interpreted. It appears that the PHP module is not loaded. The ...
Peter's user avatar
  • 306
0 votes
1 answer
77 views

Intercepting PHP traffic

I would like to know how feasible it is (and then the ability to stop) someone running malicious code on a Ubuntu server that reads the data sent to, and handled by PHP (I am using the apache module ...
Antony's user avatar
  • 271
0 votes
0 answers
3k views

PHP sessions not working in my server after refresh

I tried to use sessions, but are not working, so I tested them with $_SESSION['one'] = 'one'; print_r($_SESSION); I refreshed the browser, it works Array ( [one] => one ) I commented the $...
Immo Broker's user avatar
2 votes
1 answer
5k views

''cURL is not installed on this server'' after updating to Ubuntu 20.04

I've recently updated my Ubuntu from 16.04 to 18.04 and then from 18.04 to 20.04. Now two plugins on my Wordpress site give me these errors: 1- OneSignal Push: cURL is not installed on this server. ...
rem3on's user avatar
  • 29
2 votes
1 answer
6k views

How to solve mysqli.so, cannot open shared object file

Message: PHP Startup: Unable to load dynamic library '/path/to/extension/mysqli.so' (tried: /path/to/extension/mysqli.so (/path/to/extension/mysqli.so: cannot open shared object file: No such file or ...
shazej's user avatar
  • 21
1 vote
0 answers
36 views

Desktop freeze when using the desktop as destination path for a sqlite database (Ubuntu 20.04)

i wrote a little php testscript. The script insert 10000 numbers into a sqlite database. (I know, it is stupid and senseless to do 10000 insert statements in a loop.) But, when i using the home-...
IjonTichy's user avatar
1 vote
0 answers
259 views

Redirect Not Working On PHP Extensions

I've just added a load of 301 Redirects and they all work apart from those that include a PHP extension. For example, /gallery/ redirects fine and so does /brochure.pdf but /sitemap.php or any other ...
Kirk Johnston's user avatar
0 votes
1 answer
552 views

Is the /tmp some special?

Ubuntu 18.04 / on ext4 I create a file in /tmp by php script. Ok, I see it by cat. But php file_exists() on another script return FALSE. I create a file in /var/www by the same script. Yes! ...
Vladimir Kalachikhin's user avatar
1 vote
1 answer
349 views

Upload/create to a folder created from www-data user PHP via FTP user used for VSFTPD, Ubuntu

I have two users: www-data with a group www-data ftp_user used for VSFTPD to connect to the server with group www-data There is a folder owned by ftp_user:www-data for the FTP - ftp_folder with ...
gdfgdfg's user avatar
  • 111
1 vote
0 answers
208 views

High end VPS is Slow

I have bought a vps to host my website. I have installed apache2, php, mysql server. My vps specs are: ram: 30 gb guaranteed cpu: 8 cores ssd: 800 gb port: 600 Mbps os: Ubuntu 18.04 i have about ...
Omer Younas's user avatar
2 votes
1 answer
6k views

sh: 1: python: not found when execute python script from php

I'm tring to execute a python script call from php with the command below: $output = shell_exec('python /var/www/html/sna/server/userManagement.py '. $user.' '. $pass .' \''.$action.'\' 2>&1'); ...
Lx2pwn's user avatar
  • 129
0 votes
2 answers
2k views

PHP code is not rendered properly on web browser

I've just installed Apache with PHP-FPM based on the following tutorial How to Setup Apache with PHP-FPM on Ubuntu 20.04 wolf@linux:~$ dpkg -l apache2 libapache2-mod-fcgid software-properties-common ...
user avatar
3 votes
5 answers
12k views

issue when installing php-dev in ubuntu 20.04

I am getting the following error: root@56709:/etc/nginx/conf.d# apt install php7.4-dev Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not ...
aherlambang's user avatar
0 votes
1 answer
195 views

16.04 LTS, `php -v` in console shows PHP 7.0.33, but PHP 7.3 *is* installed, however I can't use Composer since it needs PHP 7.2+

I'm trying to install something with Composer and am told I need PHP 7.2+. I know for a fact that PHP 7.3.22 is installed on my Ubuntu 16.04 LTS/Apache2/Plesk 18 system as reported by phpinfo(); and ...
zoldos's user avatar
  • 13
0 votes
0 answers
655 views

RewriteRule not working with PHP-FPM Ubuntu 18

I have just installed successfully PHP-FPM in Ubuntu 18.04.5 and PHP Version 7.4.11. However there is one problem with the Rewrite in a .htacess file. This works fine on another server and is known to ...
Franz Holzinger's user avatar
1 vote
0 answers
4k views

PHP Startup: Unable to load dynamic library 'pdo_mysql'

I am using php 7.4 and ubuntu 16.04 which I have upgraded from 14.04. Here I am randomly getting pdo error like: PHP Core Warning 'yii\base\ErrorException' with message 'PHP Startup: Unable to load ...
Er.KT's user avatar
  • 121
2 votes
2 answers
3k views

How can I give two users access to a folder?

I'm new to Linux. I have a folder I want to give full access (read, write, delete) to two users. my FTP user and PHP user. How can I do that?
jixodoj's user avatar
  • 23
1 vote
1 answer
2k views

Apache2 and php won't start after upgrade to 20.04

I updated to 20.04 and did not test apache2 right away. However after trying to install php with: sudo apt install php libapache2-mod-php php-mysql When I try to start with php I get: PHP Fatal error:...
Brian Wiley's user avatar
0 votes
2 answers
1k views

How should I go about debugging a PHP Fatal Error? [closed]

Since applying some updates to the server this morning, running certain wp cli commands returns a PHP Fatal Error. An example would be... wp cache flush This worked yesterday, but now I get... PHP ...
Kirk Johnston's user avatar
1 vote
3 answers
30k views

php-curl not installed in php 7.4

I am trying to install php-curl in my terminal but this command show linux@Lenovo:~$ sudo apt-get install php-curl Reading package lists... Done Building dependency tree Reading state ...
Ananda's user avatar
  • 13
2 votes
2 answers
2k views

Facing issue while installing php7.3 on Ubuntu 18.04 “Not replacing deleted config file /etc/php/7.3/apache2/php.ini,”

I am trying to install Php7.3 on Ubuntu 18.4, I am using Apache Server(2.4). My php.ini file is not getting setup at location /etc/php/7.3/apache2/php.ini. I followed the php.ini does not exist but ...
PRashant PUrohit's user avatar

1
6 7
8
9 10
53