Menu

Undefined Variable errors

Help
pattiea
2005-08-31
2013-06-03
  • pattiea

    pattiea - 2005-08-31

    This looks like such a cool program to do what I want to do.  Just a simple capture and then add them to an SQL table (I really LOVE that part).  I just don't get the erros I've been receiving.

    Every step of the way, I'm getting undefined variable errors.
    Step 1
    Notice: Undefined variable: files in /home/admin/domains/streetsmartlive.com/public_html/phpform/copyfunc.php on line 34

    Step 2
    Notice: Undefined variable: error in /home/admin/domains/streetsmartlive.com/public_html/phpform/fields.php on line 174

    Step 3
    Notice: Undefined variable: required in /home/admin/domains/streetsmartlive.com/public_html/phpform/process.php on line 360

    Notice: Undefined variable: required in /home/admin/domains/streetsmartlive.com/public_html/phpform/process.php on line 360

    Notice: Undefined variable: required in /home/admin/domains/streetsmartlive.com/public_html/phpform/process.php on line 360

    Step 4
    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 181

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 181

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 181
    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 257

    Notice: Undefined variable: hvalue in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 258

    Notice: Undefined variable: evalue in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 259

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 260

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 257

    Notice: Undefined variable: hvalue in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 258

    Notice: Undefined variable: evalue in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 259

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 260

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 257

    Notice: Undefined variable: hvalue in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 258

    Notice: Undefined variable: evalue in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 259

    Notice: Undefined variable: active in /home/admin/domains/streetsmartlive.com/public_html/phpform/process2.php on line 260

    Step 5
    Notice: Undefined variable: gen_thank in /home/admin/domains/streetsmartlive.com/public_html/phpform/process3.php on line 213

    Notice: Undefined variable: db in /home/admin/domains/streetsmartlive.com/public_html/phpform/process3.php on line 220

    Notice: Undefined variable: db in /home/admin/domains/streetsmartlive.com/public_html/phpform/process3.php on line 268

    What have I done wrong?  I have chomed my files correctly, and uploaded everything in ASCII.

    What dO i do now?

    Thanks in advance
    Pattie

     
    • TNTEverett

      TNTEverett - 2005-08-31

      It is a cool program I use it quite alot. 
      Everything snowballs after the first error.  If you don't solve the first one, the forms will never work. 
      The first error occurs because the program can not find the form it thinks it created. 
      The process3.php file calls a function defined in the copyfunc.php file.  Line 34 uses a variable that should have been passed from process3.php.  In you case the variable it is looking for should be
      copy_dirs("phpform", "use/".$form_name);
      where phpform is the install directory and form_name is the name of the form you generated. 
      Open your process3.php file and search for "copy_dir".  Check the values against what I listed above.  Are they the same?  If not, correct them and try again.  Note the only thing you should change is the first "" quoted value, and only if it is wrong. 
      Try this and post your results so I can follow your progress. 

       
    • pattiea

      pattiea - 2005-09-03

      Thanks for your suggestion.  Sorry it has taken me some time to respond.  I have a terminally ill family member and had to take care of some stuff.

      Your suggestion was not successful.  I'm still receiving the same errors on the same lines.  This is happening before I even get to creat a form, so I did not quite understand why the program would already be looking for forms.

      Thanks again, and any other suggestions you might have would be appreciated.

      Pattie

       
    • TNTEverett

      TNTEverett - 2005-09-05

      This kind of thing is very difficult to troubleshoot because the program has worked in many installations.  These problems are due to sever issues, installation issues, and in some cases operator error.  You can try reinstalling.  You can try sending me specific info on your instalation or specific files. 
      For the errors to occur the programs you have listed with errors must execute.  They only execute as part of the form generation process, some earlier than others. 
      I'm willing to help but without complete access to your site it could be a long tedious process.

       
    • pattiea

      pattiea - 2005-09-06

      Thank you for your help.  I re uploaded the files and it still is giving me the same errors.  I have sent an e-mail direct to you. 

      Thanks
      Pattie

       
    • TNTEverett

      TNTEverett - 2005-09-08

      Problem solved by additional debugging outside this forum.  Main Issue: Server had specific php messages tuned on by default. 

       
    • pattiea

      pattiea - 2005-09-21

      Just a HUGE thank you!  Sorry it has taken me so log to say that, have been dealing with a very ill family member. 

      Anyway, you went way above & beyond to help me get this working ad I appreciate ti.

      Pattie

       
    • jwhoover

      jwhoover - 2005-09-30

      Im having the same problem and the final answer (outside this forum) didnt help since I dont know what they are.  I had it running fine on my old machine, but a new machine and new AMP installation has it throwing errors everywhere.  Any chance of posting the PHP fix here?
      Thanks.

       
    • Serge c

      Serge c - 2006-01-08

      Yes, I to am having the same problem.  Sure would be nice if the solution were actually published such that the rest of us could make us of it.  The last indication we are given is that "Server had specific php messages tu{r}ned on by default".  What is the setting?  What are the messages?

      Can you please post the fix here so the rest of us can proceed?

      Thanks & regards...
      S.

       
      • TNTEverett

        TNTEverett - 2006-01-11

        OK, so you are in control.  Now lets get to the exact errors you see.  What messages are displayed, and exactly when are they displayed?

         
    • TNTEverett

      TNTEverett - 2006-01-08

      The solution was provided by the web host support person.  This is server side setup that will need to be solved by your host support person. 
      Contact your host.  Explain what you are doing and what the error messages are.  They should be able to help. 

      One other thing you can do, which I do all the time is install something like Uniserver (http://www.uniformserver.com/).  This would allow you to move your form to your local PC and test all the forms and server parameters that would affect your forms on your web hosts's server.  WARNING: This is not suggested for the average user.  There are many things that can go wrong and only make things more confusing. 

      As always I suggest to everyone posting to this forum with a problem that they return after solving the problem and provide as much detail on the solution as possible. 
      I love this program and use it all the time.  I am here to help you getting running so you will love it too. 

       
    • Serge c

      Serge c - 2006-01-11

      Thanks but...I am the web host person.  I am running the configuration locally, that is with Apache 2 and PHP5 on the local machine using Win XP with full admin privs.  I haven't even considered setting this up on a web hoster yet.  If I can't get it to run locally, what confidence can I have that it will run remotely on a web hoster?  I installed the software as per instructions and invoked it.  On the first go, I received the first of the invalid parameter errors, and it cascaded from there.

      Hope that helps.

      Regards...
      S.

       
    • Serge c

      Serge c - 2006-01-20

      At step 1 I get the following error messages:

      Notice: Undefined variable: files in D:\Data\WWW\htdocs\phpform\copyfunc.php on line 34
      You have created the following forms:

          * sdgf ... delete?
          * sampleform ... delete?
          * form1 ... delete?

      I then, for example, enter the number of fields, which is 2 and click "next".

      At step 2 I get the following error message:
      Notice: Undefined variable: error in D:\Data\WWW\htdocs\phpform\fields.php on line 174

      And on it goes...

      Hope that helps...
      S.

       
      • TNTEverett

        TNTEverett - 2006-01-20

        This is most definitely an installation or server setup error.  Since I have no clue how your server is setup I can not tell you what to fix.  The first error you receive is a simple copy function (move file from to).  This means one of two things, either the from file does not exist, or the to directory does not exist or can not be created. 

        I have used Uniserver on my own PC for development very successfully.  Never modified the default installation. 
        http://www.uniformserver.com/

         
    • Tom Patterson

      Tom Patterson - 2006-01-29

      Well, I just followed the installation instructions myself and installed the program on my own computer, which has an Apache server operating under windows.  The very first time I go to http://localhost/phpform/ I get the same error in copyfunc.php on line 34.

      Any suggestions on what file I can set up so that one exists, or what to directory to create?

      -Tom

       
      • TNTEverett

        TNTEverett - 2006-01-29

        Create a folder called "use".

         
    • Nuken

      Nuken - 2006-02-11

      I had the same problem with my apache server running under windows. I have started debuging it. Heres what I have so far:

      To fix the error in copyfunc.php, add the following on line 38 of copyfunc.php:

      else 

      $files = "";
      }

      Than you will receive an error in fields.php.
      On line 172 of fields.php add the following:

      $error="";

      Hope this helps...

       
    • Nuken

      Nuken - 2006-02-13

      In process.php and process2.php at the top of each page add:

      <?php
      //Show all errors, except for notices
      error_reporting(E_ALL & ~E_NOTICE);
      ?>

       
    • Nuken

      Nuken - 2006-02-13

      Sry  and process3.php also. That should work now.

       
    • Musawir Ali

      Musawir Ali - 2006-02-17

      those are all notices. notices are not errors. The program is running fine, you just have a verbose logger. The solution to this is to turn notices off. The webserver will then stop spitting out those notices and the program will work perfectly. Due to these notices that are being displayed, the headers are not going through properly and everything is halting.

       
    • bacon110

      bacon110 - 2006-02-24

      Thanks Musawir!

      How do I turn off notices?

      I search the php.ini and didn't find anything about notices except for portgeSQL.

       
    • bacon110

      bacon110 - 2006-02-27

      Nobody knows?  :(

       
    • Musawir Ali

      Musawir Ali - 2006-02-27
       
    • bacon110

      bacon110 - 2006-02-27

      thank you

      This is what I changed if it helps anyone:

      display_errors = Off

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.