Jump to content

jimfog

Members
  • Posts

    1,803
  • Joined

  • Last visited

Posts posted by jimfog

  1. sorry for the so late response-do me a favor, can you give me the link of the correct php file to install.I downloaded this one php-5.4.4RC2-Win32-VC9-x86 but the error message is the same and Apace is not started. The message is this:

    Syntax error on line 515 of C:/Apache24/conf/httpd.conf: Cannot load C:/php/php5apache2_2.dll into server: \xc4\xe5\xed \xde\xf4\xe1\xed \xe4\xf5\xed\xe1\xf4\xfc \xed\xe1 \xe5\xed\xf4\xef\xf0\xe9\xf3\xf4\xe5\xdf \xe7 \xea\xe1\xe8\xef\xf1\xe9\xf3\xec\xdd\xed\xe7 \xe4\xe9\xe1\xe4\xe9\xea\xe1\xf3\xdf\xe1.

    In the php file I downloaded I did not find php5apache2_4 as I expected to.

  2. I had problem with the db character set. Everything that was sent from the form to the db in Greek was appearing a weird characters.The db collation was utf8 general and the web page where the form was "content char set utf 8". I fixed the issue by using this code:

    query("SET NAMES 'utf8'");

    My question is the above necessary even if the db and the webpage are set to utf8? I thought that the above 2 will suffice for correct character presentation but it did not. From your experience,did you have to use the above code for correct character database presentation when it comes toa language other than English-in my case it was greek.

  3. ... dont use MD family ever like jsg already said.
    The question is here, then, Is there any case/scenario where I would need to get back the password, so as to use encryption? A case in web development as we know it today. I saw the article and the author does not mention the case of salted MD5, considered by many much more secure thatplain MD5.
  4. So from all the hashing function out there which you would choose for storing passwords in the database? Which is the more secure?

  5. I managed to output an error which I am having difficult to explain. First here is the code the "fires" the initiation of errors:

    $result = $conn->query("insert into users values						 (NULL, '".$username."', sha1('".$passwd."),'".$name."','".$phone."')") or die(mysqli_error($conn));

    And here is the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'kolovos','6973999098')' at line 2 

    Kolovos and the number you see next to it are the data($name,$phone) I want to insert to the table of the db-these are filled in a form first.I cannot understand what syntax error is there.

  6. then from where does the $conn->query() is coming? if it is any custom method what does it returns? it is always best to store the query in variable so that you can print it for debug like jsg said.
    Look at this code to understand the origin of conn-> query:
    function db_connect() {   $result = new mysqli('localhost', 'root', '19471979', 'appointments');   if (!$result) {	 throw new Exception('Error.');   } else {	 return $result;   }}$conn = db_connect();

    $conn = db_connect() is part of another function NOT the one you see above.

  7. which library are you using? is it pdo? you have to use appropiate error handling function according to your api. http://au.php.net/manual/en/pdo.errorinfo.php this is for pdo
    I do not use a library and it is the first time I hear the term PDO
    Just put it at the end of your query:
     query("insert into users values (NULL, '".$username."', sha1('".$passwd."),'".$name."','".$phone."')") or die(mysql_error()); 

    I used the code you gave me-with the die statement-in the end and the only thing I get is a blank page, not any message at all. Here is the code:
    $result = $conn->query("insert into users values (NULL, '".$username."', sha1('".$passwd."),'".$name."','".$phone."')")		  or die(mysql_error());

    In the beginning I assumed that the connection was succesful and the db had been updated with the new record, but that is not the case. The db has not been updated and the strange is that I do not get any error message telling me this or that. Any ideas?

  8. I have a form-here is the code:

    <div id="formcontainer">   <form  action="register_new.php" method="post">   	   <label>Name:</label><span class="asterisk">*</span><input name="name" type="text" size="40" /></br>  	    <label>Phone:</label><span class="asterisk">*</span><input name="phone" type="text" size="40" /><br> 	    <label>Username/e-mail:</label><span class="asterisk">*</span><input name="username/e-mail" type="text" size="40" /></br>  	    <label>Password:</label><span class="asterisk">*</span><input name="password" type="text" size="40" /></br>	    <input name="submit" type="submit" /></form></div>

    I want to adjust its line height,the problem is that by doing so,in the css rule(formcontainer) every single element is affected.What I want-for example- is to increase the space between the input name="name" and the label phone but NOT between a label and an in input element. I want the labels with their corresponding inputs packed together and at the same time the label-input pairs separated each other(increased line height). I hope I did not confused you.

    • Like 1
  9. I cannot store a record in the database. Here is the insert statement-I want to make sure the syntax is correct. I want to focus on this first and thenlook for other pieces of code:

    $result = $conn->query("insert into users values						 (NULL, '".$username."', sha1('".$passwd."),'".$name."','".$phone."')");  if (!$result) {    throw new Exception('Could not register you in database - please try again later.');

    As you understand I get "Could not register you in database - please try again later". Is there any way I can get more info about the cause of the error?

  10. besides using sha1 when entering passwords in a database where else it might be used? Is it usual to use is also with user names-when inserting them in a database?

  11. That's odd given PHP 5.4.1RC2's change log... oh well... php5apache2_3.dll (Apache 2.3 is the "beta" version of Apache 2.4; this DLL should be compatible with 2.4)? As for the coming out in 2 days... that's what the front page on php.net says:
    Since the dll(i can neither find php5apache2_3.dll) was not found i will have to wait for the final version in 2 days. And to be precise that we are talking about the same thing, here is the name of the file i downloaded: php-5.4.1RC2.tar.
  12. You have two options: 1. Get the PHP 5.4.1RC2 (or wait 2 more days for the final PHP 5.4.1 to come out), and use the php5apache2_4.dll in it.
    Are you sure it will come out in 2 days? I followed option 1 but there was not any php5apache2_4.dll in the php folder?
  13. The problem continues.Apache does not restart. A window appears telling "Requested operation has failed"I tried to start Apache from the command prompt and here is the message that i got

    C:\Apache24\bin>httpd.exehttpd.exe: Syntax error on line 1 of C:/Apache24/conf/httpd.conf: Cannot load C:/php/php5apache2_2.dll into server: \xc4\xe5\xed \xde\xf4\xe1\xed \xe4\xf5\xed\xe1\xf4\xfc \xed\xe1 \xe5\xed\xf4\xef\xf0\xe9\xf3\xf4\xe5\xdf \xe7 \xea\xe1\xe8\xef\xf1\xe9\xf3\xec\xdd\xed\xe7 \xe4\xe9\xe1\xe4\xe9\xea\xe1\xf3\xdf\xe1. C:\Apache24\bin>

    Here is line 1LoadModule php5_module "C:\php\php5apache2_2.dll" Do you see any syntax error in the above line? The whole code of course that goes to apache config is the:

    LoadModule php5_module "C:\php\php5apache2_2.dll"AddType application\x-httpd-php.phpPHPIniDir "C:\php"

    I even tried changing the slashes from back ones to forward ones but without any result.

  14. I am in the proccess of installing separately pache,php and mysql. I downloaded apache from here http://www.apachelounge.com/download/win64/and php from here http://windows.php.net/download/ as boen robot suggested I am reading this tutorial here:http://www.ricocheting.com/how-to-install-on-windows/php I installed apache successfully but i cannot install php. The problem arises when following step 5(in "installing PHP")-after i do thatApache will not restart-i have downloaded php thread safe, so this is the correct version.

  15. Well, you'll have to manually install MySQL also... but that's the easiest part of the whole process - you just download the MSI from MySQL's site, press "Next" on all dialogs, and you're done. Other than that... let's see... [opens up Apachefriend's home page and XAMPP's page]- phpMyAdmin - OK, yes, if you want to use that, you'd have to install it manually. Personally, I prefer to use MySQL Workbench, which in addition to being generally more awesome is also easier to install (another MSI file...).- OpenSSL - The ApacheLounge binary includes it (for HTTPS serving's sake), and the PHP archive also includes it (for HTTPS consumption's sake).- XAMPP Control Panel - obviously, no. But honestly, how much have you used that control panel? Only to occasionally restart Apache? There's the Apache monitor tool for that... I believe it was part of the ApacheLounge binary.- Strawberry Perl - you don't use Perl, do you?- FileZilla FTP Server - If you only access your files locally, you don't need it. If you absolutely need an FTP server on your home computer, installation is trivial.- Tomcat 7.0.21 - do you use JSP? If not, you don't need that.
    Ok, all in all, you are saying that installing components separately is better(since some are not needed)-and not difficult.And another thing, since I already have 3 local sites,do you thing it will be difficult to transfer them in this new setting you are mentioning. This last is what bothers me most.
  16. PHP - the language - is interpreted by an interpreter.PHP - the interpreter - is written in the C language, which is compiled. What you have on your machine is a version of the PHP interpreter. That interpreter itself is considered to be "compiled/built" since it was produced by a compiler. You don't have a compiler. So, when the page says It's referring to the thing that produced the interpreter. You don't upgrade the compiler, since you don't have one. You upgrade the interpreter with another one that was generated by another compiler.
    Good explanation
    Since you're currently using XAMPP, it might be a better idea to uninstall it before you continue, and then install Apache separately. A compilation of Apache built with VC9 that PHP recommends is ApacheLounge's compilation. Installation instructions are found within the zip archive. PHP builds are found on a separate page on the PHP site. Since you'll be using ApacheLounge's build, you'll need the "VC9 x86 Thread Safe" build. The "VC9" part is important for XDebug, and the "Thread Safe" part is important for Apache.
    Are you sure this is the way to go, in other words you are saying to get rid of XAMPP, yes, but what if XAMP offers some features that are really needed and this ad hoc solution you propose does not. I have set 3 local sites with XAMPP and I am intimidated having to set up these again "manually". I am just asking.
  17. I just run this tool here http://xdebug.org/wizard.php and here is the message i get: The compiler (MS VC6) that this PHP was build with, is no longer supported. Please upgrade to a version that was built with MS VC9. It seems there is a problem with the compiler and i cannot install xdebug unless upgrading. The question is how i upgrade the compiler, do i just upgrade PHP(i have PHP 5.3 running on XAMPP)? I have never upgraded PHP on XAMP, how am i going to do it? Do i just unzip in the specified folder? P.S One last question, since PHP is interpreted why a compiler is needed?

  18. I am using netbeans to develop PHP applications and now i am in search of a good debugger. In the Netbeans site Xdebug is proposed as a debugger but i am interested also on what you have to say. Thanks.

×
×
  • Create New...