Jump to content

BrainPill

Members
  • Content Count

    118
  • Joined

  • Last visited

Community Reputation

1 Neutral

About BrainPill

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi all I have an uncommon problem I cant really solve . I have a script that uses require and calls for a new php script. If I comment the line and check what happens in the browser then I have different results . Chrome and Edge: nothing happens, the old require routine is executed; even after clearing browser cache in Chrome. In the Brave Browser is the commented require line not executed and is shown nothing in the browser. Does this mean that there is also a server cache and should I empty it? If so then how should it be made empty?
  2. okay, if you say so. As I have tried numerous thing I start to suspect it might be due to other settings in for instance virtual hosts or httpd.conf Are there more things that should be heeded at?
  3. Is it possible to still execute the $_GET php code and have a clean url ? I find it EXTREMELY hard to solve my problem written in the OP.
  4. Ok well I removed the code but this did not give any other result. I use $_GET to process a variable. When I test this in an html form I see the output I want. When I use $_GET in the same script but with a link it does not work. (btw you say that using RewriteEngine On and RewriteBase / in this way is not needed, but it worked in the form script for me) Is there a reason that apache processes this different and how can I change these settings?
  5. I have a htaccess file. The first lines (#preceding code) work well From #problem code I get problems. The idea is a php menu set up (simulation) with an < a href ""> link where all the query code is sent back to the page while the URL only shows the index6 (as a directory) This worked while using a form with $_GET But for the a href link it does not work properly what happens is that the $_GET input is not parsed by PHP anymore. The URL though stays 'clean' or 'tidy' or whatever; in any case without the query part. index6.php page: <?php //var_dump($_SERVER); var_dump($_SERVER['HTTP_HOST']); ?> <html> <body style=" "> <div style="margin-left: 600px; margin-top: 200px; width: 800px; height: 400px; border: 2px solid brown;"> <br><br> <p style="font-size: 20px;"> TEST </p><br><br> Index page. Execute at a virtual (test) host <br><br> <br><br> <a href="http://<?php echo $_SERVER['HTTP_HOST'] ?>/index6.php?mvalu=home">Home</a> <?php if(isset($_GET['mvalu'])) { var_dump($_GET['mvalu']); } ?> </div> </body> </html> the .htaccess file ################## # preceding code RewriteEngine On RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC] RewriteRule ^ /%1 [NC,L,R] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [R=301,L] ####################################### # problem code from here : RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/index6.php [NC] RewriteCond %{QUERY_STRING} \bmvalu=home\b [NC] RewriteRule ^index6\.php$ /index6/%1/? [NC,R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^index6/(\bmvalu=home\b)/?$ /index6.php/$1 [QSA,L] I hope someone here can help me with solving how to get a tidy url and processing the $_GET data correct.
  6. I have this direction placed in the vhosts file Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted Could it be any other script that still overrides this ? I tried the same ones in the httpd.conf file but I am not sure how to do it. Is the httpd directive more determining for instance ? What else could it be?
  7. I tried to put this in the htaccess file AllowOverride All RewriteEngine On RewriteRule ^([^\.]+)$ $1.php [NC,L] But this makes the request crash the apache error logs tells: Why is this error showing up?
  8. it is enabled. I can see it in php_info() in the list under apache2handler : loaded modules Other directives do work in the .htaccess file, but this one doesn't. Are there additional requirements?
  9. I have a question about apache. I have WAMP version 3.1.9 apache 2.4.39 I want to remove the *.php extension in the url in the .htaccess file which I placed in the directory ; I added the following code RemoveType *.php but still when going to a page I see the php extension in the apache pages I read that the loaded module should be mod_mime https://httpd.apache.org/docs/2.4/mod/mod_mime.html#removetype (i can see its loaded when checking php_info() ) still I dont have any result. What more directives are needed? Or is there another approach for removing file extensions?
  10. Hello I found an online example of radio buttons its in html css. (example can be foud at codepen too : https://codepen.io/web-tiki/pen/JXwLGQ/ ) I would like to get the chosen value into php the script is without javascript jquery. Do I need this to solve it? (If not needed then rather straight from html to php ) And if needed javascript or jquery, how is it done? <html> <head> <style type="text/css"> *{margin:0;padding:0;box-sizing:border-box;} body{background:teal;color:#fff;padding-bottom:10%;} h1{text-align:center;margin:20% 0 5%;font-family:verdana;font-weight:100;} #radios{ position:relative; width:50%; margin:0 auto; } input[type="radio"]{ position:absolute; right:1000%; } label{ float:left; width:15%; padding-bottom:15%; margin:0 2.5%; background:rgba(255,255,255,.2); border-radius:50%; cursor:pointer; } #slider{ position:absolute; left:0%; top:0; width:10%; padding-bottom:10%; margin:2.5% 0 0 5%; background:#fff; transition:transform 1s; border-radius:50%; animation-timing-function: ease-in-out; animation-duration:.3s; animation-fill-mode: forwards; transition: 0.2s left .05s ease-in-out; } #input1:checked ~ #slider{ animation-name: input1; left:0; } #input2:checked ~ #slider{ animation-name: input2; left:20%; } #input3:checked ~ #slider{ animation-name: input3; left:40%; } #input4:checked ~ #slider{ animation-name: input4; left:60%; } #input5:checked ~ #slider{ animation-name: input5; left:80%; } @keyframes input1{ 30%, 70% { transform:scale(0.5); } } @keyframes input2{ 30%, 70% { transform:scale(0.5); } } @keyframes input3{ 30%, 70% { transform:scale(0.5); } } @keyframes input4{ 30%, 70% { transform:scale(0.5); } } @keyframes input5{ 30%, 70% { transform:scale(0.5); } } </style> </head> <body><center> <br><br><br><br> <form action="" method="post" onChange="this.form.submit();" > <h1>Select one:</h1> <div id="radios"> <label for="input1"></label> <input id="input1" name="radio" type="radio" /> <label for="input2"></label> <input id="input2" name="radio" type="radio" /> <label for="input3"></label> <input id="input3" name="radio" type="radio" /> <label for="input4"></label> <input id="input4" name="radio" type="radio" /> <label for="input5"></label> <input id="input5" name="radio" type="radio" /> <span id="slider"></span> </div> </form> <?php if(isset($_POST['radio'])) { var_dump($_POST['radio']); } ?> </center> </body> </html> Anyone got any idea?
  11. It still does not work for me. What I tried is this: $output = shell_exec("A:/wamp64/test/batchscripts/hello_world.php"); echo '<br>'; echo $output; echo '<br>';
  12. Or should I change the php.ini settings? I figured out I have (at least) 2 different php.ini files. One in the apache dir and 1 in the php dir
×
×
  • Create New...