Jump to content

infernon

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

infernon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Greetings! My employer has asked me to find and compare various tools used for stress-testing a PHP application that was developed in-house. I have poked around and found tools such as Dieseltest and Apache Jmeter, but I wanted to check here to see if anyone has had success with other tools (or recommends those two above anything else). Both JMeter and Dieseltest allow you to write custom scripts to test the application, so one of the developers will be assisting me there (my PHP knowledge is very basic, I'm just a humble administrator), but one of my managers has suggested to look into the benefits of running a tool on the server itself vs. running the tool off of a client machine. It would seem that it would be better to run the tool from a client when performance testing as it would add additional load to the server during the test. I am open to suggestions for Linux and Windows, although a free solution is always better:)
  2. Actually, I posted this on usenet and someone pointed out that I was using a comparison operator to assign the 1 value for 'authuser'. A single "equals" sign fixes the problem.
  3. Do you know why the code that I was using wouldn't work?
  4. I'm not working with mysql yet. I was just trying to do this with PHP at the moment and the fact that the sessions aren't working is really bugging me.
  5. It reads: SESSION IS SET TO: 0 Sorry, but you don't have permission to view this page. Why do you think that the value is getting lost? Is there a configuration change that needs to be made with apache?
  6. OK, which page should I put that code into?
  7. I am currently attempting to pull a value from a server variable across three pages, but I'm having a problem. On my login page, I am using the following code: <?php session_unset(); ?> <html> <head> <title>Please log in.</title> </head> <body> <form method="post" action="test1.php"> <p>Enter your username: <input type="text" name="user"> </p> <p>Enter your password: <input type="password" name="pass"> </p> <p> <input type="submit" name="Submit" value="Submit") </p> </form> </body> </html> On test1.php, I am using the following code to check that the login information is correct: <?php session_start(); $_SESSION['username'] = $_POST['user']; $_SESSION['userpass'] = $_POST['pass']; $_SESSION['authuser'] = 0; if (($_SESSION['username'] == 'Joe') and ($_SESSION['userpass'] == '12345')) { $_SESSION['authuser'] == 1;} else { echo "Sorry, but you don't have permission to view this page."; exit(); } ?> On this page, there is also a link to another page that also checks for a properly authenticated user with the previous credentials. The problem that I'm having is that when someone clicks on the link, they receive an error message telling them that they do not have permission to view the page. Here is the code from the page at the end of the link: <?php session_start(); if ($_SESSION['authuser'] !=1) { echo "Sorry, but you don't have permission to view this page."; exit(); } ?> I am thinking that this problem is related to a server configuration issue, but I can't seem to put my finger on it. I don't know why the information in the session variable will be held for only one page.
  8. Hello Everyone, I am completely new to PHP.  Other than doing some basic stuff with MySQL databases and getting familiar with the fundamentals, I don't know much more than that. I have recently been assigned a challenge from a friend.  He uses something called DirectAdmin to perform nightly backups.  He wants to tell DirectAdmin to perform a nightly backup, but to have it cron a script afterwards that looks at the directories in the backup directory (they're all stored in one directory) takes everything other than the two newest backups (backup directories are named with a date) and deletes them.  If the directory doesn't match the date format of the other directories, he wants the script to skip it.  If there is a problem with the script running, he wants to have it e-mail someone with the reason that it failed. Now, given my limited knowledge of PHP and my zero-knowledge of the Linux command line (I should have mentioned that this is on a Linux box), what exactly should I learn that would get me to my goal the fastest.  I'm not looking for someone to write the script for me, obviously, but I don't know which topics I should be focusing on.  Also, if anyone knows of a great tutorial (I didn't really see anything in the tutorials section of this site), that would be great too.
×
×
  • 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.