PHP - Question For Phpass Expert
I've just implemented PHPass into an application that I am working on, and I am seeing a strange inconsistency. The issue is, the application is installed on one site, and it works perfectly. But the same application works on another site, and the login nor registration works. Does anyone know what might be the issue that registration and login works on one site but not the other with PHPass? Thanks.
Similar TutorialsThis topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=351799.0 Hi, I would like to become a php expert. How to achieve this? I have already read 2-3 books but I don't feel like knowing php. How to sharpen my skills? Thanks for your answers Hello I need a expert php programmer to create website. Please send me your hourly rate and availability.
I will send work requirements once I have a successful candidate.
Requirements at the moment:
Create forms
Capture data
Display data in graphs
Create interactive community.
Must be written PHP OOP , MYSQL.
I will retain ownership and control of code and data, details will be provided.
This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=316214.0 Hi, My hosting company (Bluehost) told me when someone goes to my home page, it sends these series of queries and this is the reason for my high cpu usage and this is why my site says Error Establishing Database. The hosting company gave me these: Each script is using a decent about of CPU. [2:09:33 AM] hollane3 31881 6.2 0.1 186084 49000 ? RN 01:59 0:26 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 934 6.6 0.1 184012 48652 ? RN 01:59 0:25 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 5344 7.1 0.1 184008 48440 ? RN 02:01 0:21 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/wp-cron.php hollane3 5164 7.1 0.1 186444 48772 ? RN 02:01 0:22 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 7246 6.9 0.1 184116 48196 ? RN 02:02 0:18 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 11221 5.8 0.1 185160 47852 ? RN 02:03 0:09 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 11236 6.4 0.1 182992 47620 ? RN 02:03 0:10 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/wp-cron.php hollane3 12595 5.4 0.1 183088 47264 ? RN 02:04 0:07 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 13969 5.4 0.1 184648 47396 ? RN 02:04 0:05 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 14161 6.1 0.1 182480 47140 ? RN 02:04 0:06 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/wp-cron.php hollane3 14198 6.7 0.1 183092 47204 ? RN 02:04 0:06 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php hollane3 16343 4.9 0.1 181968 46496 ? RN 02:05 0:02 | \_ /ramdisk/bin/php5 /home4/hollane3/public_html/index.php I am not well versed with scripting, so I don't know what this mean. Can anyone PLEASE help me to answer these questions: + Is this related to a particular plugin or widget or theme? + What could be the possible source of this issue, that is, which file should I look at to resolve this? + Can I fix this myself or do I need a php coder to help me? Thanks! Any one php expert help me,
URL imgslink.biz
when i upload an image and try to open it, i get error
here is my htaccess code
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+\.)?imgslink\.biz/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ nohotlink.gif [L] <Files ~ "\.(php|sql|php3|php4|phtml|pl|py|jsp|asp|htm|shtml|sh|cgi)$"> order allow,deny allow from all </Files> If you are a PHP expert, then I really your help. I have a question regarding PHP sessions and their security. So here is my story ... I created a login script (login.php) for my website. When a user goes to the login.php page, they see a login form that they must fill with their username and password to login to the members' area and view their profile, etc. On that login page, when the user enters their username and password and then clicks the "Login" button, my script filters the data, sends MySQL query and checks if the login is valid. If the login is NOT valid, then they get a "Login Failed" message. If the login is valid, I register their username and the password in sessions and redirect them to the members.php page. Here is some of my code for my login.php page after mysql confirms the login is valid <?php $query = mysql_query('SELECT * FROM `users` WHERE username='$user' AND password='$pass'"); $numRows = mysql_num_rows($query); if ( $numRows ) { // login is valid $_SESSION['username'] = $user; $_SESSION['pass'] = $pass; // redirect user to members area header('Location: /members.php'); } else { // login is invalid echo "Login failed"; } ?> My question is ... is this login script secured? I mean, I am not generating any session id or any cookie. I am just storing the username and the password in two session variables and those are the things that i will use to display the user's profile, etc. Can attackers attack this script? Is this secured or is there any other way I can make it stronger? when in a form, I wish to build a conditional that if the response to a radio button is a value of 2 (female), it will display an input requesting for users maiden name. If not 2 goes to the next input statement. Here is code I was experimenting with: <html> <body> <form action="" name="test" method='POST'> <input type="radio" id="sex" value=1 checked><label>Male</label> <input type="radio" id="sex" value=2><label>Femaleale</label> <?php $result = "value"; if ($result == 2) echo "<input type='int' id='gradYear' size='3' required>"; else echo "Not a female!" ?> <input type="submit" value="GO"> </form> </body> </html> The code passes debug, however, Not a Female is displayed. My question is - Can I do this and if so, what value do I test against id='sex' or value. I tried each one but gave the same results. I realize that $_POST[sex] would be used after the submit button is clicked. But this has me stumped. Thanks for the assis in advance. I have an issue with the below code Code: [Select] if ($gtype == "%24L" || $gtype == "$L") The value actually starts with the dollar sign then L, but its being read as a variable that's not assigned so it showing as blank. so the question is how to I get to check and see if the value of gtype actually is $L in a way that it wont read $L as a variable and as a value instead? Hello, I have a 'strange' situtation. I have this string "Who Am I" that will be used as an header (site for a client) but the design shows that the word "Who" and the words "Am I" are in 2 different colors, in HTML this is a quick fix, but in PHP? What I was thinking was explode the string and fetch the first element put it in a var en then concat the 2 others. But what if the title is more then 3 elements after exploding? It needs to be more dynamic, but I don't know how to do it. Does anyone have an idea? Hi, I am looking into a way of adding addons to a class I made.. I thought something like this would work, but not sure how to implement it: Code: [Select] <?php class foo { function foobar($text) { $text = $text . 'b'; return $text; } } class bar extends foo { function foobar($text) { $text = $text . 'c'; return $text; } } $var = new bar(); $var->foobar('a'); // this would then return abc ?> Now i want to be able to call up foo, and it calls the foobar of foo, and the foobar of bar. is that possible? hosh I'm trying to secure my login system as much as possible from SQL injections and other attacks. I know that by using mysql_real_escape_string() you can prevent that and I'm using that on for example the username input, but I would like to know if you hash the password before you send it to the database with MD5, do you still need to use mysql_real_escape_string()? A very quick and simple example: Code: [Select] <?php $un = $_POST['username']; $pass = $_POST['password']; $pass = md5($pass); mysql_query("SELECT * FROM users WHERE password='$pass' AND username='$un'"); ?> If someone wrote a possible SQL query in the password input, wouldn't that be rendered useless as the md5 will hash it before sending it and therefor "hide" it? Or is there any other reason you wouldn't want people to use sertain characters/symbols in their passwords? hi php people, I am wondering will if the code below will work when I call $C->getafoo() will I get foo; I keep getting an error at this point return $this->A->a(); saying the method is not there Code: [Select] class A{ public function a(){ return "foo"; } } class B { public $A; function __construct($A) { $this->A = $A; } public function geta(){ return $this->A->a(); } } class C extends B{ public function getafoo(){ return geta(); } } $C = new C(new A()); echo $C->getafoo(); Howdy, I have a question about Dates in PHP 5.3.6. I queried my database (SQL Server 2008) and I got back two columns, a date(StartDate) and a time(StartTime). The software we used only allows the user to enter a StartDate, so that field always has a value, but there are instances where the StartTime is null (no time set). What I want to do is if there is a StartTime, concat it to the StartDate. If there is not StartTime, I want to add a default time. But when I do that, I get an error saying that I cannot combine a string and a date. I really do not understand why this is happening. I set up PHP 5.3.6 on a server, so I am not sure if there something in the php.ini file that is not allowing me or if this is something new. Some help please! Thanks Code: [Select] if( $row['StartTime'] != null ) $sTime = $row['StartDate'] . " " . $row['StartTime']; //What I want '2011-05-03 17:58:12.000' else $sTime = $row['STartDate'] . " 00:00:00.000"; //What I want '2011-05-03 00:00:000' I'm considering getting a VPS, but I'm not entirely sure what this would be able the handle. The specs doesn't look that good to me, but my friend swears it will handle running apache/php/mysql handling large websites and databases without a problem. I want to run multiple databases that just store statistics and I'm a bit worried about the RAM and the company doesn't even mention a cpu. Here's the specs: 256MB RAM 300GB HDD 10Mbps unmetered 1 IP Address My friend runs two counter-strike: source servers off his VPS (same stats).. so I'm actually considering this, but it just seems like it's not powerful enough. Oh.. forgot the most important part.. it's only $9. Just get started with OO in PHP. If I create an object while on one page and then call another page, can I still access that first object, or is it destroyed when the second page is called? For example, if I have on page1.php: Code: [Select] $obj = new $MyObject(); and then call page2.php, is it possible to still access $obj while on that page? hello all, i am having a for each problem. im trying to get two post fields using the foreach function. here is what i have in my form.php: Code: [Select] <?php foreach($_POST['staff'] as $value) { echo "$value - <br />"; } ?> the name of the the fields coming in are Code: [Select] name='staff[]' and the second one is name='descr[]' fields += 1; Hello. I'm trying to pull information out of an xml file. However I'm a bit lost in getting the actual value. Code: [Select] $url="http://ws.audioscrobbler.com/2.0/?method=artist.getimages&artist=Dr%20Feelgood&limit=1&autocorrect=1&api_key=c107c9b5c09cb5693b6c19409dd984c1"; $xml = simpleXML_load_file($url,"SimpleXMLElement",LIBXML_NOCDATA); $largesquare=$xml->images->sizes->size[2]; Is what I have but its not pulling the information. The above url will give you the link to a set xml file for this example. And I want to get the info for the Code: [Select] <size name="largesquare" width="126" height="126">http://userserve-ak.last.fm/serve/126s/43173899.jpg</size> I'm sure I'm doing something wrong that's a simple fix but I am lost here. In the sizes there are 6 different size options each with different names and I have no idea how to pull the one with the correct name that I need. Thank you to who ever can help me sort this out. Hi to all people, I just want to know if there a php script I can use using DRM. The scenario, once the user download the song from a website, he/she can't forward into other using bluetooth or file transfer. It is possible to do that scenario? Thanks in advance are there any php functions that are best used when testing to see if a server is busy or not? and if the server is busy then display a "server is busy" message in the php script? |