How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1426
Experience:  M.S. in Internet Information Systems
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

**For the Doctor** question in Security and finih up the apartment

Resolved Question:

**For the Doctor** question in Security and finih up the apartment project
Submitted: 1 year ago.
Category: Homework
Expert:  TheDoctor replied 1 year ago.
Hello again! Thank you for requesting me.

I am not sure if I can answer your security question or not. I will let you know once I see it.

I absolutely can finish up the apartment project for you.

Please upload whatever you have to http://ge.tt.

Them provide me with the link. Thank you.
Customer: replied 1 year ago.

http://ge.tt/1Oli2ud?c


 


The security is pretty simple I almost finish it. All what I need are the missing codes, you will see. It wil take you maybe 5 minutes.

Expert:  TheDoctor replied 1 year ago.
Thank you,

I will contact you once this is complete.
Expert:  TheDoctor replied 1 year ago.
Hello again,

A lot of what you highlighted is actually already completed. There simply needs to be more of it. And you certainly do not need to enter real addresses. You're professor will not see anything you enter anyway.

What your professor meant is that you did not send him the alter statements that I sent you. You should have sent those to him. Because you didn't, the database he has will not work with the site.

What he is asking is that you send, in a text file, all of the SQL necessary to create the current database that functions with the site. I will send you that text file. You would just zip it up along with your site when you submit everything to your professor. He can then use the text file to recreate your database and test your project.

I will contact you once all of these changes are complete.

Thank you
Expert:  TheDoctor replied 1 year ago.
Hello again!

You can download the security lab here:


And you can download the apartment project here:


In the apartment project, I included the text file that you need to send your instructor. It is called database.txt

This is what he wants. He wants your current database so that he can test your project.

I included screen shots of each item functioning, as your instructor requested.

Now, when you test the email functionality, you should know that you cannot simply test it. WAMP or XAMPP will not allow you to test emails without something to actually catch those emails. Emails are sent to an SMTP server for processing. You do not have an SMTP server running on your computer.

So what you willl do is go here and download the email test tool. After downloading it, install it. After installing it, run it. Do not change any settings. Just let it run in the background.

Now, when PHP triggers an email, the email test tool will intercept it and open it up in your system's default mail program. That way, you will actually be able to test the email functionality. Without this tool, PHP attempts to send an email to port 25 on your computer, which is a closed port, and the message dies. On a web server, there would be an SMTP server already set up.

I did not change the view pages because I did not see a reason to change them and because your instructor suggests that any changes from previous versions will make him unreasonably irritated. Honestly, if he were my professor, I would be filing a complaint with the school. "If you don't name your file correctly you get a 0", "If you change from previous versions and don't provide a reason that I find good enough, you get an F". It seems his instructions are more about his ego than about teaching you anything.

In any case, the email functionality and the search functionality is what is new in these requirements and they have both been implemented successfully.

Let me know if you have any questions. I'm here to help.

Please remember to rate my answer. Thank you so much!
Customer: replied 1 year ago.



I am getting this error when I click on view offers an requests. It looks like something is not linking.



Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in X:\xampp\htdocs\ProjectFinal_atlanta\Database.class.php on line 11


No connection could be made because the target machine actively refused it.

Expert:  TheDoctor replied 1 year ago.
Hello again,

That is not an error in my code. It is an error in your environment. It means either that you do not currently have MySQL running, you have internet security software running that is blocking the connection to MySQL, or the connection data for the database is not correct for your system.

As I have mentioned in the past, you must open up Database.class.php and look at the connection variables at the top. If they do not match your system, you need to change them. They are currently set to localhost, root, no password, and a database called mlopez.

From that particular error, it looks like MySQL is not currently running on your computer. Localhost is actively refusing the connection, which means that it is not listening on that port. That would seem to indicate that MySQL is not running.

