PHP Not Working Correctly
Posted by: SgtLegend (---.vic.bigpond.net.au)
Date: June 14, 2009 11:59AM

Hi,

A few of my buddies told me to try out WAMP so i got it and finally got around to trying it out today. Took me some time to find a tut on how to install it on Windows Vista but i got it working perfectly fine. The only problem with the PHP side is that well its not working correctly. When it tries to load certain things it cant and spits out errors everywhere which shouldnt even show up since they never have on Apache2Traid.

Heres a screenshot.....

[nuketest.net]

That is what i see when i load the page and it keeps those errors on the page everytime. Ive gone through the PHP modules and settings to make sure everything is on and working and everything is. Ive noticed a few errors have gone away but not all of them have.

Any help would be appreciated.

Cheers,
Chris

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 14, 2009 01:15PM

badly written code..


ul have to open php.ini and change the error reporting not to show notices..


left click wamp> php >php.ini


FIND

error_reporting = E_ALL

AND CHANGE TO


error_reporting = E_ALL & ~E_NOTICE

then save and restart wamp.



PLEASE NOTE - this is not a problem with wamp or php- Its poor code that doesnt declare variables before they use them- Apache Triad is set like this at installation

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: SgtLegend (---.vic.bigpond.net.au)
Date: June 14, 2009 08:34PM

The coding is perfect fine as it was coeded by an advanced CMS coder whos done this before. I know the coding is correct because ive used all these sites hundreds of times over and only WAMP has shown these errors.

I also did what you said and the errors have gone away but that doesnt change the fact that something isnt working right in WAMP as i have another PC 6 feet away with a localhost running the same sites without one issue.

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 14, 2009 08:51PM

Well your advanced CMS coder doesnt know how to declare variables. The fact is the coding is not correct,,,

PHP 4 would have had this warning hidden, But PHP 5 by default now has it turned on. So you will have to hide these warning if your not going to declare them.

Hiding Warnings = Poor code

And to state again - No Problem with Wamp Or PHP in wamp.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: SgtLegend (---.vic.bigpond.net.au)
Date: June 14, 2009 09:37PM

Ok so if you say WAMP is fine then why is my site which ive coded from scratch not working correctly either. Works fine on my paid hosting server with Hostgator so there must be a problem with WAMP and Vista.

Ive been using and coding sites for months now and i think i know a little bit about PHP coding. Do not get me wrong, im not trying to fight over this but ive been using localhosts long enough to know how they work and all im trying to do is find an answer to these problems



Edited 1 time(s). Last edit at 06/14/2009 09:51PM by SgtLegend.

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: June 14, 2009 09:56PM

I have no problems at all with WAMP.

if your code on WAMP displays notices/errors then its your code at fault. Again your webhost has error reporting disabled and this is why you think everything is working fine on your website. If you checked your sites error logs you'll see the same errors are logged.

Some of the reason why your script on WAMP doesn't work could be

Your script relies on a setting called register_globals, then your script will not work as PHP has disabled this setting since PHP4.2. Unfortunately hosts tend to leave this setting enabled so older scripts to do not break. WAMP keeps this setting disabled, it soon to be removed completely as of PHP6. However this can be enabled via PHP > PHP Settings menu from the wamp task bar icon.


Another reason why your script doesn't work is because you use short tags (<? ?> or <?= ?>winking smiley. These are disabled by default however you can enable this via the PHP > PHP settings menu from the wamp taksbar icon.

You should also compare the php.ini settings for wamp and your website by running phpinfo on both. Your should set WAMP's PHP configuration as close to that of your webhosts.

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 14, 2009 10:07PM

SgtLengend ill say once more- NO ISSUES WITH WAMP.


code is at fault - downlaod ur hosts php.ini like c2dan said and compare it.. they must have a few depreciated settings still enabled

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: SgtLegend (---.vic.bigpond.net.au)
Date: June 14, 2009 10:30PM

I matched Hostgators php.ini file word for word to WAMP's and nothing. So all in all it has to be a compatibility problem with WAMP and Vista. Theres no other reason for it. I tried Xampp and Apache2Triad and they worked fine with flying colors.

And please stop saying my code is at fault. The image from my first post is Nuke Evolution which is used worldwide by thousands of people so you dont knot what your talking about if you think its at fault.

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 14, 2009 10:34PM

