4 Replies Latest reply on Aug 3, 2009 10:05 PM by jarmelo

    Help with php/cookies login error message

    jarmelo

      Hi

      I'm working in DreamWeaver CS4, On a Mac 10.04 OSX system. I am using php and a cookies if (isset) function


      Im  trying to create and error message for users who try to login to the site. but can't because there is no connection to the database as of yet.


      I have a connect srcript and a login script as well as the login and registration page.

           when the user tries to login in I get a syntax error mesage instead of getting the phrase," A problem connecting to the data base. Please try again later."

      How can I resolve this issue, Thanks your help it is greatly appreciated. To view the php code/connect script used in the login registration follow this link the script will available there. http://http://www.camtamkalaboration.com/products.php

        • 1. Re: Help with php/cookies login error message
          DwFAQ Level 4

          Heya,

           

          The answer is simple: create a local testing server with php, Apache, MySQL, and phpMyAdmin on your Mac. Connect to your local testing server/database (located on your Mac as localhost) and you'll be good to go as far as local development on your testing server. I can help you set it up in Leopard but Tiger is a little outdated so you'd have to Google info on that. If you decide to upgrade to Leopard let me know and I can walk you through the steps of setting it up!

          • 2. Re: Help with php/cookies login error message
            jarmelo Level 1

            Thanks buddy, that makes sense of alot of things..! but how would I go about upgrading from tiger to  leopard?

            • 3. Re: Help with php/cookies login error message
              DwFAQ Level 4

              jarmelo wrote:

               

              how would I go about upgrading from tiger to  leopard?

               

               

              Buy Leopard, insert disk, follow instructions.

               

              You can instal php (which is built into Leopard) by renaming a file and uncommenting a line then enabling web sharing in System Preferences but I use entropy because it has the GD enabled for CAPTCHA and other features. There's a 10.4 version on their website but it mentions it's an older, unsupported and probably insecure version. You should use entropy Leopard version 5.2.9-7 for Leopard/ADDT development.

               

              After you get php installed you need to install MySQL which is easy to find through searching and straight-forward to instal. Then instal phpMyAdmin and you'll be good to go!

               

              As mentioned earlier I can walk you through the steps more thoroughly if you decide to upgrade to Leopard. There's some other steps involved: You need to configure virtual hosts so that it points to your Sites folder on your Mac and each folder in Sites folder are for each site you have so that entering site1 goes to ~/Sites/site1 on local testing server and entering site2 goes to ~/Sites/site2 in local testing server, etc. very, very easy to setup. Just edit hidden hosts file in etc folder and username.config file in apache2 hidden folder.

               

              There's other tutorials out there that show how to do it but most don't have all the info. I'm working on a step-by-step tutorial on my website but it's not finished yet. Maybe it'll be ready by the time you decide to upgrade to Leopard.

              1 person found this helpful
              • 4. Re: Help with php/cookies login error message
                jarmelo Level 1

                lol you said a mouthful, will do...

                Thanks..