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
2
votes
1answer
2k views

Can't get php+sqlite working

I'm struggling all morning to make php work with an sqlite database. Here is a piece of php code that I try to execute: #less /var/www/html/test.php <?php $db=new PDO("sqlite:/var/www/test....
0
votes
0answers
15 views

/var/lib/mysql taking up large amount of space

I have a very simple drupal project that I launched onto an AWS EC2 instance with 8GB of storage. However, something strange has happened and my EC2 ran out of storage. My mysql databases don't even ...
1
vote
1answer
2k views

make PHP curl use openssl instead of NSS

Does anyone know how could I force php to use curl with openssl instead of NSS on RHEL 6? I've installed curl-openssl-7.30.0-1.1.el6.x86_64.rpm but how can I tell php to use it? Actually is there a ...
0
votes
0answers
12 views

Could someone guide me through the use of symlinks in nginx for php modules?

so I'm running an ubuntu 20.04 server, with Nginx on it. After a difficult week, I managed to make it run normally, including php through php-fpm. My problem is that I don't want hundreds of folders ...
0
votes
2answers
3k views

Different php_value open_basedir based on domain name in .htaccess

I want to limit access to files using PHP open_basedir for multiple domains. Every domain sits in own directory, so I want prevent all domains PHP scripts from interfering with each other. How can I ...
1
vote
1answer
34 views

Cannot install lsphp74-imagick: unmet dependencies

I have an Ubuntu 20.04 LTS instance running on Amazon Lightsail and I have trouble installing lsphp74-imagick. $ sudo apt install lsphp74-imagick Response: The following packages have unmet ...
-1
votes
0answers
15 views

phpdox fail trying make the documentation of my php project. I develop php 8 Solutions on macos bigsur (11.5.1) [closed]

I am executing phpdox inside the xml directory: /Users/myusername/Sites/myproject/admin/doc/ My php files: /Users/myusername/Sites/myproject/ The xml file seems to be right. If you need more than the ...
4
votes
3answers
23k views

OpenSSL connection Error called stream_socket_enable_crypto()

in my php coding i have following line which uses by SWIFT MAILER Class if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { return false; } however ...
2
votes
1answer
3k views

tail /dev/stderr from errors within supervisord php cli script

To make this simple, I want to know if it's possible to access the STDERR like a channel. I don't want the data to log to a file and then tail the file because the amount of information that I want to ...
0
votes
1answer
2k views

Why Zabbix still says "At least one of MySQL, PostgreSQL, Oracle, SQLite3 or IBM DB2 should be supported."?

At begin of setup, Zabbix shows the following error: At least one of MySQL, PostgreSQL, Oracle, SQLite3 or IBM DB2 should be supported. I already have a site working, and this have connections to a ...
0
votes
0answers
19 views

How to respond to "NOTICE: Not enabling PHP 7.4 FPM by default." from system upgrade

I did a standard OS update on Ubuntu LTS (20.04) and the messages end with: Processing triggers for php7.4-fpm (7.4.3-4ubuntu2.6) ... NOTICE: Not enabling PHP 7.4 FPM by default. NOTICE: To enable PHP ...
1
vote
1answer
2k views

PHP with suexec/fcgid

httpd.conf file: LoadModule fcgid_module modules/mod_fcgid.so AddHandler fcgid-script .php FCGIWrapper /usr/local/php5 .php # manual MaxRequestsPerProcess 1000 FcgidMaxProcesses 200 ...
0
votes
1answer
2k views

Unable to enable mpm-event in httpd | centos 7

I am kind of new to mpm and all so please don't mind. I have a web server running 8 websites (php based) on it. And my RAM usage goes over 90 % and the swap usage goes over 80 %. And when i check ...
0
votes
1answer
2k views

VirtualHost Server Not Found

After modifying the httpd.conf to include my virtual host configuration: Include /private/etc/apache2/extra/httpd-vhosts.conf, I added the following to my virtual host configuration file: # # ...
0
votes
0answers
25 views

Apache with PHP FPM and requests spikes, how to set optimal configuration?

I was lucky enough that my website went viral, and the server of course wasn't ready for it. Unfortunately my setup is quite bad, a single server with Apache, PHP (Laravel), Mongodb and redis. The ...
2
votes
1answer
2k views

Error in osm data data import while nominatim installation

I am doing nominatim installation on my server. I run the following command ./utils/setup.php --osm-file /usr/share/osm2pgsql/planetfile/planet-latest.osm.pbf --all to import the pbf file and Few ...
0
votes
2answers
2k views