you know nothing about apache and php if your answer is "VIsta and Wamp problem"

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: June 14, 2009 10:46PM

SgtLegend Wrote:
-------------------------------------------------------
>
> And please stop saying my code is at fault. The
> image from my first post is Nuke Evolution which
> is used worldwide by thousands of people so you
> dont knot what your talking about if you think its
> at fault.

The screenshot displayes notices.

Notices do not prevent scripts from working. Also on live websites error reporting is most probably disabled and so no notices are not displayed. WAMP displays notices as PHP is confugured to do so.

It does not mean it is broke or a compatibly issue between WAMP and Vista.

You can disable notices if your so wish as suggested earlier. Your script will continue to function as normal.

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: SgtLegend (---.vic.bigpond.net.au)
Date: June 14, 2009 10:57PM

I know there just notices but the issue is that something in PHP isnt working right. Theres a couple of files ive been running fine but in WAMP they dont work right. One wont proberly read and one says a class doesnt exist.

Ill say it once more.... Something in the PHP settings/Apache Modules isnt working right if certain scripts dont work. I cant have 2 localhosts and a live server run them fine then have WAMP not run them. Its not possible. All im asking for is possible reasons for it to do that. I aint here to pick a fight

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: yfastud (Moderator)
Date: June 15, 2009 04:21PM

correct me if I'm wrong, but it seems your php files might contain scripts for older php version and might not compatible w/ latest php version comes w/ wamp, so you should check your php scripts

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: SgtLegend (---.vic.bigpond.net.au)
Date: June 15, 2009 07:35PM

All my scripts are designed for PHP 4 and higher. They wouldnt be working at all if they wernt

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: June 15, 2009 07:44PM

thats not true... php 4 and php 5 have differences ,, scripts would run and errors would occurs.


anyway you havent bothered to post up any of the errors your having as the other notices are gone now.


You will just have to accept that it is badly written code.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: yfastud (Moderator)
Date: June 15, 2009 07:46PM

theory, you're right, but as far as I know, a lot of script in php4 will NOT work in php5, so you might check w/ php site to make sure your scripts would not have any issue w/ php5 winking smiley
also, sometimes firewall/antivirus would cause the problem so you should check them as well

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 1 time(s). Last edit at 06/15/2009 07:47PM by yfastud.

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: Bl0ckH3ad (---.oc.oc.cox.net)
Date: June 18, 2009 09:12PM

I am trying to install Nuke Evolution on a local db using wamp server. I keep getting errors about language I cannot understand why so I thought maybe someone here could help to shed some light on the matter. these are the errors I am getting.

Notice: Undefined variable: directory_mode in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install\functions.php on line 34

Notice: Undefined variable: file_mode in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install\functions.php on line 38

Notice: Undefined index: language in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install.php on line 26

Notice: Undefined variable: sql_version in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install\language\lang_english\lang-install.php on line 70

Notice: Undefined index: step in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install.php on line 35

Notice: Undefined variable: message in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install\functions.php on line 149

Notice: Undefined index: download_file in C:\wamp\www\Nuke_Evolution_Xtreme_v2.0.7\html\install.php on line 53


I have no clue as to why I have looked through the code to see if anything looked funny but I see nothing askew so I am at a loss

these errors are with v 2.0h


I have tried instead to use v 1.7.4 .. with 1.7.4 i get no errors I am curious why? I would rather use the most recent version, though for what I am doing it is really not imperative that I do. Any help in regards to this is great and very appreciated.. =D

thank you in advance for your time

~Bl0ckH3ad

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: yfastud (Moderator)
Date: June 18, 2009 10:37PM

Open php.ini through wamp tray icon

Find

error_reporting = E_ALL

Replace w/

error_reporting = E_ALL & ~E_NOTICE

Then save file and restart wamp.

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: PHP Not Working Correctly
Posted by: Bl0ckH3ad (---.oc.oc.cox.net)
Date: June 19, 2009 01:21AM

okay thank you I have it all sorted now I appreciate your help immensely grinning smiley

~Bl0ckH3ad



Edited 2 time(s). Last edit at 06/19/2009 02:17AM by Bl0ckH3ad.

Options: ReplyQuote


Sorry, only registered users may post in this forum.