PDA

View Full Version : Hi had to install wamp again now errors with scripts


nanny
03-23-2010, 04:29 AM
Hi does anybody know why all of a sudden my scripts would be showing errors everywhere by installing wamp again. The apache on my local server keeps shutting down all by itself as well and I never had that problem previous. You see I lost my computer and files everything so I had to buy another and download the files from the remote server. But now it is all a shambles.
The wamp is php 5.30 mysql 5.1.3.6

Hope somebody has a clue - I'm clueless....

davidj
03-23-2010, 07:24 AM
php versions differ obviously. Maybe you wrote your scripts using version 4 and have upgraded to 5

Post the errors your getting

nanny
03-23-2010, 10:31 PM
Hi davidj

Well I had the same wamp server before so the scripts were working the same 2.0i never changed. Just using Vista now instead.
In every list/menu I get

<br /> <b>Notice</b>: Undefined index: SearchString in <b>C:\wamp\www\insalonspa\jobs\howto.php</b> on line <b>82</b><br />

Notice: Undefined variable: error in C:\wamp\www\insalonspa\jobs\jobpost.php on line 245


For my radio button:

Notice: Undefined index: classcatid in C:\wamp\www\insalonspa\jobs\jobpost.php on line 264
> Full Time


example of radio button:

<input type="radio" name="classcatid" value="fulltime.gif" <?php if (!(strcmp($_POST['classcatid'],"fulltime.gif"))) {echo "CHECKED";} ?>>



This is happening in everything not just these, any isset() etc.
I read to change the my.ini to have:

default-storage-engine=MyISAM

when I entered that and restarted I ended up with being locked out of phpmyadmin and I went into config file and entered password and then I could get back in but still the same problem - nothing changed.
The only one working is one wordpress the other folder of wordpress just won't start up and the apache crashes.

davidj
03-24-2010, 07:03 AM
These are warnings which tell you that you are not complying with coding standards.

Other languages force you to adopt a more stricter coding methodology. PHP however doesn't mind if you don't declare a variable before you use it but the error handling is set up to Nag you. [<< bit like my wife]

Open PHP.ini

scroll down to the ERROR HANDLING section

locate the live directive line. Its the one which is not commented out with a leading semi colon. It will look like this...

error_reporting = E_ALL

Change it so it looks like this

error_reporting = E_ALL & ~E_NOTICE

Bounce the services [Restart All Services from WAMPSERVER]

nanny
03-25-2010, 03:36 AM
Hi davidj
Sorry I frantically changed things before getting to read your reply.
What I did was download php 5.2.5 and have that instead of 5.3.0 but is weird because on the remote it is 5.3.6 or at least later than what I had.

I also went through every mysql table and changed the engine to MyIsam and well, it worked.
But this is still going to be a problem if a clients server has php 5.3.0 etc.
I don't understand why the coding would differ.

Also what is the difference in coding mysql under MyIsam to InnoDB?

Is it how it references the data?

Whilst I have you on hand I really need to learn some more mysql where do you suggest. I google but it doesn't give me a good option.

You spoke a while ago that I should learn oop. Well I got the dummy's version book and I understand how to do a one liner code but for a whole program like a survey using the database within - I can't seem to get my head around it.
I understand by the logic of the classes - I guess it is like a recordset but I had a look on nettuts etc. and there was a lot of remarks regarding security etc. Hope you know of any good websites that give a clear tutorial for a whole script process not just a few liners.

Thanks heaps if you do.


Cheers
Theresa

davidj
03-25-2010, 07:00 AM
I also went through every mysql table and changed the engine to MyIsam and well, it worked.
But this is still going to be a problem if a clients server has php 5.3.0 etc.
I don't understand why the coding would differ.

This had nothing to do with the storage engine. It was a warning as explained above.

Also what is the difference in coding mysql under MyIsam to InnoDB?

http://dev.mysql.com/tech-resources/articles/storage-engine/part_3.html

Whilst I have you on hand I really need to learn some more mysql where do you suggest. I google but it doesn't give me a good option.
http://dev.mysql.com/

Hope you know of any good websites that give a clear tutorial for a whole script

I teach an OOP class

nanny
03-26-2010, 03:54 AM
thanks davidj
i did that but no errors came up.
Thanks for the links will check them out just have 6 websites on the go this week so will do so after that...

Thanks again...