Jump to content

anita999

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

anita999's Achievements

Member

Member (2/5)

0

Reputation

  1. All, I installed exim for Linux however I was wondering if it can be integrated with mysql? I cannot find installation package to do this? WHat do I need to do? My understanding was that mysql DB would store the emails etc. Any hints or advice would be helpful. Thank you, Anita
  2. I am moving towards Linux and I would like to get a PHP binary download. I could not find one on the PHP web site. Is there one available? If not, what do I need to do? I've tried looking on Google but I have had no luck finding one specifically for Linux. THanks
  3. I am new to PHP and have been using it primarily with mysql. I have a login form and I use sessions for each PHP page in the web site. A couple questions: 1. Some of my PHP pages have inputs like 'user_id' i.e. doSomAction.php?user_id=john. Now if someone from the outside wants to access this page, they could type in the URL directly and try to add in the user_id=john in the URL or other ids. So, if this page has features like updating the DB etc., a hacker could then populate the DB. I want to prevent this. I thought about checking the $_SESSION variables to check if a user is logged in to prevent outside hackers. However, if a hacker is registered in the system, he could login and then try to access the PHP directly with the URL with user_id='john'. What are some other options? Thanks Anita
  4. I have been using the PHP mail() method to send email using an SMTP server installed on my machine. For the most part it worked well. But lately, it seems to timeout after 30 seconds. Other times, it seems to sit there and I can see an email has been sent but when I check the return value of mail() it looks like it has failed. It seems a bit flaky. I want to narrow down whether it is the PHP function or the SMTP server I have installed. Can anyone tell me if there is anything special to make mail() work or if I need to increase a timeout value and how. Thank you
  5. Thank you. I tried the sample code but when the image is printed to the screen, it prints out symbols instead of the image. I tried reading in a gif file and changed all references to the code from jpeg to gif. But that didn't work either.
  6. I have a list of items with their images displayed in a column. I would like to resize the images into small fixed size images. Is there a way to do this efficiently since I have about 10 items per page. I also do not want resized images to be produced in the file directory? Any suggestions on how to do this efficiently would be appreciated. Thanks
  7. I am creating a site that will store thousands of images using a form input/PHP. Is it better to store the image in a filesystem and have a link to it from the mysql DB? Or is it better to store it directly in the mysql DB as BLOB? The images would be displayed on the Web. I need strong reasons for filesystem versus mysql DB. Here are some items and thoughts: 1. pictures in my site would be stable i.e. they would be relatively the same over a period of months. 2. If we don't use DB, we will have to manage the pictures ourselves on filesystem, i.e. sorting, unique ID, backup, portability, mobility from one server to another, etc... 3. I would agree that there is cost to insert and query pictures from DB, the question is how costly it is compared to # 2 This problem must exist for sites that manage photos or video clip. I believe that sites like YouTube do use DB instead of plain file systems for the reason as described in item #2. Does anyone know? I can see the point of using some kind of pointers stored in DB, only the pointers but still need to think how about the back end and operation of file systems vs DB. Any advice is much appreciated. Thanks, Anita
  8. In one of the messages above, it was stated that it would be better to store the images in a filesystem and then have the DB link to the file. I can understand that storing it in the DB would take up a lot of space, but what would be strong reasons to store it in the filesystem instead of the DB directly? Is the assumption that the web sites that have a large subscriber base i.e. several hundred thousand subscribers would store the images in their filesytem instead of in the DB as a blob? Thank you, Anita
  9. By validation I mean, to check that the file is indeed a gif or jpeg etc and it is not some malicious file. Thanks
  10. Could someone please recommend an example of uploading an image (jpeg or gif) using a form and doing the PHP validation of the image and then inserting it into a mysql table as a blob. I'm also interested in the validation part since I want to check whether a PHP script is inserted as part of the comments on the image and any other checks that can be performed to avoid insertion of the image into the DB in the case of a malicious image file. Thanks in advance, Anita
  11. I have a form which has the following part defined: <tr> <td> Description</td> <td><textarea name="mydescription" cols="50" rows="5"> <?php echo $fields[mydescription]?></textarea></td> </tr> Now, when I enter in some sentences into the textarea, and do a submit, I then extract the value and insert into the mysql db. The field in the DB is defined as a longtext. The problem is that this seems to only work if my sentence has about 15 words (approx 2 rows). If I go beyond 15 words, it won't store it. I don't seem to be getting any errors output either. I was thinking that perhaps the form itself is causing the issue since when entering in the data, it does a wrap around. Note if I do 15 words or less, it is stored properly in the DB. Any ideas on how this should be done? Thanks
  12. So essentially when I verify the session variables on each page, I will need to do a dbaccess to a users DB table...? Thanks
  13. Try looking at http://www.white-hat-web-design.co.uk/articles/php-captcha.php There is a good example there and I think it is using a jpeg image like you. It refreshes everytime. Look at CaptchaSecurityImages.php and it might help.
  14. I am new to PHP and need to create a Login/Register page. I've completed the Registration part i.e. it will store user, email and password info and it sends a validation email to the user. The user needs to click on this URL to activate the account. For the Login, I will verify that the user and password exist in the DB and then store the user, password, etc variables in the _SESSION variable. From what I can tell, is that these session variables are used to pass around session information from page to page for a user that is logged on the web site. Now, if the user successfully logs in, I want to redirect that user to a page where he/she can do some searches or see a list of information. However, I am concerned that someone could actually access this page directly by typing in the URL plus the PHP. What are ways to prevent a user from doing this kind of direct access? Any good tips or URLs that describes this would be appreciated. Thank you in advance. Anita
  15. I tried both suggestions but couldn't get anywhere. But, I finally found something that worked and I don't know why it worked. Could someone please explain it? I'm not a Web expert and all of this stuff with cookies and sessions is new to me. I commented out two lines the php.ini: ; The path for which the cookie is valid. #session.cookie_path = \ ; The domain for which the cookie is valid. #session.cookie_domain = Thanks for everyone who has been responding. I appreciate your feedback and have learned a lot from your responses. Anita
×
×
  • 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.