Showing httpd.exe application error on server

I am running an online examination website on my localhost server. When I have attached eight other machines to the LAN to conduct a test, it generate an error message: httpd.exe Application error ...
0
votes
1answer
2k views

Install memcache php ext on php 5.6

I have php 5.6.6 installed on Amazon Linux. I want to install memcache extension (not memcached server, we use Elasticache). I try # yum install php-pecl-memcache.x86_64 And get the following error: ...
2
votes
3answers
2k views

How can I display and log PHP errors on IIS7.5?

I running PHP 5.4.5 on an IIS 7.5 Server (under Win7 64) and i have problems making PHP errors visible. At the moment whenever i have a PHP error the server sends back a 500 error with the message "...
2
votes
2answers
2k views

Php-fpm process always running

I am using Nginx with Php-fpm (php 5.5 + opcode) for a very high traffic web site, php-fpm status endpoint to monitoring what going on. After a big traffic peak, 200 "active process" are still running ...
0
votes
1answer
66 views

Varnish doesn't open backend connection

How can I connect Varnish container with PHP-FPM + NGINX containers? Docker started correctly, site works but backendopen logs are empty. Backend is healthy (returns HTTP 200 status). varnishlog -g ...
0
votes
0answers
19 views

High CPU usage and random connection errors on shared CPanel reseller hosting [closed]

So, I had to change my webhosting provider because of a massive letdown from my last provider. But on the new host, my wordpress websites seem to be using too much RAM and CPU, which appears to be ...
0
votes
0answers
8 views

Strange issue with Pthreads - Why is there a delay in each new Thread Submit when opcache.enable_cli is disabled?

So for context, I am running PHP-FPM 7.4 on Ubuntu and I compiled it with ZTS. Then added the extensions Pthreads and ZSTD . I am running a few hundred tasks and I need them to spawn new php processes ...
2
votes
1answer
2k views

PHP version conflict in Amazon Linux EC2 instance

I've lunched a fresh instance from the AWS -> EC2 console panel. After that when I logged into the instance via SSH and executed the following line: (note I executed first the sudo yum update before ...
1
vote
2answers
1k views

unable to run generated python (selenium) script from PHP

I have an Ubuntu machine for headless selenium tests. I generate a python script in /var/www/tmp/random123name.py via PHP and execute them. The script works when run from command line user, fails ...
0
votes
0answers
17 views

Why is my PHP CLI Curl version different from curl and libcurl even if I try to force it with --with-curl flag during compilation?

I have compiled PHP after compiling Curl 7.73 . Curl -v shows me it's 7.73, and if I go to my web server and check phpinfo() output it's also 7.73 . However, the compiled php cli is showing me that it'...
3
votes
2answers
2k views

Setup secure shared hosting (Apache, PHP, MySQL)

So I'm setting up a shared hosting with Apache, PHP, MySQL and the biggest question mark is how to do with PHP, since there is a million options out there how to configure it securely. The plan is: ...
0
votes
0answers
93 views

slow php (php-fpm) (long apache php waiting)

I have an apache with PHP-FPM module, 8 CPU cores. Average CPU all together load is around 75% CPU mainly due MySQL see the screen. It is actually little bit smaller load now than usually. But ...
0
votes
0answers
16 views

bitnami server not run php file

I am learring web server. I install wordpress with bitnami apache2. when I enter url in web browser file php not working. Any this web root folder. I dont know why its not working. Please help thanks!...
2
votes
1answer
2k views

Nginx: config set up to make extensionless php pages work

I am trying to set up my first website with nginx and I cannot seem to make extensionless php pages to work. I would like my pages like /aboutme.php to appear as /aboutme or I would like to just ...
0
votes
1answer
32 views

Apache2 : 2 php versions in the same VHOST

I am migrating my app from PHP 5.6 to php 8.0 by having a front controller redirecting to my legacy app or my new app depending on the uri. I tried with alias and it works but I need to keep the exact ...
0
votes
2answers
3k views

memcached install issues with lib event on server

I've installed libevent on my server in the directory root/data/ and have i'm about to install memcached with ./configure –with-lib-event=/data/; make; make install However, after running a bit I ...
0
votes
3answers
3k 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, ...
0
votes
0answers
7 views

Use .procmailrc and php to write each individual message inside a file [migrated]

I am currently trying to setup my redhat server so that it creates an individual file containing each email I receive at its configured address. For now, I managed to do the following : Receive ...
3
votes
3answers
2k views

