Questions tagged [php]

PHP is a widely-used general-purpose scripting language that is especially suited for Web development. Questions about programming in PHP are off-topic and should be asked on Stack Overflow.

Filter by
Sorted by
Tagged with
0 votes
1 answer
928 views

Installed php74-php-mysqlnd but module is not available

I am setting up a clean CentOS 8 server and installed PHP using the Remi repositories. In there, it also has a php74-php-mysqlnd package that should be installing the correct .so files, but I do not ...
Bart Friederichs's user avatar
1 vote
1 answer
67 views

How to create a console that act as a server?

I am a computer science student working on my capstone project. My team is building a vehicle renting system. In this system, user can book and rent a car they like on a specific date range. We are ...
Jeff's user avatar
  • 11
0 votes
1 answer
3k views

Uncaught Error: Class 'PDO' not found

I had a perfectly working installation, but needed to upgrade PHP 7.3 to 7.4 due to EOL. Since then, I have an error : Fatal error: Uncaught Error: Class 'PDO' not found in /usr/local/www/nextcloud/...
Xavier Humbert's user avatar
0 votes
1 answer
106 views

Check if file crontab runs

I've set up crontab tasks to be executed every min. * * * * * sudo /usr/bin/php /root/scrapers/terra_plf/terra_swap_api.php I see its log in var/log/syslog file: Jan 3 15:14:01 clearthefog CRON[...
Igor Savinkin's user avatar
0 votes
2 answers
1k views

All CWP accounts and domains stuck on Account Suspended

Woke up and saw all domains saying "Account Suspended" while I am the admin and domains are all in default account and toggles are all On. Did try toggling the "Suspend Account" ...
Code Bounty's user avatar
0 votes
0 answers
160 views

Cannot update PHP 5.4.16 to PHP 7.3

I am using RedHat Linux 7.9. I am trying to upgrade PHP 5.4.16 to PHP 7.3 commands I find in blog posts and questions, don't work for me. For instance: [root@username src]# php --version PHP 5.4.16 (...
Goku's user avatar
  • 101
0 votes
1 answer
124 views

Crontab task does not work, Linux, Debian

At a Debian server I've set a crontab task using crontab -e with the following content: */2 * * * * /usr/bin/php /root/scrapers/terra_plf/terra_swap_api.php Why doesn't it work? When I run the same ...
Igor Savinkin's user avatar
0 votes
2 answers
969 views

Indent of array in method in phpStorm

phpStorm is formatting arrays in method calls like this (auto code formatting): $address = new Address([ 'full_name' => $fullname, ]); I expect it ...
Daniel W.'s user avatar
  • 1,982
0 votes
1 answer
3k views

Downgrade PHP Version

I am running PHP 8 in Linux Mint 19.1. Now I need to run PHP 7. How can I do that ?
abu abu's user avatar
  • 161
0 votes
1 answer
58 views

auditctl - file being created on server

I have a situation which I need help with. I appreciate any feedback and help. a file wp-signups.php is being created automatically in public_html. If I deleted the file, it is instantly recreated. I ...
virap's user avatar
  • 1
0 votes
0 answers
1k views

Debian can't update after i installed php 8.0

Err:1 https://packages.sury.org/php bullseye InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the ...
xliben's user avatar
  • 1
1 vote
0 answers
41 views

LAMP Stack refresh rate is poor

I'm using LAMP on Linux(Debian). Earlier I used WAMP on Windows. Whenever I saved the PHP file and tested on the browser, it immediately takes effect. However, in Linux, the LAMP takes too much time ...
Alfred Joe Jr's user avatar
0 votes
0 answers
1k views

Directly call index.php instead of try_files

I got this construct which works, but is clearly suboptimal. I tried to follow this guide, https://www.getpagespeed.com/server-setup/nginx-try_files-is-evil-too, but the configuration for php, is ...
user5542121's user avatar
0 votes
0 answers
443 views

Can't connect to MySQL from PHP script running on the PHP builtin server (localhost)

