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.

1,970 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
0 answers
96 views

`hosts.allow` updated by PHP not working

Good afternoon, I am working in giving logged in user controlled FTP access. Reason: I don't want FTP access open to all IP addresses on the internet. What I am trying to achieve is when a user logs ...
King Horse's user avatar
0 votes
1 answer
688 views

Apache: Address already in use

Every time I try to start httpd on CentOS 7 on my Google VPS, the following message always appears. can you help me? ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/...
weekend's user avatar
0 votes
1 answer
1k views

Can not connect to mysql database using php script on AWS instance (LEMP)

I am learning AWS EC2 to host my website made on WordPress, Laravel and custom PHP scripts. I created a t2.small instance with ubuntu 18.04 as my OS. Then I read tutorials and Installed the latest ...
sanjay ojha's user avatar
0 votes
1 answer
896 views

Load Symfony Project in a directory with Apache

I have a Symfony PHP Application I want to run in a Windows server with Apache 2.4 Its files are stored in D:\Apache24\htdocs\project1\public Its entry point is D:\Apache24\htdocs\project1\public\...
VBobCat's user avatar
  • 101
0 votes
1 answer
208 views

503 service unavailable while trying to login through wordpress

I have no access to my site on Wordpress from any laptop browser I have. But it's possible to log in from other computers and I can access it from my phone. In the laptop browser, I type aomy.nl/wp-...
user3079696's user avatar
0 votes
0 answers
407 views

Server Become extremely slow after a few mintues of restart , CPU , Memory is okay

I am using Amazon LightSail with 2CPU, 8G of Ram and 160G of HDD. CPU load is not more than 20% and Memory is less than 50% , websites both Drupal and Wordpress are very fast at service restart or ...
Wayne Tun's user avatar
  • 101
0 votes
0 answers
234 views

PHP loaded in subdirectory has significantly slower TTFB than in root

I have two identical Azure web app services (IIS) running PHP 7.3, 32bit. On webservice1.com, I have installed Wordpress on the root. This has a TTFB of 225.24ms. On webservice2.com, I have copied ...
nathanfield's user avatar
0 votes
1 answer
489 views

Setting up Shopware 6 fails with PHP XML error

