Jump to content

BrainPill

Members
  • Content Count

    105
  • 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. 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>';
  2. 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
  3. I tried that. Are there specific rules I should follow? What actually happens when you call a php shell_exec command? Where will the command look to start something? -------------------------------------------------------- Edit: I tried the following $var = php_sapi_name(); var_dump($var); the output is: apache2handler In the manual of php is a number of outputs mentioned https://www.php.net/manual/en/function.php-sapi-name.php I dont know if this is the solution but it coudl be so does anyone know if the sapi can be set to cli or cli-server maybe?
  4. I tried that. Are there specific rules I should follow? What actually happens when you call a php shell_exec command? Where will the command look to start something?
  5. Do I have to set a path or so for the Command Line Interface , PHP_CLI ? If so, how should this be done? EDIT: as there are many OS and approaches of PHP I have some additional info about my set up. I use WAMP 3.1.9 with windows 10. PHP version 7.3.5
  6. I tested : shell_exec("phptest.php"); to get rid of the space. Not sure if it is possible if there can be a space in the filename while saved? never heared about that
  7. I have a complicated situation I want to execute a php script that runs in the background while a browser script is used as trigger. I use wamp CLI to execute a php script like this: php test.php I want to execute this script in the browser with this script $outp = shell_exec("php test.php"); echo '<br>'; echo $outp; echo '<br>'; It doesnt work. The page in the browser is giving no output I can do shell_exec("whoami"), or shell_exec('dir'); So this works, but executing a script not. What causes this error?
  8. I want to scan website content for having only English content. I was thinking about using file_get_contents and read the page , but from here its unclear. Like when using some kind of regex like this if (!preg_match('/[^A-Za-z0-9]/', $string)) because file_get_contents() also gets html tags and so on. Is there a way to block non English language groups and how is this done?
  9. it could be. I tested it now in another browser (Brave) and here the web address didnt give a tooltip. But what causes these differences? Autofill? How can I control that?
  10. Hi my server setup is WAMP offline. My virus scanner is Windows Defender. I have created a form in html where the user can submit a series of links. I do not use the attribute alt or other javascript code for a tooltip on the page. I created a random https address url list to check the header status and when 200/301/302/303 true; I use file_get_contents() to scan the (malicious) sites their content. now 1 of the input fields has a https link address and when hovering over the input box there will be a tool tip with the link address. The other input form fields dont give a tooltip ( alt popup) when hovering over it. Is this a virus or can it also be a bug? I read online about a tooltip virus.
  11. I want a string input of minutes into minutes with leading zeros I use date() for this <php $time_in_min ='7'; $minutes = date("i" ,$time_in_min) ; var_dump($minutes); ?> but all I get is 00 while i according to the date() param explanation should give a leading zero. Like :07 How should this be solved?
  12. what are case insensitive CONSTANTS ? I understand what case insensitive is, but not what or when a constant is used. my questions are: can programmers cast their own constants? if so: how? Does PHP have built-in constants ? where can I find a survey of php built in constants online?
  13. I see, but the example does not lead to the desired result. its more like this: script 1: <?php include 'script2.php'; // execute code ?> script 2: <?php fictive_phpfunction_to_track_back_include(); // of course this is pseudo code, just to give an example ---------------- /* the example above will output referred from: script1.php */ // script code ?>
  14. I dont know much about AJAX and dont believe your solution is what I try to ask. Like var_dump verbose shows the location and the line number of a variable. Of course that is just an example of how PHP code can work. What I want to say is that it is certainly very useful if there was a specific PHP command that could give a list of the scripts that links towards it with either include or require. But I can't write PHP code myself. It could be people made it and that it might be scheduled for updates of PHP in the future.
×
×
  • Create New...