This has absolutely nothing to do with my code.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1426
Experience: M.S. in Internet Information Systems
TheDoctor and 11 other Homework Specialists are ready to help you
Customer: replied 1 year ago.

Yeah mysql was not running. But, I am getting another error. I fixed the password XXXXX I did the last time. If I open the file from last week and it runs just perfect but if I try one that we just did I am getting this error. I also tried logout and login and get the same thing. What do you think is the problem? The system is connected to appache, mysql and cmd is opened and working


 


.



Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) in X:\xampp\htdocs\ProjectFinal_atlanta\Database.class.php on line 11


Access denied for user 'root'@'localhost' (using password: NO)

Expert:  TheDoctor replied 1 year ago.

You may think that you fixed the password XXXXX the file, but you did not. Open up Database.class.php. Make certain that it is the new copy of Database.class.php that you have open.

Look at the error message. It states that there is no password. So you either did not save the changes to the file or you did not make the change correctly. It is attempting to connect with "root" and no password. Make certain that you update that variable and that you save your changes, and that you have the correct copy of the file open.

PHP does not lie. If it says that there is no password (which is what that error is saying), then there is no password. You didn't successfully update that file. Make the changes, then go back to your browser and press CTRL-F5.

Customer: replied 1 year ago.

Thanks I reset the system again and it works. Now I going to deal with the email part. Thanks for your patience. I just rate you, make sure you get your money and let me know if I owe you something else. Your knowledge is extremely valuable.

Expert:  TheDoctor replied 1 year ago.
Hello again,

Yes, I received you rating. Thank you for your generosity. It is greatly appreciated.

While testing the email, if you do not run the test email program, you will likely get a large error. This is because the mail function will fail. You must be running the test email program first.
Customer: replied 1 year ago.



I think we have a SMTP server set up and is giving this error. I tried the program that you gave me but I do not know I did not get anything probably is because of this set up.


Error:


Warning: mail(): Failed to connect to mailserver at "smtp1.spsu.edu" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in X:\xampp\htdocs\ProjectFinal_atlanta\Notifications.class.php on line 45



THIS IS PART OF php.ini that I think has to do with the error.


[mail function]


; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury


SMTP = smtp1.spsu.edu


smtp_port = 25



; For Win32 only.


; http://php.net/sendmail-from


sendmail_from =XXX@XXXXXX.XXX


; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program files\xampp) fakemail and mailtodisk do not work correctly.


; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.



; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)


;sendmail_path = "\"\xampp\sendmail\sendmail.exe\" -t"



; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the \xampp\mailoutput folder


;sendmail_path = "\xampp\mailtodisk\mailtodisk.exe"



; Force the addition of the specified parameters to be passed as extra parameters


; to the sendmail binary. These parameters will always replace the value of


; the 5th parameter to mail(), even in safe mode.


;mail.force_extra_parameters =



; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename


mail.add_x_header = Off



; Log all mail() calls including the full path of the script, line #, to address and headers


;mail.log = "\xampp\php\logs\php_mail.log"

Expert:  TheDoctor replied 1 year ago.
That error is exactly what I was telling you would come up.

If you are running XAMPP on localhost you do not have an SMTP server running. XAMPP does not come with an SMTP server. That is a completely different set of server software that you would need to install on your local computer. However, you really do not want to do that.

You need to download, install, and run the program that I gave you a link to. It listens to port 25 on your computer (port 25 is the SMTP port). It intercepts messages and then displays them to you.

It does not matter if your class has an SMTP server installed. They probably do. You would not change anything with any of the code. To test the code on your local computer, you must be running software on your computer that is listening to port 25. The link I gave you is exactly such software.

If you do not install the software that I pointed you to, you will always get this error when running locally. You will not get the error once you upload to a server because a server likely already has an SMTP server running.

Pleas do not go changing any php.ini settings. You do not need to and you will likely just break this. There is nothing that you need to change. It is working exactly as it is supposed to. You do not have an SMTP server on your computer. You need to run the software that I pointed you to. It is a completely different protocol than is provided with either XAMPP or WAMP.
Expert:  TheDoctor replied 1 year ago.

