Jump to content

shams

Members
  • Posts

    76
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

shams's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. When i run this code: <?php $bar = 'BAR'; apc_store('foo', $bar); var_dump(apc_fetch('foo')); ?> get this error: PHP Fatal error: Uncaught Error: Call to undefined function apc_store() This is phpinfo() for apcu: APCu Support Enabled Version 5.1.21 APCu Debugging Disabled MMAP Support Enabled MMAP File Mask no value Serialization Support php Build Date Jan 4 2022 17:27:51 Directive Local Value Master Value apc.coredump_unmap Off Off apc.enable_cli Off Off apc.enabled On On apc.entries_hint 4096 4096 apc.gc_ttl 3600 3600 apc.mmap_file_mask no value no value apc.preload_path no value no value apc.serializer php php apc.shm_segments 1 1 apc.shm_size 32M 32M apc.slam_defense Off Off apc.smart 0 0 apc.ttl 0 0 apc.use_request_time Off Off
  2. +---------------------------------------------------------------------+ | Grants for root@localhost | +---------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION | | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION | +---------------------------------------------------------------------+ 2 rows in set (0.00 sec) from the terminal can add the user to mysql as root.
  3. In ubuntu 19.04 with php version 7.2 , i want to add mysql user with php when i run the code below get the error: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' I didn't set any password for root , this is php code: <?php $server = "localhost"; $dbuser = "root"; $dbpassword = ""; try { $connection = new PDO("mysql:host=$server", $dbuser, $dbpassword); $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $user = 'test' . '@' . 'localhost'; $sqlQuery = "CREATE USER . $user . "; $connection->exec($sqlQuery); echo "User created successfully!"; } catch(PDOException $e){ echo $sqlQuery . "<br>" . $e->getMessage(); } $connection = null; ?>
  4. I want to pass the variable $host to the php script: The above script didn't get the variable $host, with this error of apache log:
  5. This is the output: This is the apache error.log:
  6. I tried the all 3 above lines one by one and no one work and this is the script i run: and these are the errors from apache log for the all 3 above lines one by one:
  7. I want to use with ssh but it didn't get the variable: and get this error:
  8. Thanks for reply, i want to use the variable inside the exec function not for the echo but for ssh just for easy i use the echo command inside the exec function, I will use your script to edit for my need. Sorry for the inconvinence.
  9. I want to get the values of variables from html form and then pass to the command of exec function in the php script, but it is not working:
  10. What i exactly want to create sript for, it's a problem to run the above command for every site i open in the linux terminal so i want to create a html form and php script with the input field for the url of site i want to open and a submit button, when i inter the site url in the forum input field and hit the submit button the php script should do all the rest and open the site in the new tab of firefox, i don't have much knowlegde in html and php coding so started to go step by step. I aso created the socks proxy but that is slow so i preffer this one.
  11. Yes i want to use my shell server as proxy and forward my web traffic, but the above command working from the linux terminal and i can open localhost:9001 this is the output from terminal:
  12. I watch the log that says the connection established, but there is no tunnel because localhost:9001 is not working, this is log:
  13. The auth is now with rsa keys, this is the new command: the output now is: any help please?
  14. Thanks for reply, can you help how i can check the output?
  15. I want to create a ssh tunnel with php script but it is not working: just print the Done.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.