Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 vote
0 answers
26 views

docker-php-ext-install recently failing in a php7.1-fpm image

Im having some issues recently .. About 3 days ago my installs just docker setup is failing each time im running it ... Its been working perfect before this, unfortauntly due to work, im unable to ...
2 votes
1 answer
19k views

File upload permissions issue on Windows Server 2008 R2 IIS 7.5 PHP 5.3 with Drupal v.7.26

I have website on Drupal version: 7.26 OS on server is Windows Server 2008 R2 Web server $_SERVER["SERVER_SOFTWARE"]: Microsoft-IIS/7.5 Server API: CGI/FastCGI Core PHP Version: 5.3.28 file_uploads: ...
2 votes
3 answers
129 views

Why is my Azure Database for MySQL slow at first

I created a SaaS product. I am using PHP 8.3 with a MySQL 8.0 database. Locally this is very fast! No frameworks etc are used. Production runs on Azure. I have the following setup on Azure: Database ...
0 votes
1 answer
6k views

Configure php mail() on Windows/IIS

I have a Windows Server 2003 / IIS web server running various application servers, and ended up begrudgingly adding PHP into the mix. I know Win/IIS isn't the ideal environment for PHP, but it's what ...
0 votes
0 answers
19 views

Long running PHP script get terminated and other separate PHP cmd line processes as well

Env: Ubuntu 22.04.4 LTS PHP 8.1 CMD line scripts started with the & and left to run in the background I have 3 separate PHP scripts which I started from an SSH session and are placed in the ...
0 votes
1 answer
9k views

Nginx throws a 404 error when trying to access a CodeIgniter (PHP) controller

I'm trying to use CodeIgniter with Nginx. I'm on development so I'm running on localhost. This is my /etc/nginx/sites-avaiable/default file: # You may add here your # server { # ... # } # ...
0 votes
0 answers
21 views

Firefox generating two sessions in PHP

I am trying to record session ID's in Mysql database using PHP. In firefox, when I load a page, it records two different session ID's at the same time. However, in Chrome it only generates a single ...
2 votes
2 answers
6k views

PHP - does curl run asynchroniously on my system? [closed]

I'm building a web app. I have a database of books indexed in ElasticSearch and REST API written in PHP. In the app, there's a search box, where I type a name of the book and JS script calls the ...
1 vote
0 answers
56 views

Anonymous Authentication Identity Win 2012 r2 security

