All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

How to install mcrypt for PHP 7.4 on Aws Linux 2?

I'm trying to install mcrypt with yum install php-mcrypt but run into this dependency error: Error: Package: php-mcrypt-5.4.16-9.el7.x86_64 (epel) Requires: php(api) = 20100412-64 installed: php-...
Xander's user avatar
  • 101
0 votes
2 answers
356 views

How do I install PHP 5.5 on a new version of CentOS or Amazon Linux or Redhat or Ubuntu?

I just joined a new company. I've been asked to build a CI/CD pipeline for a Laravel app. It is very fragile. It was built for PHP 5.5 and it breaks when they've tried to upgrade to 5.6 or 7. They don'...
charlottesville's user avatar
0 votes
1 answer
490 views

How to identify cause of sudden CPU utilization

I have a production server for a web application configured in AWS EC2 instance. I was running this for years and suddenly since today morning it is showing some spikes in CPU usage and application ...
Prasad Rajapaksha's user avatar
2 votes
2 answers
429 views

phpMyAdmin missing php-xml

I have an instance on AWS (Amazon Linux 2). I installed lamp on the server and access the phpMyAdmin. And I get this error: Composer detected issues in your platform: Your Composer dependencies ...
CHOO YJ's user avatar
  • 131
1 vote
0 answers
763 views

AWS EFS plus PHP painfully slow possible alternatives?

i built an highly available and fault tolerant Wordpress site on AWS Cloud, i using ubuntu 20.04 and apache2.4, /var/www/html is mounted on EFS filesystem configured whit provisioned troughtput at ...
EricDrvn's user avatar
1 vote
0 answers
355 views

Memcached crashes / spikes to 100% CPU with EC2, Nginx

I have a strange issue with PHP 7.4, Nginx, PHP-FPM and Memcached on EC2 Randomly the server will spike from 1% CPU to 100% and continue using everything it can until I reboot it. Rebooting just the ...
Brandon Ingham's user avatar
0 votes
1 answer
4k views

How do I allow WebSockets connection with HTTPS in AWS EC2

I have a chat made with the library RatchetPHP, but I don't know how to allows websockets connection with https, my chat works only with http, when I try to use with SSL, it give me error in G Console:...
Paula Silva's user avatar
0 votes
0 answers
32 views

How many requests can a PHP web server handle per second? [duplicate]

Given the following: I have an AWS EC2 t3.small instance. The instance uses the most recent Ubuntu LTS as its operating system. The instance has 2GB RAM and 2 CPU cores available. I have installed ...
tom923479744's user avatar
1 vote
0 answers
106 views

Owners, groups, permissions for PHP & SSH access in AWS EC2

For a while now I have been searching the web for answers to the following, yet seem to be becoming more confused with the various answers to others' similar questions. My environment: AWS EC2 linux ...
krot's user avatar
  • 13
2 votes
2 answers
1k views

Struggling to enable SSL on an old EC2 Instance running Apache & Amazon Linux 1

Title Hi. I've been struggling to find out why my EC2 Amazon Linux (1) Instance isn't serving my site at the https:// address, even though I've confirmed that the SSL is configured, per https://www....
anonymoose's user avatar
0 votes
1 answer
1k views

server crash please help urgent (php sessionclean)?

This morning my server went down for about an hour I'm using ubuntu 16.04LTS on AWS EC2. some info: it's a t2.medium instance, I recently upgraded from ubuntu 14.04 to 16.04, updated lots of packages,...
paul9494'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
3 answers
2k views

apache2.4 can't resolve virtual host configuration

I'm setting up apache2.4 at example.org and we have 2 sites configured. Site 1: <IfModule mod_ssl.c> <VirtualHost billingtest.example.org:443> ServerAdmin web@sad....
Igor Retesz's user avatar
1 vote
1 answer
687 views

Upgrade PHP version from 7.2.13 to 7.2.15 in Ubuntu 16.04

I want to upgrade the PHP version in my Ubuntu instance. I run below commands. $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update Then I run; $ sudo apt-get install php7.2.15 But it ...
Dumi's user avatar
  • 111
1 vote
1 answer
231 views

Developing with Git and SSH access on AWS Elastic Beanstalk

We are using EC2 to develop one of our application and we are using Git and SSH to access our EC2 server and deploy files. Unfortunately, AWS breaks some data, changes IP addresses and make other ...
Epsiloncool's user avatar
5 votes
2 answers
371 views

Amazon EC2 instance is getting spammed with different PHP filenames