Currently setting up Shopware 6 Community Edition ( https://www.shopware.com/de/download/ ) on my Ubuntu machine. I followed these steps: https://docs.shopware.com/de/shopware-6-de/erste-schritte/...
Marvin Klar's user avatar
0 votes
1 answer
97 views

regular timeout error at certain time period

My system sends the data to Redis via web server and ultimately stacks it in Elasticsearch. The thing is that Redis connection timeout error occurs when the traffic is small. The error always occurs ...
Gwi Hyeon Jeon's user avatar
0 votes
0 answers
984 views

Debian 10 with PHP 7.3.4-2 - Call to undefined function curl_init()

I am running a VPS with Debian 10, Apache 2.4.38, PHP 7.3.4-2, MariaDB 10.3.15 and curl 7.64.0. On one of the hosted, older websites I am running a script that uses curl_init(); which fails with the ...
user avatar
0 votes
0 answers
311 views

Update SQLite3 in PHP

I just checked my server's PHP 7.3.8 SQLite and its way old, 3.7.17, compared to the latest SQLite 3.29.0. Is there a stable way to include the new sqlite into PHP? PHP.INI doesn't have any ...
Michael Chourdakis's user avatar
0 votes
1 answer
1k views

exim4 configuration with SMTP: daemon abandoned

I'm trying to configure exim4 to send emails on Debian 9. I have a SMTP server 192.168.202.22, which listens on port 25. (tested with telnet) I'm able to send email with telnet connecting to this ...
culter's user avatar
  • 1
0 votes
1 answer
555 views

How to remove the "301 Moved Permanently" text that shows up on the client side?

How do you remove the following text: 301 Moved Permanently. The document has been permanently moved. that shows up on our web site's home page? I have used a web crawler to identify what links ...
user533992's user avatar
0 votes
1 answer
281 views

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax

I update the security patches of Drupal 7. on changing view of one of my page i got this error (image attached). This error show only that particular page which affect the certain pages of website.i.e....
alok kumar's user avatar
0 votes
1 answer
277 views

Apache can't save files to mounted directory

I have bought WD myCloud storage and I have mount it to centos 7 by adding this line to fstab \\wd_mycloud_ip_address\shared_folder /backup cifs rw,suid,username=shared_folder_username,password=...
Jaifar Al Shizawi's user avatar
0 votes
0 answers
142 views

Blocking traffic direct to backend server haproxy

I have the following problem. I have set up a reverse proxy using HaProxy. Now there are still users accessing the Backend IP Direct. And thus (unprotected) accessing the infrastructure without the ...
M. Antony's user avatar
0 votes
1 answer
120 views

Apache random 403 errors

We are using php 5.4 and a custom php page . When there is concurrent 300 users for some of the requests it throws 403 forbidden. This page does not use db connection . The apache maxclients is set ...
Vidya's user avatar
  • 357
0 votes
0 answers
58 views

Getting no response when using POST method (URGENT)

I have 3 servers svrA, svrB, and svrC. svrA and svrB need to call a web service (http://example.com/api/consoleServices) hosted in svrC. Now the issue is sometimes I am able to get the response from ...
user avatar
0 votes
0 answers
165 views

mysql high CPU usage

I have 2 servesr both on a LAMP stack. Two servers running almost the same PHP code. And on the second server i have troubles with loading time, where ttfb is too high, sometimes it is up to 17 sec. ...
tttaaabbb's user avatar
  • 101
0 votes
0 answers
872 views

Very high load on nginx server and crashes occasionally

I have a active site built in Codeigniter on ngnix server with medium traffic. Occasionally the server cpu usage becomes very high and site crashes. After running top it looks like mysql is causing ...
user7408587's user avatar
0 votes
0 answers
343 views

apache/php not getting client certificates

We wanted to use client certificates in browsers for some of our users for machine identification. I set up a CA and and signed a client certificate which I installed in chrome. Then I set the ...
Hillel Millman's user avatar
0 votes
0 answers
414 views

How to reset 2FA on the phpmyadmin software?

I have been using 2FA (2 factor authentication) to log in into the admin panel but I recently resettled my phone which has the 2FA code due to certain problems. I tried reading through the phpmyadmin ...
joseph222's user avatar
0 votes
0 answers
102 views

How to debug strange HTTP/PHP server behavior (garbled text in some files)

This is a weird one. I'm administering a FreePBX server using their standard CentOS 7 based distribution running in a virtual machine. Every so often (usually a few months in between occurrences), ...
Dominic P's user avatar
  • 497
0 votes
0 answers
30 views

CLI & PHP: file running successfully but not creating or updating file

Running Ubuntu web server. I have a PHP script that creates a sitemap file based on database entries. If I run the file directly, it works and creates the sitemap.xml file as expected. I'm trying to ...
Aninemity's user avatar
0 votes
0 answers
1k views

WAMP Server: Apache PHPMyAdmin login screen not showing

I have recently setup a WAMP server (Windows, Apache, MySQL, PHP) and i'm having trouble setting up PHPMyAdmin. I didnt use XAMPP for any of this, i installed the services directly onto the server. ...
David Aeberhard's user avatar
0 votes
0 answers
308 views

Passing PHP headers to NGinx Proxy

I have nginx setup as a proxy in front of APACHE, which in turn talks to PHP-FPM. It turns out, nginx is cutting out (or better to say not passing through) headers that are set directly in PHP via ...
clops's user avatar
  • 213
0 votes
0 answers
3k views

SQLSRV PDO driver on PHP 5.6 with Docker

I am trying to move a legacy application (CakePHP 2.5.5) running on PHP 5.6 to a Docker container but I can't get the PDO driver for Microsoft SQL Server to work. I have been searching around for ...
Morten Twellmann's user avatar
0 votes
0 answers
263 views

SAFARI error white page with symfony and htaccess with php-fpm all work on chrome,IE, firefox

I have a problem i just finish and upload my site but he not work with safari got white page i check log [Thu May 16 07:56:17.534196 2019] [authz_core:debug] [pid 5671] mod_authz_core.c(820): [client ...
Jonny's user avatar
  • 1
0 votes
0 answers
581 views

nginx: Redirects URL's to extensionless pages not working on home page

I'm trying to automatically redirect pages with a PHP extension to a non extension page version e.g example.com/page.php to example.com/page. I've managed to get this working for all pages except my ...
turrican_34's user avatar
0 votes
0 answers
84 views

Liunx based Azure PHP App service is missing MYSQL Driver

I'm trying to host WordPress website on Azure Linux App service. I got this error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress I searched ...
Shady Mohamed Sherif's user avatar
0 votes
0 answers
164 views

Invoice Ninja Installation Possible Permissions Error?

I recently installed a new instance of Invoice Ninja on a CentOS 7 VM, I followed the documentation exactly, which outlines that I should follow this guide, which I did, however, I am presented with ...
derian00's user avatar
0 votes
0 answers
923 views

PHP is looking for php.ini in C:\php rather than C:\Windows

My monitoring software (Dynatrace) messed up php on my web servers. For some reason all of my IIS websites are loading the php.ini file from C:\php-5.4 instead of C:\Windows. From phpinfo(): ...
rando513's user avatar
0 votes
0 answers
482 views

In IIS 7.5, rewrite rule is not being processed - results in 404 error

We currently have a rewrite rule with the Match defined as: Req URL: Does not match pattern Using: Regular Expressions Pattern: &.*\.(css|gif|png|js|jpg|jpeg)$ Action Type: Rewrite Properties: ...
Barry Chapman's user avatar
0 votes
1 answer
2k views

What's the differences between PHP versions from pkgs.org and remi

I need to install PHP 7.3 on my CentOS 7.5 which already has PHP 5.4 and 7.0.27 versions but I saw difference in installing commands and since I'm not a professional I need to ask before begin ...
Hady Shaltout's user avatar
0 votes
0 answers
526 views

configure nginx for PHP in subfolder

I wish to serve an old app that lives in a folder - the folder contains everything needed - index.html, various .js and a "server.php" backend. index.html works fine, but I get 404 for the calls to ...
minisaurus's user avatar
0 votes
1 answer
1k views

What is causing our PHP script to stall?

I have a long-running CLI cron job written in PHP. After an inconsistent period of time, the script stops writing output to its log file, indicating that it has stopped executing. However, the script ...
rinogo's user avatar
  • 339
0 votes
1 answer
192 views

PHP-FPM stops seeing classes / functions at random

I am experiencing a strange issue with php-fpm (7.0.33). At random times it starts throwing errors like: PHP message: PHP Fatal error: Uncaught Error: Call to undefined function untrailingslashit() ...
Arkadiusz 'flies' Rzadkowolski's user avatar
0 votes
0 answers
66 views

Locating required service to restart

So my Centos 7 server had several php.ini files and i managed to locate the one my website using through the command php -i |grep "php.ini" And edited it, But now im lost trying to know the service ...
3lomahmed's user avatar
  • 101
0 votes
1 answer
191 views

PHP landing page on Apache server Cisco WLC controller

I have a landing page done on php along with SQL database for WIFI user registration along with Cisco wireless controller. The WLC is redirecting the user to the landing page for authentication / ...
medhatelashry's user avatar
0 votes
0 answers
3k views

even after apt-get update E: Unable to locate package php5-memcached

I received a error "PHP Fatal error: Class 'Memcache' not found in " so I tried to install memcache using the following command "sudo apt-get install php5-memcache" but it throws the following ...
Sugumar Venkatesan's user avatar
0 votes
1 answer
1k views

Postfix sends plain text emails from PHP but rejects html

After moving to another host my site stopped sending E-mails (UTF-8 HTML). But I'm still able to send text emails like these: echo test | mail -t [email protected] -s test php -r 'mail("[email protected]",...
oxfn's user avatar
  • 121
0 votes
0 answers
276 views

limit_req_zone for the whole PHP

I'm protecting wp-login.php via below rule: location = /wp-login.php { limit_req zone=one burst=1 nodelay; include fastcgi_params; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; } My ...
Serdar Koçak's user avatar
0 votes
0 answers
2k views

Automatically ban IP addressed using rule based on GET request

I'm setting up my first website on Ubuntu 18.04 using Apache and I've noticed the following in my apache error log on a daily basis: 94.102.49.125 - - [07/Feb/2019:11:32:55 +0000] "GET /muieblackcat ...
Jed's user avatar
  • 101
0 votes
0 answers
28 views

Python "alternate malfunction"

I have a web application that runs over a Centos Server. It was written in php and python. Suddenly without modification something starts to works in alternate and randomly way (one time fileB.php is ...
user31929's user avatar
  • 101
0 votes
1 answer
464 views

Migrate legacy PHP to PHP-FPM

I wonder if I could have some feedback from some people that did the migration from php to PHP-FPM. The issue I have is that I have lots of scripts on the service. Some written by customers and I cant ...
Thomas's user avatar
  • 1
0 votes
0 answers
92 views

nginx save every request every made including headers

I want to set up a nginx rule that will log every request ever made on my site including cookies. For example for a single php script I can get the full request body with this code: print_r($_SERVER);...
Born vs. Me's user avatar
0 votes
1 answer
136 views

Why does switching to secure folder (httpsdocs) break the PHP file upload function

Server version: Apache/2.4.34 (Unix) I'm trying to utilize an existing SSL certificate for several sub-directories of a domain, but the architecture for the domain separates out two directories for ...
Mitch Moccia's user avatar
0 votes
0 answers
291 views

php-fpm status shows listen queue 0 when it is delaying requests

I have a php-fpm server running on a high-traffic website (behind nginx). It is frequently reaching a point where the active processes are equal to the maximum number of processes, which is the most ...
user29745's user avatar
  • 159
0 votes
0 answers
25 views

All UNexisting files and folders redirecting except for those with php extension

I use the following directive for my application: location / { root "C:/Program Files (x86)/EasyPHP-Devserver-17/eds-www"; index index.php index.html index.htm; autoindex on; ...
Biker John's user avatar
0 votes
1 answer
4k views

Change http_host fastcgi param with nginx

Context: I've got an application that run under a given domain. But in some cases I need to run it under another domain than the domain it expect (I also change potentially the port). I'm trying to ...
Nek's user avatar
  • 131

1
21 22
23
24 25
40