By the way, PHP will automatically use the default SMTP server for the server you are running on if you make absolutely no change to php.ini

So if you touched nothing and uploaded this to your school's server, it would work. Or if you touched nothing and ran the software I gave you, it would work.

 

You are not going to be able to change your school's ini file, so why alter ini settings now? Were you directed to do so? It seems to be way out of scope for the project. Unless you received that address from your course and were explicitly instructed to alter your php.ini file, you should not be doing it. I tested that address, and it is not accepting connections. So it would seem like you weren't instructed to do this.

 

If you put the ini file back to default and use the test software, it would work.

 

Customer: replied 1 year ago.

In a previous lab work the professor made us to change a the php.ini a little bit. That was the first week of class. The purpose unknown. But after that date I have not changed anything. So, should I install the test mail server tool where I have the xampp or in my program files?

Expert:  TheDoctor replied 1 year ago.
Well, you are not turning in that php.ini file, so don't get hung up on it. Your instructor was probably attempting to help you test email functionality but in a really unnecessary way. In the real world, you would rarely, if ever, change that setting in the php.ini file.

First thing you need to do is change that line in your php.ini file back to localhost:

SMTP = localhost

Then you need to restart XAMPP. It does not matter were you install the test email program. What is important is that it is running. Install it wherever. Then run it.

After you have restarted XAMPP, then test the pages. The test email tool that I gave you makes it so that you don't have to mess around with the php.ini file in order to test emails locally. So go ahead and test with it. The email work, I assure you.
Customer: replied 1 year ago.

Hello again; I checked with the instructor and he wants us to use the settings that I showed you on a previous message. I think that he wants the project this way because he wants to test it himself. But I still have a doubt as far as meeting all requirements. Ok, if use my school email address it works fine, I do get the message in my inbox but if I use a fake one or any other email address I do get the error. It only accepts school's email addresses but if I want to see the message I need to use my personal school email address.


http://ge.tt/9v8cQ4e/v/0?c


The above linked document probably explains what we did in the past and how we did it. You know he loves to take points I just want to make sure that we are not missing anything. Otherwise I would leave it as is and use my email address for all the offers/requests that use in the data base. If I owe you something else just let me know. Thanks

Expert:  TheDoctor replied 1 year ago.
That just means that the school's SMTP server is blocking relay attempts. Most SMTP servers do that.

You are not turning in your php.ini file. It makes absolutely no difference to the code you are turning in whatsoever. No matter what you put in the php.ini file, the code that I gave you is the code you are turning in.

Those instructions that you have are for your testing benefit only. Your instructor will never, ever, ever see what you put in your php.ini file.

However, one item you should change is in Notifications.class.php

Near the top, you will see private $_from = "info@atlantarentals.net";

Change that to your school email address.
Customer: replied 1 year ago.

I just noticed that the reset button on search.php does not clear the city or the dates. In chrome displays a drop down calendar but in IE or Firefox doesn't. In IE and Firefox displays the final days selected in Y/D/M instead of M/D/Y. Do you think we can fix these details?

Expert:  TheDoctor replied 1 year ago.
The reset button is a built-in browser feature.

The calendar drop-down is an HTML5 feature supported by Google Chrome. It is not supported by IE or your version of Firefox.

Those items we cannot change.

What is "Final Days Selected"?
Customer: replied 1 year ago.

the outcome of date range boxes

Expert:  TheDoctor replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1426
Experience: M.S. in Internet Information Systems
TheDoctor and 11 other Homework Specialists are ready to help you
Customer: replied 1 year ago.

http://ge.tt/1KsivTe/v/0?c


 