I am trying to connect to the MySQL service provided by XAMPP (screenshot) through a PHP script that runs on the builtin PHP server (I started the server through php -S localhost:4242 in the folder ...
Darius V.'s user avatar
0 votes
1 answer
280 views

Invalid command when enable php-fpm

I can't seem to enable php fpm. The error is. Invalid command ';;;;;;;;;;;;;;;;;;;;;', perhaps misspelled or defined by a module not included in the server configuration Which is strange, given the ...
Liso's user avatar
  • 69
1 vote
0 answers
68 views

Which Winlogon session is attached to the sound device?

I want to select and play music stored in my Windows 10 Home PC from mobile devices connected by home WiFi network. There's an Apache webserver running on my PC as a service logged on Local System ...
vitsoft's user avatar
  • 111
0 votes
0 answers
47 views

How to prevent GUIs picking up an outdated version of PHP

I am working on a PHP project with Composer. The project runs in Docker which has PHP 7.4. On my system, I also have MAMP and I've put a symlink into my ~/bin which is in my $PATH so that when I do ...
joachim's user avatar
  • 798
1 vote
0 answers
364 views

Remove ionCube from CentOS server

Someone in our workplace encrypted some files with ionCube in our main code repository, I can't find any file related on how to remove this extension/module or whatever it is when I look to our PHP ...
Eduardo Medina's user avatar
-1 votes
1 answer
259 views

Wamp missing PHP and MySQL configuration

I have installed Wamp which I used also on other PC. Previous version had full of options to configure PHP, MySQL, PhpMyAdmin like version, extensions. But this Wamp package does not have anything. I ...
Čamo's user avatar
  • 345
0 votes
0 answers
3k views

How to disable error reporting in PHP (nginx)

This is not the first time someone asks this question, but I went through all the similar cases I found and could not resolve this issue. I am running a local development environment, with PHP-FPM 7.4 ...
Álvaro Franz's user avatar
0 votes
1 answer
1k views

Php Extension MySqli installed but calling it gives an error

I run the following statements (so it is completely reproducible) (because i wanted to play with the source code of WordPress) and the following makes your current dir a website running under 8082 (...
edelwater's user avatar
  • 707
0 votes
1 answer
890 views

How to setup OCI8 on Red Hat 7.9 with REMI/RPM repository?

I am very much new to linux and my project uses Oracle Instant Client. I want to install OCI8 on Red Hat 7.9 but I don't know if I need to install basic/devel/rpm/remi version. I am following this ...
Maximious's user avatar
1 vote
0 answers
624 views

How to download or install php7.2-curl extension in ubuntu 21.04?

I want to install curl extension in my current php-project(php version is 7.2.34) for that i use this command sudo apt-get install php7.2-curl it's throwing following error and it's not showing in the ...
user avatar
0 votes
1 answer
1k views

Wampserver - accessing my website from an external device redirects to localhost

I am trying to put my Wampserver website "online". When I try to access my Wampserver website from a different device, the device will redirect to localhost. For example: My computer running ...
texaw88493's user avatar
1 vote
1 answer
206 views

POST request not redirecting to https

This is my example.conf's nginx config file: server { listen 80; server_name api.example.net; return 301 https://api.example.net$request_uri; access_log off; error_log /dev/stderr; } server ...
Saeed's user avatar
  • 403
1 vote
1 answer
1k views

Cant install php 7.4 on ubuntu, already installed when its not?

I am trying to upgrade nextcloud from v17 to 18. I need to upgrade my php version. Description: Ubuntu 16.04.7 LTS php -v PHP 7.1.33-37+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 1 2021 11:51:...
askubuntuwontletmelogin's user avatar
0 votes
1 answer
2k views

Configuring Apache for PHP

On my MacBook Pro, I used HomeBrew to install a new version of Apache and PHP. The problem I am dealing with right now is that I've got a problem in my apache configuration file such that php files ...
ControlAltDel's user avatar
0 votes
0 answers
516 views

Why did /usr/bin/php did point to a new version after a reboot

I use ubuntu 20.04 with it's default PHP 7.4 I had to use PHP 7.2 to update the dependencies of an old project, so I used ppa:ondrej/php sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo ...
Bruno's user avatar
  • 121
0 votes
2 answers
214 views

DNS A record on Domain host differs from DNS A record on Web host

My domain host has one A @ record. The IP address value listed is completely different from the A @ record listed for my web host. I did not change any of them. I hadn't visited the site in years nor ...
Casey's user avatar
  • 334
0 votes
0 answers
45 views

Possible to listen for Video end and editing url with javascript?

So, i want a Autoplay-like script, that listens for a video that ends, and when it ends, it rises the last Number from the Url one up like x = x + 1 or x+= 1. Im not quite in to Javascript, more into ...
trytodoit's user avatar
1 vote
2 answers
86 views

Package choices when installing web server

While installing a web server, I've been pondering some serious question... "Do I really need that package?" I've noticed that when you install your packages for your web server, you often ...
Preciel's user avatar
  • 13
0 votes
1 answer
917 views

in Compat.php line 1946 : this is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP

I'm triying to install Magento 2.4.2 open source on a Centos 8 server RHEL version but I have a little problem... I put the screenshot in attached files, thanks you for just ideas of search...
cedler's user avatar
  • 3
0 votes
1 answer
36 views

create virtual host on ubuntu,

i am new in PHP and i want to create my first PHP project but when i create virtual host on Ubuntu 18.04 and i try to change my PHP file, it doesn't change in my virtual host. I created my virtual ...
shokofa's user avatar
0 votes
1 answer
1k views

My .php files not running on WAMP Server, it is trying to save the file instead

I have just cloned a project, so it works perfectly fine when i load it e.g: "localhost/example/contact.html", but when i click to homepage which the endpoint is "localhost/example/...
kukri's user avatar
  • 3
0 votes
1 answer
106 views

Access and run PHP project from Linux partition through WSL

I'm working on a PHP project in an Ubuntu 18.04 dual booted with Windows, I've been doing that for around 2 years, however, I'm needing windows quite a lot now in my studies for things like Excel, ...
Annis's user avatar
  • 1
2 votes
2 answers
6k views

Malicious request in log

I am receiving malicious request therefore i seek your help i log page urls visited and some of them are like http://example.com/?a=fetch&content=<php>die(@md5(HelloThinkCMF))</php> ...
aryanknp's user avatar
  • 123
1 vote
1 answer
3k views

running sudo with PHP

Yes, there are many answers to a similar question, but mine is a bit more specific. I want to add the user running apache, www-data to sudoers, but everywhere I've read, they have added specific files ...
CryptoRhino's user avatar
1 vote
2 answers
2k views

PHP error with "logger.php" - Unknown: Failed to open stream: No such file or directory in Unknown on line 0

I'm using Visual Studio Code with PHP Server extension. When I try to launch my Web application, the browser shows me this message: Warning: Unknown: Failed to open stream: No such file or directory ...
logi-kal's user avatar
  • 121
0 votes
1 answer
862 views

Bash doesn't recognize php

Even though I have php in my /usr/bin and it is in my PATH when using bash it doesn't find php. bash: php: command not found And here is echo $PATH: /home/adnan/.local/bin:/home/adnan/bin:/app/bin:/...
Shadow4Kill's user avatar
1 vote
2 answers
2k views

Install PHP 8 separately from PHP 7 - Centos 7

My production Centos 7 machine is running PHP 7.4 but I 'd like to test code against PHP 8. Before a few days,in formatting a new server, I tried yum-config-manager --enable remi-php8 but this broke ...
Michael Chourdakis's user avatar
0 votes
1 answer
117 views

cURL error 60 in Symfonycasts tutorial

In Symfonycasts "API Platform: Serious RESTful APIs" Chapter 6 there is the cURL command curl -X GET "https://localhost:8000/api" -H "accept: application/ld+json". ...
geoB's user avatar
  • 166
0 votes
1 answer
19k views

selecting from SQL with LEFT JOIN and multiple conditions

I am trying to fetch posts with multiple filters, my database is as below, "Meta" Table id meta_key meta_value object_name object_id 2 location new city post 2 1 post_type section post 2 ...
harshit mishra's user avatar
0 votes
0 answers
84 views

How to prevent interrupted mv moving data

On Ubuntu 18.04 I am running a small PHP web application which moves directories one by one with nested dirs and files from one filesystem to another via exec(mv filepath) method. Now I have the ...
Mango D's user avatar
  • 115
1 vote
1 answer
805 views

ModSecurity whitelist my IP, false positive on response body due to gzip?

How can I whitelist my IP address on modsecurity or just completely ignore the response body so it stops tripping like this? I have my wordpress site behind cloudflare. My site also uses a cache ...
Daviid's user avatar
  • 156
0 votes
1 answer
70 views

MySQL 1273 Workbench

I have initially started to run https://www.youtube.com/watch?v=7S_tz1z_5bA&t and installed it all. When using MySQL Work Bench I initially run it, I get thunder icon when it runs but then I get ...
David Daoud's user avatar
1 vote
0 answers
289 views

php-pam for php7.3 and php7.4 in parallel?

I have both php7.4 and php7.3 in use on my Debian 10 (buster) system as I have dependencies on both. (From https://deb.sury.org/ php apt repos.) But the pam module is not available as a version-...
Chaos_99's user avatar
  • 938
0 votes
1 answer
2k views

Ubuntu 20.04 switch to multi version of PHP returns error 500 on phpMyAdmin

I have installed multiple version of PHP 5.6, 7.2, 7.3, 7.4 and 8.0 with 7.4 set as the default. I tried to switch to different version for some projects running on older version, doing this: sudo ...
Juliver Galleto's user avatar
-1 votes
1 answer
114 views

Is there any particular way to set up files for Web Development? [closed]

I've been working in...studying...Web Dev for about four years and I'm wondering if there is a particular file structure that's beneficial. Example, I noticed one individual had a DEV folder directly ...
markanthony's user avatar
-3 votes
1 answer
187 views

Using ubuntu users for a login system on a website [closed]

I was wondering if anyone could point me in the right direction. I am wanting to create a login system that pulls the users already created on the server.(Using Ubuntu 16.04). I believe an example ...
GamerLiko's user avatar
0 votes
1 answer
5k views

How to set up an SQL database on Synology NAS?

I would like to set up REST API, which can communicate with my database on my NAS. I made this simple PHP code for the database connection, and it works perfectly with Xampp on my computer. <?php $...
Daniel's user avatar
  • 103

1 2
3
4 5
40