[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 02-25-2007, 08:40 AM   #1 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Thumbs down PHP page blank; no errors generated

Hey all,

I don't usually post here for help... so I feel kinda awkward doing this. Please be nice

I have Apache running PHP and MySQL on my local workstation to make dynamic sites without the need to upload them. It works fine, never had any problems, haven't changed anything since 3 weeks ago, and everything's been good with it. So the server/config is not the problem.

It's one particular file that I have which shows up completely blank. Nothing is even outputted to the source. There's no 404 error, there's no PHP errors, and there's no logical errors. I didn't really change anything; and just to double-check it, I added:

echo("Test");

to the beginning of the file to see if it was even working. It's not. So I remove the ; at the end to see if it'll output a syntax error, like it always has. No errors. I haven't changed any config, as I said. Everything is like it always has been. And YES, it's configured to output all standard errors.

And it's just this one file.

I can't show you what's in the file for security reasons, but it's something that I really need to get fixed... any help appreciated.

Thanks,
-Matt
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-25-2007, 09:04 AM   #2 (permalink)
NamePros Member
 
Join Date: Jun 2006
Posts: 195
36.90 NP$ (Donate)

tanfwc is an unknown quantity at this point


Is your Apache working previously? It seems like you got to check the Apache log file and see what's it is complaining about
tanfwc is offline  
Old 02-25-2007, 09:15 AM   #3 (permalink)
Stud Sausage
 
Join Date: Dec 2006
Location: England
Posts: 1,546
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of

Adoption Breast Cancer Breast Cancer Cancer Survivorship
Quote:
Originally Posted by tanfwc
Is your Apache working previously? It seems like you got to check the Apache log file and see what's it is complaining about
Exactly what i was going to suggest. Failing that try reloading Apache (and subsequently php).

Definitely sounds like a server problem.

Matt
__________________
My NamePros Tools
(firefox plugin, google gadget etc)
Matthew. is offline  
Old 02-25-2007, 09:29 AM   #4 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Hmm... I didn't think to check the server logs, however:

Quote:
Originally Posted by Apache .log file
[Sat Feb 24 17:27:37 2007] [notice] Parent: Created child process 5628
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_exif.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
[Sat Feb 24 17:27:38 2007] [notice] Child 5628: Child process is running
[Sat Feb 24 17:27:38 2007] [notice] Child 5628: Acquired the start mutex.
[Sat Feb 24 17:27:38 2007] [notice] Child 5628: Starting 250 worker threads.
[Sat Feb 24 17:27:38 2007] [notice] Child 5628: Starting thread to listen on port 80.
Today is Sunday, though. Do you think it could have anything to do with it? If so, why does it only affect one file? It's just like others I have which work fine.

EDIT: I also see this happened previously several times... but the server restarts just fine. I'm not sure why it's not giving me any errors on restart like this.
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-25-2007, 09:36 AM   #5 (permalink)
NamePros Member
 
Join Date: Jun 2006
Posts: 195
36.90 NP$ (Donate)

tanfwc is an unknown quantity at this point


Quote:
Originally Posted by chulium
Hmm... I didn't think to check the server logs, however:



Today is Sunday, though. Do you think it could have anything to do with it? If so, why does it only affect one file? It's just like others I have which work fine.

EDIT: I also see this happened previously several times... but the server restarts just fine. I'm not sure why it's not giving me any errors on restart like this.
If you suspect it is your script having problem, put this at the top of the code

Code:
error_reporting(E_ALL);
It SHOULD throw you error message now

If not, run your script through console (best place to debug stuff).

Code:
c:\PHP\php.exe <full_path_to_script>
Of course, change the php.exe path to your install directory
tanfwc is offline  
Old 02-25-2007, 10:18 AM   #6 (permalink)
Domains my Dominion
 
sdsinc's Avatar
 
Join Date: Aug 2005
Location: Web 1.0
Posts: 6,285
1,095.94 NP$ (Donate)

sdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond repute

Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer
You may have to check your PHP.ini file. There is one line which says whether to display errors or not. On production sites this setting is often set to Off.
__________________
Buy now - MassDeveloper.com $500
sdsinc is offline  
Old 02-25-2007, 10:33 AM   #7 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Thanks again for more help, but nothing there works. Like I've said, errors ARE outputted and configured correctly. All other files work, show errors, etc, except this particular one.

EDIT: I'm giving rep to those that try to help Thanks.
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-25-2007, 01:15 PM   #8 (permalink)
cef
NamePros Regular
 
Join Date: May 2004
Location: NYC
Posts: 236
76.50 NP$ (Donate)

cef is a jewel in the roughcef is a jewel in the roughcef is a jewel in the rough

Animal Rescue
The log shows that PHP couldn't load the exif extensions. Are you calling any exif functions in the script?

Also, try commenting out the entire contents of the script so that you only have your Test echo as the script body:

PHP Code:
<?php
    
echo 'Test';
?>
If that works, try adding things back in in blocks until it starts working again. If it doesn't...well...bad disk sectors maybe?

Also --and this might sound weird-- did you cut and paste any of the code from somewhere else? Sometimes this copies hidden characters which get embedded in the script (for example, this happens to me sometimes when cutting and pasting source from a .chm file). You might have to retype the code by hand, or strip all bad characters from your source file (most program editors have a way to do that).

And of course, last bit of advice for windows -- did you reboot the entire machine? (only half joking here).
cef is offline  
Old 02-25-2007, 02:20 PM   #9 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Tried the echo thing, the removing/adding blocks of code thing, and all the code is original.

Oh well, thanks for the help. I'll just re-write the file or something.
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-25-2007, 03:03 PM   #10 (permalink)
Domains my Dominion
 
sdsinc's Avatar
 
Join Date: Aug 2005
Location: Web 1.0
Posts: 6,285
1,095.94 NP$ (Donate)

sdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond repute

Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer
It is difficult to say without seeing the full code. But I can tell you that PHP has some bugs. The version you are using could be at fault. Could it be that you are using a particular function in that page ?
__________________
Buy now - MassDeveloper.com $500
sdsinc is offline  
Old 02-25-2007, 03:34 PM   #11 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Possibly Thanks for all your help ... I'll just rewrite it and avoid some methods I used in this file.
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-25-2007, 03:40 PM   #12 (permalink)
Stud Sausage
 
Join Date: Dec 2006
Location: England
Posts: 1,546
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of

Adoption Breast Cancer Breast Cancer Cancer Survivorship
Can i suggest uploading it to a live server to actually determine if it is your local setup or not?

You could be saving yourself a lot of hassle...

Matt
__________________
My NamePros Tools
(firefox plugin, google gadget etc)
Matthew. is offline  
Old 02-26-2007, 08:05 AM   #13 (permalink)
NamePros Regular
 
Join Date: Feb 2006
Posts: 588
1,620.95 NP$ (Donate)

jerometan is a name known to alljerometan is a name known to alljerometan is a name known to alljerometan is a name known to alljerometan is a name known to alljerometan is a name known to all


If I didn't remember wrongly, if a PHP module fails to load, PHP wouldn't load as well.

If you're completely not getting ANY output, you might want to check if PHP is actually running by using another script.

EG. <?php phpinfo(); ?>
jerometan is offline  
Old 02-26-2007, 09:21 AM   #14 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
PHP *IS* RUNNING. It's only one file that has the problem! How can I not make myself clearer??

Regardless, I fixed the problem.
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-26-2007, 01:31 PM   #15 (permalink)
cef
NamePros Regular
 
Join Date: May 2004
Location: NYC
Posts: 236
76.50 NP$ (Donate)

cef is a jewel in the roughcef is a jewel in the roughcef is a jewel in the rough

Animal Rescue
Quote:
Originally Posted by chulium
Regardless, I fixed the problem.
I think we're all dying to know...HOW???
cef is offline  
Old 02-26-2007, 02:14 PM   #16 (permalink)
DNOA Member
 
mholt's Avatar
 
Join Date: May 2004
Location: Utah
Posts: 5,041
18.01 NP$ (Donate)

mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future

Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Oh, sorry.

I had missed a ] to close an array index.

The error_reporting(E_ALL); at the beginning of the file didn't seem to work, as previously stated...

I get parse errors on every other file except this one, which didn't use any EXIF functions either.

So yeah, I dunno what happened. But it's fixed; that's all I care about. Thanks for the help.
__________________
codeboards

A high-quality community of programmers -- Join today and post! We want new members!
mholt is offline  
Old 02-27-2007, 03:32 AM   #17 (permalink)
NamePros Regular
 
Join Date: Feb 2006
Posts: 588
1,620.95 NP$ (Donate)

jerometan is a name known to alljerometan is a name known to alljerometan is a name known to alljerometan is a name known to alljerometan is a name known to alljerometan is a name known to all


display_errors and error_reporting php directives may have overrided script settings.
jerometan is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 07:18 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85