I have a web app that uses PHP on the back-end, and the PHP executes powershell scripts to reset AD passwords through system calls. EX: shell_exec("powershell.exe -file C:\inetpub\wwwroot\script....
0 votes
1 answer
7k views

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.(while selecting multiple columns)

am using apache 2.2.i have written this code when am trying to run it my browser is failing to run it ,it's showing This webpage is not available The connection to localhost was interrupted. Error ...
0 votes
1 answer
48 views

nginx proxy php, how to set the access address as a subpath for php

I have a domain name, assuming it is "example.com". The backend nginx has already proxy a tomcat. The proxy domain name is "http://www.example.com/", which will jump to the tomcat ...
0 votes
2 answers
32 views

postfix error handling to not lose the mail

I have a website with a form. When submit the form php sends a mail to a local gateway. php code looks like this: $ok = @mail($emailData['to'], $emailData['subject'], $message, $emailData['headers']); ...
2 votes
2 answers
4k views

Why is PHP -> MSSQL very slow when the DB is not on the same machine as the PHP code

In the course of trying to move our website to Azure, we've found a problem with our PHP code talking to MSSQL. On the current dedicated host (hosting both the PHP and the DB), going to a page ...
0 votes
0 answers
37 views

Nginx + php-fpm "504 Gateway Time-out"

During some long operations that generate many PDF files, the CRM application goes into "504 Gateway Time-out" for ALL people that are using the CRM (remote and local people). I'm always ...
0 votes
0 answers
19 views

Outdated PHP 7 version with Google App Engine

I received the attached message for App Engine that PHP 7.4. will no longer be supported by Google from July 2024. Can someone tell me if there is a way to extend this deadline and how? Are there ...
1 vote
3 answers
4k views

how to keep file and folder permissions from changing

I have a directory of files and folders that are added and removed and the permissions that I had set keep changing. How can I permanently keep the permissions on a specific path so that no matter ...
-1 votes
5 answers
4k views

mpm_prefork:error Cannot allocate memory

I was using a website called loadimpact to test how my php application would perform under a big amount of access. I did one really small test with only 50 virtual users accessing at the same time, ...
1 vote
2 answers
4k views

PHP NginX - Output Buffering - Video Streaming

(Since it contains some coding but also it's concerning nginx configuration i think it would be the best to have it in serverfault). I have some Video Files in my Server that are stored in a folder ...
0 votes
1 answer
69 views

Apache PHP 8 keeps getting disabled

I have an Ubuntu Linux server (20.04) running Apache2 version 2.4.41 $ apachectl -v Server version: Apache/2.4.41 (Ubuntu) Server built: 2024-04-10T17:46:26 with PHP8 enabled in /etc/apache2/mods-...
1 vote
1 answer
4k views

Shibboleth does pass attribute to server variable in PHP

I am building a SAML based federated authentication mechanism in which the IdP is ADFS 2.0 and the SP is Shibboleth running on Linux. I am able to do the following: Attempt to access a protected ...
0 votes
1 answer
5k views

PHP script gives "failed to open stream: Permission denied" unless permissions allow public write

I have a php script in a directory called /manager. In it, I open and write to a file in the directory above /manager. However, if the permissions are set to allow owner write, I get "failed to open ...
0 votes
1 answer
6k views

PHP and Nginx on docker, curl get Connection refused in php container

I am working in a local environment with docker. I have an nginx web container and a php container which are in the same network. I build the php container from my own dockerfile (with phpfpm and ...
1 vote
1 answer
4k views

Getting libssl abd libcrypto conflict warning while compiling php on RHEL 7.8

I m getting following warning messages while compiling php on RHEL7.8 I am able to successfully compile and install php but I am not sure what will be the side effect of these warnings. Is there any ...
0 votes
1 answer
38 views

PHP Opcache Full, But can't work out why

Our production server says the op cache is full and it's not adding anymore scripts to the cache. Even though the configuration / statistics should. The config is set to the following. [opcache.enable]...
1 vote
1 answer
89 views

Correct way for creating apparmor hats in separate file

I'm trying to re-enforce the security of my LAMP config In my configuration, each website consists in : One Unix account One MySQL database accessible only from one MySQL account One VirtualHost ...
0 votes
0 answers
29 views

Nginx config rewrite .php working but forms broke

I am having trouble with the Nginx default config for my website. My PHP website runs on a linux azure machine, which uses nginx. This is currently my config: server { #proxy_cache cache; #...
0 votes
0 answers
26 views

Duplicated WP Multisite for testing environment is redirecting to production site

My goal is to have a test.example.de testing environment for my www.example.de WP Blog. Sadly, the site is still redirecting me to the production-site. My subdomain is registered as a CNAME with a TTL ...
2 votes
1 answer
4k views

Secure PHP on IIS 8.5

I'm using IIS 8.5 on Windows Server 2012 R2 to host ASP.NET and also PHP-Applications. Because there are a few different PHP-Apps, I want to restrict the access by using open_basedir. The problem: ...
0 votes
0 answers
22 views

apache2 seems stuck on fetching simple server-side-cached content

i've got a server up at https://nicer.app which recently became buggy in as much that it takes up to a minute for the background image to content to be shown. i wonder what if anything i did wrong ...
0 votes
3 answers
1k views

Errors installing the Curl library with PHP/Apache/Windows

I'm having a hell of a time getting Curl to work with PHP/Apache on my Windows XP 64-bit development box. I have PHP and Apache successfully installed, but when I tried to enable Curl I get the ...
15 votes
6 answers
39k views

Nginx - Route all requests to single script

I have a PHP script that handles script routing and does all sorts of fancy things. It was originally designed for Apache, but I'm trying to migrate it to nginx for a few of my boxes. Right now, I'm ...
0 votes
2 answers
213 views

PHP sock linked to update-alternatives choice?

In my nginx configs, I point to PHP as /var/run/php8.3-fpm.sock. Because there is a specific version in that path, using update-alternatives does not change the PHP version my websites use. How do I ...
0 votes
1 answer
140 views

PHP_FPM extensions not loading in Apache

I'm building out a web server on Rocky Linux 9 with Apache and PHP 8.3. I need the pdo_dblib extension. From the command line via "php -m" and "php-fpm -m", I see that the ...
0 votes
2 answers
3k views

Change in php.ini not reflecting PHP Memory_Limit Master Value

I am trying to install a composer package for AWS S3 integration and came across the Composer Out of Memory issue. Upon checking phpinfo() I could see the loaded php configuration file is /etc/php....
0 votes
1 answer
59 views

Check if package exists in repository that is not on my sources.list?

TL;DR: How can I check if a package exists in a repository that's not on my sources.list? What I want: Most answers I'm finding assume the repo I need to check is already in my /etc/apt/sources.list. ...
107 votes
2 answers
129k views

Differences and dis/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM

There are few different php "wrappers"(?). What are differences between them? Tried to google some, but cant seem to find informations. (mod-php is not googleable). Why might I choose one over ...
0 votes
1 answer
28 views

Apache2 Not Running Custom PHP App After Uploading to /var/www/html folder

I am installing a software that I bought. It's in PHP. So, I got a DigitalOcean server(ubuntu 22.04). Installed Apache2 and PHP 8.1. Now, when I upload files to /var/www/html folder, it does nothing ...
0 votes
1 answer
2k views

How do you upgrade mysql 4 to 5?

Ok so im fairly new to this and i know some of you will point my to mysql page but im having a hard time finding specific and explicit directions on saying "To upgrade..do this..do that..done" and ...
0 votes
1 answer
9k views

Nginx + PHP index.php not found 404

I'm running debian 9 with nginx 12 and php7.1 I've set evrrything up. Nginx does not give me anything in error log, all the PHP scripts are working 100% fine. Nginx indexes index.html as index but ...
0 votes
0 answers
62 views

version 10.6.6 when the installed package is version 3.2.6

I've built php 8.1 from source. one php app uses mysqli extension I get this warning: HP Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:100606 Library:...
1 vote
2 answers
431 views

What determines the name of Apache PHP Handlers?

When configuring an Apache server to use a Handler to run PHP code, I'm familiar with adding a line similar to below in httpd.conf or .htaccess: AddHandler application/x-httpd-php81 .php This tells ...
0 votes
0 answers
19 views

Laravel Form Set Default Selection

@section('page-action') {{ Form::select('item_type', $product_type, null, ['id' => 'item_type', 'class' => 'form-control select ', 'required' => 'required', 'placeholder' => 'Type de ...
8 votes
2 answers
17k views

What does ALPN, server did not agree to a protocol mean?

I see this quite regularly when using various calls in curl. I'm not sure if its the root cause to some of my returns resulting in error 400 but as a newbie just curious more than anything.
0 votes
2 answers
3k views

How is php-fpm socket folder ({/var,}/run/php-fpm) created on Linux?

I am setting up multiple php versions on CentOS7 (native and from remi repos). As installed, the native php-fpm ( is setup on a unix socket, while the (remi) php74-php-fpm would listen on a TCP socket....
1 vote
1 answer
6k views

Unable to run python script from PHP

This particular question has been asked so many times with great suggestions but the sudden abandonment by Askers doesn't really help as they never bothered to return to tell what worked (assuming it ...
0 votes
0 answers
97 views

WP rest api and litespeed incompatibility

I have tried everything i could think of and searched on the on Internet for the last few days i'm spending ~10 hours per day trying to diagnose this. the issue: in WP Site Health i get: The REST ...
-1 votes
1 answer
356 views

Nginx error "upstream prematurely closed FastCGI request while reading upstream" with generated file download

I just spent the whole day trying to figure out this error. We have a PHP script that generates a file for download. After upgrading nginx (1.16 -> 1.24), this script suddenly started randomly ...
-1 votes
1 answer
2k 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
4 answers
8k views

How to set custom $_SERVER variable for PHP

I'm working on a PHP web app which ALSO has some command line tools. I need the command line tools to detect the environment so that they connect with the correct DB credentials etc. The web app does ...
1 vote
0 answers
25 views

Server forbids access to any URL ending in .php (even nonexistent ones) with "client denied by server configuration", but identical html files are OK

I'm trying to enable some php files on an Apache 2.4 machine that has no other php content. I'm finding that any php URL (even made-up URLs for nonexistent things) results in the error "client ...

1
2 3 4 5
159