92,279
questions
0
votes
0
answers
22
views
PHP modules loading via the command line, but not through Apache on Mac OS
I'm trying to get a PHP dev environment set up on Mac OS Big Sur. I'm using the Apache that comes with the OS, but I'm using MacPorts for PHP.
I ran:
$ sudo port install php83-zip
Using
$ php -ini
...
0
votes
1
answer
9
views
PHP Mac OS X pg_connect on PostgreSQL 15 crashes only in Apache HTTPD
My PHP web app is crashing upon calling pg_connect when running on my Mac OS X machine ( it does not crash from a RHEL8 server ).
It's only happening when:
Connecting to a PostgreSQL 15 database ...
0
votes
0
answers
19
views
Handling exif and metadata of server response which contains image
`
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
define('RESPONSE_PREVIEW_LENGTH', 1000);
class HttpErrorException extends Exception {}
class JsonDecodeException extends Exception {}
...
0
votes
1
answer
48
views
.htaccess trying to create Clean URLs mod_rewrite
I have read prior SO questions and read tutorials and I do not understand mod_rewrite fully so I am posting here
Options +FollowSymLinks
RewriteEngine On
#Using THE_REQUEST for catching references ...
2
votes
1
answer
36
views
Non-WWW to WWW Redirect Not Working in .htaccess for HTTPS React App on Apache with Cloudflare – "Too Many Redirects" Error [closed]
I'm trying to configure my React app hosted on an Apache server to ensure that all versions of my domain (http://example.com, https://example.com, http://www.example.com, and https://www.example.com) ...
0
votes
0
answers
10
views
mod rewrite for removing ? from the url
Am using apache2, I require to remove the question mark from my url. For example if my url http://192.168.20.120/docs/pay/?2023/04/text.pdf I need to remove ? and result http://192.168.20.120/docs/pay/...
0
votes
1
answer
45
views
Question regarding ob_flush and flush not working on FPM
I have below code and want to show echo one by one but whole result returns at once
<?php
for ($i = 1; $i <= 10; $i++){
sleep(1);
echo "$i\n";
ob_flush();
...
0
votes
1
answer
36
views
python on xampp how to serve html page
xampp running a python script that writes an html file. How do i get xampp to serve the html from python.
name = "david"
age = 44
square = age**0.5
HTML=f"""
<!DOCTYPE html&...
0
votes
0
answers
13
views
Is it possible to use server aliases with Vagrant?
I have configured Vagrant to work with VMWare (vmware_desktop) provider. My host machine is running on Windows 11, my guest virtual machine uses Linux/Ubuntu 22.04. I have several apps on my guest ...
0
votes
0
answers
23
views
Stopping Apache from writing to stdout
I have a docker setup in which I have an Apache2 container directing traffic to a PHP container. In the PHP containers logs (docker-compose logs), 99% of the messages are something like
172.18.0.6 - ...
-1
votes
1
answer
69
views
laravel project on apache
I have a system built in Laravel, the system tries to perform an INCLUDE to a certain file using a server variable, the variable returns the following path /home/someuser/.... I get an error in PHP ...
-2
votes
0
answers
9
views
Screaming Frog Log File Analyser - Both 200 and 301 responses from Home Page URLs - Is this normal? [closed]
I've run a handful of websites through screaming frog log file analyser and nearly all URLs give consisent responses i.e. all 200, all 404 or all 301.
But Home Page URLs give mixed responses - loosely ...
0
votes
0
answers
32
views
How to automatically block IP's in htaccess? [closed]
is there a way to "automatically" block IP addresses in the htaccess after a file or directory is probed? I'm currently hosted on Apache 2.4+ and just monitor visitor logs. Every time I see ...
0
votes
0
answers
15
views
Conditionally serve static files based on authenticated user filesystem permissions
I have some files in a directory that I'd like to serve with Apache. I've configured Kerberos authentication with mod_auth_gssapi so I have the username in the REMOTE_USER environment variable. I'd ...
0
votes
0
answers
10
views
Why do these apache wildcard virtual hosts cause unexpected results?
I was trying to have apache configured to have a default VirtualHost that would reply to any request that doesn't match any other VirtualHost, e.g when ip is typed in browser.
While trying a ...