New answers tagged php
1
vote
Prevent a user with a valid session to directly access a json feed
The short answer is that you shouldn't try.
Yes, there are things you can do, but they will be complex and fragile. One obvious solution is to set a time-limited, single use token in the server-side ...
0
votes
Very low resource usage on Openlitespeed (LOMP) on Ubuntu 22.04
Figured it out. I noticed this issue didn't exists with MySQL. Turns out mariaDB has a max_connections parameter. I edited it under the file /etc/mysql/mariadb.conf.d/50-server.cnf and then ran the ...
0
votes
Apache + PHP with mod_php No timeout
I've finded my response.
The problem is not from Apache or PHP, but from MySQL.
For Apache, we have Timeout which corresponding to timeout when server wait for client request https://httpd.apache.org/...
0
votes
http_code 0 with Redhat php curl request
setsebool -P httpd_can_network_connect on
This worked. It opened up permissions for PHP. The full answer is here: https://stackoverflow.com/questions/69201308/curl-not-working-from-web-browser-on-red-...
0
votes
PHP openssl encryption aes-256-cbc and decryption using NODEJS
Here you go :
The problem is that the base64 key used is not 32chars.
In PHP, openssl_decrypt probably add the missing chars with '\0'
So when when decrypted, it was always invalid key length.
const ...
1
vote
Laravel app routes not working when using domain name (fine with IP address) on AWS Lightsail
Rookie mistake..
For some reason the following lines were present in the one conf but not the https one.. added these and it seems to work now
index index.php index.html;
charset utf-8;
...
1
vote
Need equivalent .htaccess rule in apache just like nginx so I can get everything in URL
I found it
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
0
votes
No package sendmail available
I had this issue today, and the solution was to remove 'sendmail*' from the 'exclude' line in /etc/yum.conf. After that, installing sendmail worked.
1
vote
Missing php8.0-fpm sock file
Support for Ubuntu 18.04 was removed from Ondřej Surý's PPA on June 15, 2023 as that version of Ubuntu is no longer supported.
If you really must use PHP 8 on an Ubuntu 18.04 server, then your only ...
0
votes
Missing php8.0-fpm sock file
You don't install it - it is created automatically when PHP-FPM is run. It is created in the location defined in the FPM config.
The valid use-cases for running multiple PHP versions on the same host ...
1
vote
PHP mail.add_x_header not showing in log
EDIT: If I look at the mail headers I receive, I see the X-PHP-Originating-Script: line in there. Perhaps I've misunderstood - is that all the php.ini directive does?
Yes. As indicated by the fact ...
Top 50 recent answers are included
Related Tags
php × 7902apache-2.2 × 1925
nginx × 1033
linux × 932
mysql × 749
php-fpm × 643
centos × 625
ubuntu × 564
apache-2.4 × 431
fastcgi × 264
debian × 255
php5 × 252
iis × 235
email × 223
wordpress × 222
security × 219
.htaccess × 210
windows × 192
web-server × 188
permissions × 162
php.ini × 161
cron × 141
apache2 × 140
lamp × 140
amazon-ec2 × 122