I know you are going to be upset, I am too. I can swallow everything that he says except the validation point because is only true if you INSERT the record using cmd not if you use the program that we designed. The other one is the search issue, per the instructions he stated "by city and date" not "by city or date". My question: How can you implement validation when using cmd? I am afraid to challenge him because he is not happy with the database.class. I understand most of what you did, but not all.

Expert:  TheDoctor replied 1 year ago.

Your instructor does not mean CMD. He is talking about the site. The site does have user validation. You need to ask him to clarify, because in the system that I sent you, neither form will permit you to submit the form without filling in data. If you modified either file and caused a JavaScript error, then it would allow you to enter no data. However, submitting with no data is impossible int he copy that I have.

I just confirmed in Chrome, IE 8, and IE10. So we know that the validation works in both old IE and newer browsers. Is there a link to your site where it is posted for class? Perhaps something broke since I last sent you the project.

For the city and date thing, I would challenge him if I were you. Tell him that he stated city AND date, not city OR date. He should know better. Instructions in development need to be specific and say what that mean and mean what they say. THAT is a basic concept of development.

The comments about the database.class.php are rather silly. That file contains database functions only. It is only used to interact with the database. I can assure you that multimilllion dollar corporations use exactly the same type of file for their systems. Now, if you were dealing with a significantly larger system, you would create a bunch of different files like this (called models). Though it seems that your instructor is not at all familiar with object orientation or the model, view, control concept. Both of which are basic concepts.

So it appears that he gave you a B. However, the validation does work (unless something broke since I last saw the project. Again, if you have a link, please give it to me).

And he took off points for that offers/date thing. The only thing he could say about that is if the rubric was available to you before implementing the code, then you should have consulted the rubric.

It looks like you would have gotten an 'A' had he not given you 0's for the validation part. The statement "there is no validation of user input" is simply not true. Again, send me the link if it is available.

Otherwise, I would push the issue of the validation. You did have user validation and submitting without entering anything is not possible. Was he missing the check.js file?

Customer: replied 1 year ago.

I do not have a link. I sent him a zip file with the codes. In my system the site works fine it does not allow me to add anything to the database unless all the text fields are filled out. I will take the chance and challenge him. Thanks anyway.


 

Expert:  TheDoctor replied 1 year ago.

Challenging your professor cannot hurt, and as a student, you should never back away from doing so when it is necessary. I have been a student several times in my life. Instructors make mistakes.

Can you send me exactly what you turned in? I would like to take a look and see if there is any merit to what he is saying. I wouldn't bring up the database.class.php thing with him. He didn't remove any points for that and he does not seem to be "upset" about it. He was just trying to provide you with what he things is constructive constructive feedback. However, I have been the project lead and lead engineer for high-profile, massive web-based information systems that receive millions of hits a day and bring in massive revenues. And I am telling you that your instructor is not quite right about that. If you were creating a completely procedural system, then yes, he is right. But you implemented object orientation and created a data model for your system. At the very least, it a database-wrapper, which was common practice for real-word web applications before MVC became popular. The way that he wants you to do things is actually not really done in the real world. It is amateur and does not reflect how things really should be implemented.

In any case, he didn't take points off for that, so do not get hung up on it.

I am assuming that the class is over and you cannot resubmit?

 

A B is not a bad grade. However, you definitely should have received points for the user input validation, which would have given you a better grade. If you can send the the exact zip file that you sent in, that would be great.

Customer: replied 1 year ago.

http://ge.tt/6uny9Ue/v/0?c


 


This is the file.

Expert:  TheDoctor replied 1 year ago.
Hello again,

Well, the validation works in what you sent him. Perhaps he has some type of internet security package that is blocking check.js

Here is what I would do if I were you.

Send him a message and simply state:

Regarding the user input validation, I did implement validation for every fields. The form, when submitted, runs through the functions in check.js. Per the instructions, each field must have a minimum length or else the form is not submitted. If any single field does not meet the requirements, then the word "FAILED" is placed next to that field on the page and the form is not submitted.

