Questions tagged [php]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Two application installations from APS catalog fails on Plesk for Windows Server: The 'mysql' extension was not found

Please excuse, if this is the wrong place to post this question, I didn't know better. I'm using Windows Server 2022 and Plesk Obsidian Version 18.0.48. I try to install two applications via Plesk ...
0 votes
3 answers
22 views

CGI scripts: when can you return a document, instead of an HTTP response?

Script 1 below is bash, and is at https://example.com/cgi-bin/test. It produces the output 'Under construction' when fetched. It echos Status and Content-type headers, and some HTML. If I instead try ...
  • 69
0 votes
0 answers
12 views

Unable to connect to server following phpMyAdmin upgrade from 5.1 to 5.2

Not sure to post on the right StackExchange forum. If not, let me know! Working environment: OpenSUSE Leap 15.4 MariaDB : mariadb Ver 15.1 Distrib 10.7.7-MariaDB PHP 8.0.25 (cli) (built: Oct 31 2022 ...
0 votes
1 answer
44 views

PHP8.1 FPM Crashes everyday after 12AM

From the last two to three days I noticed that my PHP8.1-FPM process crashes after around 12:00 AM-12:30 AM at night. My server has highest traffic in morning and lowest in night. But FPM process runs ...
0 votes
2 answers
30 views

Why is Invoiceplane giving error while I copied the ipconfig.php.example file to ipconfig.php file?

The error I got is in this url: url in browser: http://localhost/ error in browser: https://justpaste.it/d82bd What am I missing here? I copied the file ipconfig.php (given below) from ipconfig.php....
0 votes
1 answer
22 views

Error 502, phpinfo() directing to 7.4 when 8.1 is installed (File not found)

I'm setting up a web server. I have a freshly installed Ubuntu 22.04, Nginx (welcome page works), and php-fpm which installed php8.1 and php-fpm8.1. To test PHP, I created a /var/www//info.php which ...
-2 votes
0 answers
14 views

Monivids Crons Job that crawls my Youtube Channels

please am trying to setup a crons job for my website Monivids.com. The site is all about watching videos and earn, I plan to pull the videos from my youtube channel or any other submitted channels ...
0 votes
2 answers
87 views

PHP8 ldap_bind : Error -1 Can't contact LDAP server

I m on almalinux 8.7 with PHP8. Test ldapsearch with TLS is ok ldapsearch -H ldap://xxxx -x -ZZ /etc/pki/tls/certs/xxxx.pem -D 'xxxxx' -w 'xxxx' -b 'cn=xxx,cn=users,dc=xxx,dc=xxxx' But ldap_bind won'...
  • 125
1 vote
0 answers
16 views

Change "Loaded Configuration File" for a specific domain [Not the entire server]

I do not want to make modifications to the default php.ini the server uses. I've made a new one to use, which is located in my site's own directory on an Nginx server. The issue I have come across is ...
0 votes
0 answers
36 views

Parse HTML as PHP on a Azure App Service (Linux) running PHP 8.1

I am really struggling to get an Azure App Service running Linux and PHP 8 or 8.1 to parse HTML files through PHP. The 8.0 and 8.1 versions run on nginx rather than Apache. I have started by updating ...
0 votes
1 answer
35 views

Installing sql server drivers for php on ubuntu

Background I have an ubuntu server running laravel that needs to connect to a different server of ours running mssql. Linux server: Ubuntu 20.04 php 8.1 I created a laravel test query to help me ...
  • 103
0 votes
0 answers
18 views

Php mail transmission error using postfix

I need your help I am using AWS and ubuntu os 20.04. The web server uses nginx and uses php mail I installed php 7.3 pfm. I used postfix for mail function and connected to SMTP. It's not Google, it's ...
1 vote
0 answers
37 views

index.php displays as listing on Apache2 server

My OS is Ubuntu 22.04 I started out by installing php 8.1 I then installed Apache/2.4.52 (Ubuntu) Server Then I added the following: sudo apt-get install -y php php-cli php-common php-mysql php-zip ...
0 votes
0 answers
15 views

keydb active-replica multi-master php session storage

I'm looking to use keydb/redis for php session storage in a HA setup. Currently, I have two keydb instances running with the following config: Instance 1 (192.168.2.10) requirepass pass123 masterauth ...
  • 229
0 votes
0 answers
16 views

Issue with 'mkdir(): No space left on device" in Docker Container. Might be some other issue though?

I have some docker containers (NGINX / PHP, MySQL, etc.) that have been running fine for years. However, recently I started seeing this error when running a PHP script in Laravel in the NGINX / PHP ...
  • 139
0 votes
1 answer
25 views

Nginx Error after upgrading php

I have an aws server that runs some php code. I recently upgraded to php8. Now when I access php pages on my site (for example https://whitewaterwriters.com/oracle/index.php) I get a nginx error. I ...
  • 121
0 votes
1 answer
34 views

php command not found after PHP8 install on OpenSUSE Leap 15.4

I have upgraded my OpenSUSE Leap from 15.3 to 15.4. I then want to upgrade PHP from version 7 to version 8. Before upgrade, PHP version is: server:~ # php -v PHP 7.4.33 (cli) (built: Nov 3 2022 12:00:...
0 votes
1 answer
57 views

Modular Dependency in my Docker "dnf module enabled -y php:7.4 php-oci8"

So I'm running a command dnf module enabled -y php:7.4 php-oci8 but I'm getting a Modular Dependency Problem, this was not an issue before. Problem: module php-oci8:21c:8060020221011134100:34611983....
0 votes
0 answers
18 views

IIS FastCGI configuration for high concurrency

I am hosting, on Windows Server 2022, a web application that makes regular ajax calls to a PHP backend. The calls themselves are quite light, just pulling and pushing data from and to a MySQL db. Over ...
  • 189
1 vote
1 answer
100 views

Why environment variable set by SetEnv in apache httpd.conf cannot be passed to php?

I set an environment variable in httpd.conf: SetEnv http_proxy "http://localhost:3128" But I cannot get this variable in php using getenv: <?php echo getenv("http_proxy"); ...
  • 63
0 votes
1 answer
54 views

How to configure a system wide proxy for php file_get_contents on CentOS?

I want to let the php file_get_content function connect to network via system-wide proxy. I tried to add the following lines in /etc/environment: http_proxy=http://localhost:3128/ HTTP_PROXY=http://...
  • 63
0 votes
1 answer
45 views

How can I locate the php script that issues outbound connections?

I have a server running httpd for several websites. Using the top command, I found many httpd processes exhaust memory. Using the netstat command, I found the httpd processes are connecting to an ...
  • 63
1 vote
1 answer
100 views

Nextcloud installation broken after upgrading to Ubuntu server 22.04

I'm currently running Nextcloud on Ubuntu server. After upgrading from 20.04 LTS to 22.04 LTS, I couldn't log into Nextcloud. I switched the PHP modules from 7.4 to 8.1 as recommended in this forum ...
0 votes
0 answers
25 views

How to server index.php from different directory through .htaccess?

I am working on a project which is in Yii2. I have to integrate swagger UI for API documentation. My current directory structure: This is what the .htaccess looks like: RewriteEngine on RewriteCond %{...
0 votes
1 answer
124 views

How to properly setup composer within PHP Apache Docker Container

Content of my Dockerfile: FROM php:8.1-apache WORKDIR /var/www/html/ RUN pecl install xdebug \ && docker-php-ext-enable xdebug \ && a2enmod rewrite \ && docker-...
  • 135
0 votes
0 answers
15 views

server configured for SSL cert and is protected, php $_SERVER['HTTPS'] is not set

I've come across an issue I haven't seen before and am really scratching my head. We have a basic wordpress site running on a WHM/cpanel(for configuration) hosted platform. We have an SSL certificate ...
0 votes
0 answers
30 views

Postfix Webhook for delivery failures

I would like to receive webhooks each time any postfix delivery fails. Apart from scanning the logs, is there a way to configure postfix? After some google, I found this, but it doesn't seem to catch ...
  • 33
0 votes
0 answers
30 views

Create ubuntu user with home folder located in www and restrict ssh access using ChrootDirectory to that folder

I posted this on stackoverflow and was told to post here: I am running a Ubuntu remote dev server, heavily restricted (due to compliance) environment which i previously had configured correctly for ...
0 votes
0 answers
31 views

Can't modify header Content-Type in PHP with Nginx

I have a nginx/1.18.0 and php-fpm 7.4.19 (fpm-fcgi) PHP code header('Content-Type: text/css',true) doesn't modify the header, the same for application/javascript or image/jpg, files are sent with ...
  • 1
-1 votes
1 answer
55 views

Deployment PHP with OpCache

How do you do deployment PHP applications with enabled OpCache? My situation: I have web server with PHP 7.4 and enabled OpCache. Server is common virtual 4vCPU + 8GB RAM. I use tool Deployer - ...
  • 99
0 votes
0 answers
49 views

PHP 8 on IIS 2019: Sometimes Session can not be written

From time to time I get the classic "Failed to read session data" error on my application running on php 8, IIS 2019. This is usually associated with a) the directory does not exist b) the ...
  • 1
0 votes
1 answer
41 views

Is PHP's error_log dependent on the OS, config file or something else?

I have two HTTP servers: Live LAMP server. Local WAMP server. When an error occurs on the live server PHP will generate an error_log file in the directory of where the script error occurred. The ...
  • 134
1 vote
1 answer
90 views

I get 404 error when trying interper PHP with Nginx in Docker

Sorry if this question is answered. It my first time using Docker in web dev. Im setting up Nginx - PHP - MariaDB for my projects . And get stuck when my Nginx show 404 error when everytime i access ...
1 vote
1 answer
59 views

How to manage multiple environments for an app on Ubuntu with Apache server?

I have a PHP app and I would like to host staging, demo, and production servers from one instance on Linode. The challenge I am running into is loading different environment variables for each server. ...
0 votes
1 answer
27 views

Fix virtualmin domains to use individual php ini files

My server is setup to use virtualmin for managing configurations. In trying to resolve a php issue when a wordpress plugin installation, I inadvertently broke the settings on my domains so they no ...
  • 331
0 votes
0 answers
13 views

MySql not connecting after cloudfare integeration probably due to DNS Misconfiguration

I just added cloudfare to my website and website started showing weird errors after that which are automatically solved after refreshing the page 3-4 times. But after surfing the website, the same ...
0 votes
1 answer
36 views

browsers (librewolf & chromium tested) won't send if modified since & if none match after receiving one 304 not modified response

localhost development server : Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1j PHP/8.0.3 mod_perl/2.0.11 Perl/v5.32.1 I'm sending etag & last modified response headers with php : "Connection ...
  • 111
1 vote
1 answer
131 views

CentOS 7 - upgrade PHP version from 7.2 to 8

CentOS 7 Nginx Current websites run on PHP 7.2 PHP -v says ```# php -v PHP 8.0.25 (cli) (built: Oct 25 2022 09:42:31) ( NTS gcc x86_64 ) Copyright (c) The PHP Group``` But phpinfo() in the nginx ...
  • 109
0 votes
0 answers
17 views

How to disable request buffering in Apache2

I'm attempting to use PHP to show progress on uploads using apache2 (specifically 2.4.41 ubuntu). In the php manual here, it states: The web server's request buffering has to be disabled for this to ...
0 votes
1 answer
27 views

PHP Serialize AWK command speed up?

I've built an SQL migration script that will replace text in a MySQL dump file. Replacements would be easy with sed, but we must account for special serializations (PHP Serialize). The code below ...
0 votes
0 answers
12 views

When is a new PHP-CGI process created?

My production server has been having a OOM issue. Upon investigating I find that a major memory eater is PHP-CGI processes. Each of my website, be it Joomla or Wordpress, is having 3 - 6 PHP-CGI ...
  • 199
0 votes
1 answer
53 views

Best practices for PHP ini settings for large wordpress site?

I own a large wordpress site that gets 500k+ visitors 30+ plugins (some heavy) server with 128 GB RAM Wondering if there are "best practices" for php.ini settings for larger sites on Linux?...
-1 votes
1 answer
70 views

How do you protect (PHP) source code from the web host?

So, you just created the next killer app, possibly in PHP. You have done everything to keep hackers out. There is no way they can steal the code! Except for someone from the web hosting company, of ...
0 votes
1 answer
26 views

Keep GitLab environment running in Docker container

I'm aiming to deploy an environment for testing. It's a PHP application, and I could simply serve the PHP files using the embedded server. My .gitlab-ci.yml is plain simple: docker_test: stage: ...
  • 101
3 votes
0 answers
106 views

TCP retransmission inside of docker network

Just lately our server started experiencing increased CPU usage by the php(Symfony) and mysql processes. For quite some time we been trying to find the cause and we found out that we have big amount ...
  • 133
0 votes
0 answers
27 views

php artisan schedule:run running twice by root and ubuntu user?

we are having a problem that kernel commands running twice. I checked if the schedule runs the command and if it exists more than once. I check with this command ps aux | grep "artisan schedule:...
0 votes
0 answers
52 views

Where would Caddy2 fit into our server (possibly AWS) architecture chain for enabling custom domains and subdomains?

I'm in the process of re-architecting our web application so that it's more scalable. One of the requirements is to allow customers to point custom domains AND subdomains at our site, which our ...
0 votes
0 answers
179 views

CentOS7 Remi-PHP81 Followed steps. PHP command not found

Trying to install and enable PHP in a CentOS VPS. Found repository information from Remi's RPM Repository - Configuration wizard. Followed steps to install and enable PHP81. But php -v gives command ...
  • 1
0 votes
0 answers
22 views

CentOS7 VPS: Install WordPress with existing MySQL and httpd

Requirement: Install Wordpress in CentOs 7 VPS Currently available: Apache : Server version: Apache/2.4.35 (IUS), Server built: Dec 8 2018 02:08:22 MySQL : mysql Ver 14.14 Distrib 5.6.47, for Linux (...
  • 1
1 vote
0 answers
56 views

Monitoring php command line worker with Monit Ubuntu 20

Problems monitoring php script using pid method. We have a Laravel worker script that must be kept running on the server: php /data/git/site/directory/artisan queue:work --daemon when this is run on ...
  • 11

1
2 3 4 5
157