Our server has been attacked recently and looks something like the following in the logs: [Mon Feb 18 09:18:43 2019] [IP_ADDRESS] script '/var/www/ynm.php' not found or unable to stat [Mon Feb 18 09:...
WKFY's user avatar
  • 51
0 votes
1 answer
2k 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....
Hari's user avatar
  • 1
1 vote
0 answers
209 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
Shardj's user avatar
  • 111
3 votes
1 answer
674 views

Why may AWS t3.micro in Singapore respond slower than t2.nano in N. Virginia from Bangladesh?

I have a t2.nano instance running in North-Virginia availability zone (us-east-1) for almost 1 year. In hope of reducing latency, I just have deployed the created AMI of that instance to a t3.micro ...
Touhid's user avatar
  • 131
0 votes
1 answer
964 views

Laravel Forge: Unable to create AWS EC2 instance in London Region

When I try to create a server on Laravel Forge for AWS in the London region I get the following error message: Whoops! There were some problems with your input. The server provider was unable ...
Zander Rootman's user avatar
1 vote
1 answer
169 views

ec2 out of memory from apache random spike

Over the past year, we had consistently random spikes which caused apache to use all the memory and swap out. Server Uptime I have an example of the latest crash (5:30AM - 12:00PM UTC). OOM Kernel ...
ruiyang's user avatar
  • 11
0 votes
1 answer
491 views

Why does WordPress on 3 load balanced EC2 servers run out of memory/fpm child processes and crash?

The problem: 30-40 minutes after pointing the DNS from our old server towards our new server, all available memory gets used up and our (3) load balanced EC2 instances crash. To make matters worse, ...
rugbert's user avatar
  • 93
2 votes
0 answers
443 views

Trying to run php-fpm 5.6 alongside php7.2 for different Apache virtual hosts on EC2 amazon linux , what am I missing?

I'm working on amazon linux on an EC2 instance. I installed php72 using yum, apache worked fine. I have installed php5.6 at /opt/php5.6 configured it as fpm and done the make install whcih all went ...
Tofuwarrior's user avatar
0 votes
1 answer
614 views

Installing Apache2 / PHP on AL2

I've installed Apache2 and PHP as follows: sudo yum install -y httpd.x86_64 sudo amazon-linux-extras install php7.2 I'm not able to find a libphp7.so module to load within Apache2. I loaded the ...
Kermit's user avatar
  • 71
3 votes
2 answers
12k views

PHP-FPM Cannot Get UID For User

I have setup an AWS EC2 linux instance and installed the following: httpd24 php71 php71-fpm php71-mysqlnd mod24_ssl fcgi mod24_fcgid I am wanting to run apache 2.4, php 7.1 and php-fpm. In the below ...
Harpua's user avatar
  • 73
2 votes
3 answers
7k views

php-mcrypt package missing from yum on AWS AMI

Seems like new versions of the Amazon AMI on EC2 don't have the php-mcrypt package available. How do I get it? $ sudo yum install php-mcrypt Loaded plugins: langpacks, priorities, update-motd amzn2-...
Meekohi's user avatar
  • 121
0 votes
1 answer
789 views

How do I upgrade PHP across EC2 instances in an AWS launch configuration?

Unfortunately I wasn't the one to set up this infrastructure so I'm lacking on some really basic concepts here. We're using AWS Launch Configurations to manage EC2 instances, and I'd like to upgrade ...
Rail24's user avatar
  • 111
0 votes
1 answer
58 views

Low req/s ratio on EC2 machine on PHP Hello World

I’m having a problem with AWS. Im using Elastic Container Service that is created as on link https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html Instance type ...
Ante Braovic's user avatar
0 votes
1 answer
736 views

Display plain PHP code

I am using Amazon EC2, CentOS 7 x64_86, 1GB RAM. (1) Run command php -v result PHP 7.0.24 (cli) (built: Sep 30 2017 10:10:28) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, ...
Vy Do's user avatar
  • 151
2 votes
1 answer
322 views

AWS Amazon AMI EC2 get memory usage with php for shell exec

Apologies for the rookie question would really like some advice on best practice regarding my issue. I have ffmpeg installed in my box and I am running a simple script that converts a .mp3 to a .wav ...
user1503606's user avatar
1 vote
0 answers
422 views

try_files serving fall back before previous condition

Bear with me as I'm new to this. I've put together an nginx server configuration that was working great until I noticed it wasn't throwing 404 errors when applicable. So I added to my try_files ...
winabun's user avatar
  • 13
0 votes
1 answer
772 views

I can't ssh into my ec2 instance, says server closed connection

I have no idea why this is happening but everytime I ssh into my ec2 linux instance using any of my ssh clients(putty, mobaxterm, winscp) i get this error: Server unexpectedly closed network ...
linuxz's user avatar
  • 1
0 votes
0 answers
1k views

Next steps after installation of MSSQL ODBC 13.1 on Amazon EC2 Linux

Was able to install the Microsoft ODBC driver 13.1 and mssql-tools on Amazon Linux after quite research. It automatically installed unixODBC-2.3.4 as dependency but not sure what is the path where it ...
Mrudang Vora's user avatar
2 votes
1 answer
4k views

AWS EC2, Apache, PHP: php_network_getaddresses: getaddrinfo failed

Running PHP 5.6 on an EC2 instance with Apache 2.4.18, I'm occasionally seeing errors in the log when trying to connect to an RDS database: PDO::__construct(): php_network_getaddresses: getaddrinfo ...
Marcus Ilgner's user avatar
4 votes
2 answers
11k views

Installing ODBC driver 13 for MSSQL Server in Amazon Linux on EC2 instance

Problem: Need to access and execute the MSSQL Stored Procedure from PHP code. Version details: Local development machine - Windows 10 with XAMPP with PHP 7 Production system - Amazon AWS AMI Linux ...
Mrudang Vora's user avatar
-7 votes
1 answer
79 views

AWS S3 EC2 EBS Confusion [closed]

Currently when a user uploads a photo / video i upload it in root directory of my website. /var/www/mysite/pics/hash/example_filename.jpg and /var/www/mysite/videos/hash/example_filename.mp4 I'm ...
Edward Snowden's user avatar
0 votes
1 answer
1k views

error 404 in curl/file_get_contents/get_headers: “failed to open stream”

After isolating my problem, I am testing my API with the following code: $url = 'http://example.com/api/myendpoint; print_r(get_headers($url));die(); Sometimes it does works, but sometimes ...
Matheus Oliveira's user avatar
2 votes
1 answer
1k views

PHP require not traversing up directory on AWS EC2 Instance

This was working without issue but after running a system update on EC2, I noticed I was getting the following error and no matter what I do I can not resolve this. It just doesn't seem to move up a ...
curv's user avatar
  • 123
1 vote
1 answer
731 views

Best manner to access files in S3 Bucket from EC2 instance

I have tried several packages (goofys, s3fs, fuse) and have not been able to find a solution to my problem. I have an S3 Bucket with several thousand files currently in it and will continue to grow. ...
Steven K7FAQ's user avatar
2 votes
1 answer
772 views

Laravel EC2 Nginx PHP 7 scripts downloaded instead of executed

The php scripts are downloaded on Amazon ec2 server with nginx installed instead of being executed. This is my nginx conf file: user nginx; worker_processes auto; error_log /var/log/nginx/error.log; ...
fflorin's user avatar
  • 21
2 votes
2 answers
4k views

PHP and MYSQL on Amazon EC2 server

I am trying to set up an amazon server to display my php files for a final for one of my classes. I followed this tutorial for setting it up and when I try to run my code I get "Fatal error: Class '...
user320422's user avatar
2 votes
1 answer
1k views

Symfony No Access to Cache - Red Hat 7

I'm running amazon EC2 VPC, normaly use Centos and I have no problem with it, but I have tried Red Hat Enterprise Linux Server release 7.1, and I have installed everything from scratch. I'm using ...
user avatar
0 votes
0 answers
767 views

After install mod_security and mod_evasive, php not working

I followed this tutorial ( tutorial.centos.com.my/?p=69 ) and got success to install mod_security and mod_evasive. But php does not run, displays the code in the browser. Insert an index.php file in ...
Tiago Souza's user avatar
0 votes
0 answers
381 views

RDS connection blocked despite security group "Allow all traffic, all ports, all IPs"

I can only connect by ssh-ing into my ec2, and then using mysql from the cli. I can not connect: ssh-ing into my ec2, and connecting from PHP mysql command line on my local machine. I cannot ...
Jordan Warbelow-Feldstein's user avatar
1 vote
0 answers
247 views

Changes done on EC2 instance took effect after restarting the server

I'm working on a website that i built with codeigniter framework. I'm using amazon EC2 instance since last 1 month. Today while doing some work i found that changes done in PHP files are not ...
Deepak's user avatar
  • 111
2 votes
1 answer
687 views

Permission denied to connect Mongodb with PHP on EC2

I can't connect to the remote EC2 server with PHP because I got permission denied. However I could connect remotely by command line from the same server so it seems the firewall settings are fine and ...
t.fazakas's user avatar
-3 votes
1 answer
1k views

How to upgrade PHP version in multiple AWS EC2-Instance?

Can we upgrade versions in multiple EC2-Instance at the same time? For example let’s say I’ve ELB connecting with two EC2-Instance. Instance A (running PHP 5.3) Instance B (running PHP 5.3) Here if ...
FR STAR's user avatar
  • 173
3 votes
1 answer
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 ...
FR STAR's user avatar
  • 173
3 votes
0 answers
171 views

Tuning Amazon Linux worker tier

I have a worker tier that is using PHP process control (pcntl) functions to send multiple requests to the SNS service in parallel. My question is how best to tune MPM_PREFORK directives to get the ...
Mike Miller's user avatar
1 vote
0 answers
138 views

Amazon IP no longer allowing MySQL connection (Error 104)

I am working on a group project that uses an Amazon EC2 server for hosting phpmyadmin. We have a PHP/MySQL website hosted on my school's server that makes database connections to amazon. Recently one ...
user270568's user avatar