Windows Server 2008 IIS7 - page requests randomly hang or timeout

I've just installed a fresh copy of Windows Server 2008 x64 with IIS7 and PHP (fast CGI). However, I'm noticing that after moving my web site from a similarly specified machine to this one, I'm ...
1
vote
1answer
2k views

php-fpm: why do I have a process memory usage higher than memory_limit

I know that there are a lot of related subjects, but I did not found my answer. I have a dedicated server with 32Go of RAM (but I want php-fpm to use only 12Go max), and I have a php-fpm (7.2.13) ...
0
votes
1answer
69 views

What could cause blocked requests in IIS?

I'm using IIS on Windows Server 2016 with MySQL and PHP on two almost identical servers. I've recently noticed a slowdown on one of my two servers but it happens only when my site tries to execute ...
3
votes
1answer
6k views

Send mail service start error

I installed sendmail on CentOS based on some tutorial. When I start sendmail, it showing sendmail failed error. Here the following command result: systemctl status sendmail sendmail.service - ...
2
votes
1answer
3k views

Apache 2 Fast CGI php issue

I'm trying to set php5.6.23 as fast CGI on my server for using php7 as main version but in one of my domain, I get this error : The requested URL / was not found on this server. here is my vhost ...
31
votes
4answers
134k views

How To Change What Version of PHP Apache2 Uses?

Ubuntu 10.04, MySQL 5.1, Apache 2.2, and PHP 5.2/5.3: I just discovered that I am using the wrong version of PHP for a CRM application. Once I figured out how to make a simple phpinfo() script to ...
0
votes
1answer
21 views

Error: Could not start TLS. Please check your LDAP server configuration. on PhpLdapAdmin

We have a LDAP server and we use phpldapadmin to manage it. I have not used it since a long time and when I try to login with my admin user, I get the following : Could not start TLS. (LDAP Server) ...
2
votes
2answers
2k views

Cron getting timeout when attempting to access url (wget).

I'm sure this is simple and I've been digging but no answer is quite as specific as I need it to be. The goal is easy, have Cron hit a url on my server every 5 minutes. All of that is set up and ...
2
votes
0answers
17 views

Mac OsX (Vagrant 2.2.18) DNS lookup 5s latency

On a regular VM - Vagrant Box (LAMP) on Mac OS, while making a trivial call, there is a 5 Seconds DNS Lookup delay. Is there any reason for it or solution? Already installed BerlinVagrant/vagrant-dns ...
4
votes
1answer
3k views

"Unable to initialize module" fileinfo php-pecl-Fileinfo.x86_64

I have a brand new server server that I am trying to get setup up. This is a 64 bit machine that I can not install "fileinfo" or "memcache". I have uninstalled these and reinstalled them using yum ...
0
votes
1answer
1k views

Nginx isn't executing php files, while using H5AI

I'm trying to install H5AI on my Debian 8 server, I'm using NGINX and PHP7, when I'm trying to access to my adress (in this case share.chaton-poulpe-pieuvre.tk), it makes me download the file, it isn'...
2
votes
1answer
2k views

"phpsessionclean" systemd service won't run on Ubuntu 18.04 (after update from Ubuntu 14.04)

After we updated all of our legacy Ubuntu 14 servers to Ubuntu 18, the PHP session files stopped getting cleaned up. I am not sure this is caused by the upgrade itself, but all of our other servers ...
3
votes
2answers
2k views

Apache's "OPTIONS * HTTP/1.0" running 100% CPU - Runaway httpd process

I have this recurring issue where an httpd processes will randomly start running at 100% CPU. Often other httpd processes will join in, and it will continue until I restart Apache. Oddly, the thing it'...
1
vote
1answer
131 views

PHP 7.4 on Ubuntu 18.04 (bionic)

I'm having trouble getting PHP 7.4 to install on 18.04 now, as it seems to depend on a version of libc6 that is not available on 18.04. I have no tried building from source as I would like to avoid ...
0
votes
2answers
3k views

Apache authentification error

I've installed Apache 2.2 on my Debian-based distr (kernel 3.2.0-27) and apache2.2-common package with default configs. Trying to run simple script info.php I got the error found in /var/log/apache2/...
4
votes
5answers
5k views

Rewrite rule for nginx (Opencart)

Opencart has this URL structure: http://example.com/index.php?route=common/home http://example.com/index.php?route=account/register http://example.com/index.php?route=checkout/cart http://example.com/...

1
2 3 4 5
152