I do not know why you did not see this and do not understand why you are stating that there is no user input validation. There is user input validation and it works. I have tested it in Chrome, Firefox, IE8, IE9, and IE10. The forms will not permit the user to submit an offer or a request with empty fields. I am providing a screen shot of this. Is it possible that my check.js file is being blocked by something on your system? I do not understand why it does not work for you. I have had friends test it out and they confirm that the user validation works exactly as I am describing to you. I would appreciate if you could take a look. I worked hard on the user validation and it does function. While it may not be perfect, I certainly do not deserve 0 points for it.


Take a screenshot or two of the validation in action and send it along with your message. If you cannot send an attachment to him, post the image somewhere and give him the link to it. By asking him to take a closer look, he should see that you did indeed implement user validation and then modify your grade accordingly.

If he is unwilling to even take a look, then contact student services/academic support and ask for them to step in. Tell them that your professor made a mistake and that you would like the user validation for your project reviewed. You shouldn't have to do that... your instructor should review and modify the grade based on your message. However, if you do not hear back from him or he doesn't want to cooperate, then take it up with academic support (or whatever they are called at your school). Your instructor is paid to do a job and you presumably paid a significant amount of money for the course. There is really nothing in the world that you would pay thousands of dollars for and then accept less than excellent service, right? Why should a class or an instructor be any different?

You earned those points on user validation and you should receive them. Push the issue.
Customer: replied 1 year ago.

Hello; The professor did not change the points. He stated that he only used the cmd window to set up the database. For learning purposes only: how do you implement the same validation parameters that we have in the site within the cmd? I think we are missing a code in database.class.php. He is right, through the cmd you can do anything and it takes and moves the data or no data to the site pages.

Expert:  TheDoctor replied 1 year ago.
That is not what he stated in you grade. He stated that he could fill out the forms and not enter anything. That is what is written in his comment.

Did you send the exact message that I sent you.

He also stated that there were missing commands in your database file, which would have been run on the command line. And he was right that there were a couple lines missing and he removed 0.5 points for that. We are disputing that at all.

User validation has nothing to do with CMD. The section that we are referring to in the grade is the section under User Validation -- user input validation, error messages, and persistence.

He obviously has no idea what you are talking about.

To answer your question: That is not possible. There is no such thing as user input validation on MySQL command line. You cannot create customer errors, etc. That is not the purpose of the command line and that is not "user input".

I think you and your professor are referring to two completely different things.
Customer: replied 1 year ago.

He only sent one sentence, "I only used the cmd window to set up the database". But, he did not explain me what should I have done to prevent this to happening. I agree with you that the user never use cmd. But, an intruder may alter the data through the cmd..

Expert:  TheDoctor replied 1 year ago.
No, that still has absolutely nothing to do with user input validation. That would be security. If an attacker is to the point of having command line access to MySQL, you there is not much you can do.

I would reply to the professor and simply state. "I was not speaking of the database creation or insertion. I was speaking of the "User Input Validation" section of the rubric. The grading criteria is User Input Validation, Error Messages, and Message Persistence. That has nothing to do with CMD or creating the database."

I'm tell you. Your professor and you are not on the same page.
Expert:  TheDoctor replied 1 year ago.
You need to specifically point to the areas of the rubric you are referring. This is user input validation and the error message are evaluated. That has ABSOLUTELY NOTHING to do with command line. You have absolutely no control over error messages on the command line. Nor is there any type of input validation on the command line.

He is not talking about user input validation. For whatever reason, he is answering a question you didn't ask. You need to reply to him and simply say, "I am referring to THIS part of the rubric, not setting the database." He took off points for database setup, yes. And you don't care about that. Two different issues.
Customer: replied 1 year ago.

Let me know when you are online in order to make the deposit for the next task. I have something new for you.

Expert:  TheDoctor replied 1 year ago.
Hello again!

You can enter a new question here.

Please remember to start it with **For TheDoctor**

Thank you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience