PHP Code Stopped Executing

Sarcoise

Verified User
Joined
Feb 2, 2005
Messages
5
Location
Atlanta, GA
Thanks in advance for any help that will be provided.
I recently took over a Network Administration position for a small company that uses PHP scripting for an IN House Intranet. The previous Net Admin passed away over Christmas and needless to say this has been quite a challenge.
Reason for this post is that he was running a WinXP Pro machine with IIS and MySql with PHP 4.3.4 installed. Everything has worked fine up untill yesterday when all of the sudden the users weren't able to login to their accounts. Basically, index.php contains a link for a login table to appear by using the link "<a href="http://10.10.1.83/index.php?app=9995">Login</a>" (I hope this doesn't show up as code.) This would previously load a login.php page within the same page in a table or layer. Now when the link is clicked, the address bar just changes to the above link and nothing happens. I have used a simple script to verify php is installed (phpinfo.php) and it displays all the copnfiguration options for PHP 4.3.4. I will upload/post the entire index.php below so that you can get an idea of what is being done. (I'm not sure how this forum handles html code so I will attach the index.php file as well.)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
<html>
<head>
<title>Bleakley In-House</title>
<link REL="StyleSheet" TYPE="text/css" HREF="stylesheets/ssc_layout.css" media="all">
<link REL="StyleSheet" TYPE="text/css" HREF="stylesheets/ssc_print.css" media="print">
</head>
<body marginheight="0" marginwidth="0" rightmargin="0" leftmargin="0" bottommargin="0" topmargin="0" bgcolor="#000000">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" colspan="5" bgcolor="#FFCC00" height="1"><img src="images/spacer.gif" border="0" width="1" height="1" alt=""></td>
</tr>
<tr bgcolor="#222222" height="1">
<td width="100%" colspan="5">
<div id="logo">
<table width="100%" border="0" width="100%" cellpadding="4" cellspacing="0">
<tr>
<td width="250"><img src="images/jbmh_logo.jpg" border="0" alt=""></td>
<td valign="bottom"><a href="http://www.bleakleyrv.com" target="_blank">Bleakley Website</a></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%" colspan="5" bgcolor="#FFCC00" height="1"><img src="images/spacer.gif" border="0" width="1" height="1" alt=""></td>
</tr>
<tr>
<td width="100%" colspan="5" height="10"><img src="images/spacer.gif" border="0" width="1" height="10" alt=""></td>
</tr>
<tr>
<td width="100%" valign="top">
<!-- Start Content Area --> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="10"><img src="images/spacer.gif" border="0" width="10" height="1"></td>
<td width="125" valign="top" class="menucontent" nowrap><a href='http://10.10.1.83/index.php'>Home</a><br />
<hr><a href="http://10.10.1.83/index.php?app=9995">Login</a><br />
<a href="http://10.10.1.83/index.php?app=9996">Forgot Password</a><hr><a href="/helpdesk/member.php" target="_blank">Help Desk</a><br /></td>
<td width="10"><img src="images/spacer.gif" border="0" width="10" height="1"></td>
<td valign="top" class="maincontent"><div>

<center><h1>John Bleakley Motor Homes</h1></center>
<br><br>
<p align="center" style="font-size:14pt; font-weight:bold; color:fff;">
<font style="font-size:28pt; color:0f0;">H</font>
<font style="font-size:28pt; color:f00;">a</font>
<font style="font-size:28pt; color:0f0;">p</font>
<font style="font-size:28pt; color:f00;">p</font>
<font style="font-size:28pt; color:0f0;">y   </font>
<font style="font-size:28pt; color:f00;">H</font>
<font style="font-size:28pt; color:0f0;">o</font>
<font style="font-size:28pt; color:f00;">l</font>
<font style="font-size:28pt; color:0f0;">i</font>
<font style="font-size:28pt; color:f00;">d</font>
<font style="font-size:28pt; color:0f0;">a</font>
<font style="font-size:28pt; color:f00;">y</font>
<font style="font-size:28pt; color:0f0;">s</font><br>
</p></div></td>
<td width="10"><img src="images/spacer.gif" border="0" width="10" height="1"></td>
</tr>
</table>
<!-- End Content Area -->
</td>
</tr>
<tr>
<td width="100%" colspan="5" height="10"><img src="images/spacer.gif" border="0" width="1" height="10" alt=""></td>
</tr>
<tr>
<td width="100%" colspan="5" bgcolor="#FFCC00" height="1"><img src="images/spacer.gif" border="0" width="1" height="1" alt=""></td>
</tr>
<tr bgcolor="#222222">
<td width="100%" colspan="5" height="25" align="center">Design By: SSC Software</td>
</tr>
<tr>
<td width="100%" colspan="5" bgcolor="#FFCC00" height="1"><img src="images/spacer.gif" border="0" width="1" height="1" alt=""></td>
</tr>
<tr>
<td width="100%" colspan="5" height="10"><img src="images/spacer.gif" border="0" width="1" height="10" alt=""></td>
</tr>
</table>
<div id="PTitle">
Bleakley In-House System</div>
<script language="javascript" src="clock.js"></script>
<span id="LiveClock"></span>
<script language="javascript">
<!--
show5()
// -->
</script>
</body>
</html>
 
First of all what has this question to do with DA ?
Second do you run this on a server with DA ?

Third the file you provide is a HTML file and not a PHP file. So basicly the info you provide will lead to people guessing to your solution and there are thousands of other forums that discuss PHP problems. Probably you just made a mistake.
 
In response to previous reply...
The server is running DA, but the issue is not directly related to DA. I have seen many other post about issues not directly related to DA, so why are you grilling me? The majority of Dutch people I have met in person are very kind.
The filename I posted a copy of is named INDEX.PHP, it is HTML code embedded with PHP, so therefore I posted the question in the correct forum.

TO OTHERS WHO MAY BE MORE HELPFUL, THANKS..

A small update, if I run PHPINFO.PHP the information/configuration page displays the current configuration, I have attached a copy of it for anyone to take a look at, but be aware that I have not changed anything since the problem first arose. The only thing I did that may be linked to the problem occurring is I used a .txt editor to modify some of the HTML code within INDEX.HTML then saved it, after that the problem arose. Thanks again to those with helpful input. ;)


results of phpinfo.php

PHP Credits
Configuration
PHP Core
PHP Version 4.3.4
System Windows NT HRSALES_3 5.1 build 2600
Build Date Nov 2 2003 23:43:42
Server API ISAPI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
Directive Local Value Master Value
allow_call_time_pass_reference Off Off
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
Page 1 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2047 2047
expose_php On On
extension_dir c:/php/extensions c:/php/extensions
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .;c:\inetcludes .;c:\inetcludes
log_errors On On
log_errors_max_len 1024 1024
magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 600 600
max_input_time 60 60
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_argv Off Off
register_globals Off Off
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir no value no value
Page 2 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

ISAPI
bcmath
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from <[email protected]> <[email protected]>
sendmail_path no value no value
serialize_precision 100 100
short_open_tag On On
SMTP mail.bleakleyrv.com mail.bleakleyrv.com
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order GPCS GPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
Server Variable Value
CONTENT_LENGTH 0
PATH_TRANSLATED c:\inetpub\wwwroot\phpinfo.php
REMOTE_ADDR 10.10.1.83
REMOTE_HOST 10.10.1.83
REQUEST_METHOD GET
SERVER_NAME 10.10.1.83
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/5.1
APPL_MD_PATH /LM/W3SVC/1/ROOT
APPL_PHYSICAL_PATH c:\inetpub\wwwroot\
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
URL /phpinfo.php
ALL_HTTP HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, */* HTTP_ACCEPT_LANGUAGE:en-us
HTTP_CONNECTION:Keep-Alive HTTP_HOST:10.10.1.83
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
CLR 1.0.3705) HTTP_ACCEPT_ENCODING:gzip, deflate
HTTPS off
SCRIPT_NAME /phpinfo.php
SERVER_PORT_SECURE 0
Page 3 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

calendar
com
ctype
ftp
gd
mysql
BCMath support enabled
Calendar support enabled
Directive Local Value Master Value
com.allow_dcom Off Off
com.autoregister_casesensitive On On
com.autoregister_typelib Off Off
com.autoregister_verbose Off Off
com.typelib_file no value no value
ctype functions enabled
FTP support enabled
GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49
Directive Local Value Master Value
mysql.allow_persistent On On
Page 4 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

odbc
overload
pcre
session
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library Win32
Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited
User-Space Object Overloading Support enabled
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.3 21-May-2003
Session Support enabled
Registered save handlers files user
Directive Local Value Master Value
session.auto_start Off Off
Page 5 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

standard
tokenizer
session.bug_compat_42 Off Off
session.bug_compat_warn On On
session.cache_expire 360 360
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 18000 18000
session.gc_probability 1 1
session.name JBMHINHS JBMHINHS
session.referer_check no value no value
session.save_handler files files
session.save_path c:\sestmp c:\sestmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid Off Off
Regex Library Bundled library enabled
Dynamic Library Support enabled
Internal Sendmail Support for Windows enabled
Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value
Tokenizer Support enabled
Page 6 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

wddx
xml
zlib
Additional Modules
Environment
WDDX Support enabled
WDDX Session Serializer enabled
XML Support active
XML Namespace Support active
EXPAT Version 1.95.6
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
Module Name
Variable Value
ALLUSERSPROFILE C:\Documents and Settings\All Users
CommonProgramFiles C:\Program Files\Common Files
COMPUTERNAME HRSALES_3
ComSpec C:\WINDOWS\system32\cmd.exe
NUMBER_OF_PROCESSORS 1
OS Windows_NT
Path C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE x86
PROCESSOR_IDENTIFIER x86 Family 15 Model 1 Stepping 3, GenuineIntel
PROCESSOR_LEVEL 15
PROCESSOR_REVISION 0103
ProgramFiles C:\Program Files
SystemDrive C:
Page 7 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

PHP Variables
SystemRoot C:\WINDOWS
TEMP C:\WINDOWS\TEMP
TMP C:\WINDOWS\TEMP
USERPROFILE C:\Documents and Settings\LocalService
windir C:\WINDOWS
Variable Value
_SERVER["ALL_HTTP"] HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/msword, */* HTTP_ACCEPT_LANGUAGE:en-us
HTTP_CONNECTION:Keep-Alive HTTP_HOST:10.10.1.83
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; .NET CLR 1.0.3705) HTTP_ACCEPT_ENCODING:gzip, deflate
_SERVER["HTTPS"] off
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["CONTENT_LENGTH"] 0
_SERVER
["PATH_TRANSLATED"]
c:\inetpub\wwwroot\phpinfo.php
_SERVER["REMOTE_ADDR"] 10.10.1.83
_SERVER["REMOTE_HOST"] 10.10.1.83
_SERVER
["REQUEST_METHOD"]
GET
_SERVER["SERVER_NAME"] 10.10.1.83
_SERVER["SERVER_PORT"] 80
_SERVER
["SERVER_PROTOCOL"]
HTTP/1.1
_SERVER
["SERVER_SOFTWARE"]
Microsoft-IIS/5.1
_SERVER["APPL_MD_PATH"] /LM/W3SVC/1/ROOT
_SERVER
["APPL_PHYSICAL_PATH"]
c:\inetpub\wwwroot\
_SERVER["INSTANCE_ID"] 1
_SERVER
["INSTANCE_META_PATH"]
/LM/W3SVC/1
_SERVER["URL"] /phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword,
*/*
_SERVER
["HTTP_ACCEPT_LANGUAGE"]
en-us
_SERVER
["HTTP_CONNECTION"]
Keep-Alive
_SERVER["HTTP_HOST"] 10.10.1.83
_SERVER
["HTTP_USER_AGENT"]
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
_SERVER
["HTTP_ACCEPT_ENCODING"]
gzip, deflate
_SERVER["DOCUMENT_ROOT"] c:\inetpub\wwwroot
Page 8 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm

PHP License
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as
published by the PHP Group and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact
[email protected].
Page 9 of 9 phpinfo()
2/2/2005 file://\\Server\Programs\phpinfo.htm
 
Last edited:
Sorry but the sample posted above doesn't show any PHP information and doesn't help us in anyway with information about the problem.

As you say you used a text editor to modify the script.. do you use php as cgi ? If so use dos2unix command under ssh on the file to convert the newlines if you use the configuration implemented by DA that shouldn't be an issue
 
So the link that directs the browser to (http://10.10.1.83/index.php?app=9995) is not using any part of php do direct to another page? I'm not an expert, hence the questions, but I thought the value "app=9995" was crossed referenced in a SQL database to equal another page/file (i.e login.php, which is the page that used to load.) If this is not the case, then could you explain the reason for the app= value? Thanks.
Jason
 
<a href="http://10.10.1.83/index.php?app=9995">Login</a>

This just a normal link nothing special and just opens the page in the browser window. If you want it to do something else you should use javascript or in frames just use TARGET=[framename] in your <A> tag.

I'm not going to explain in detail how you could do this or how to do it as I don't know wich application you're reffering to.

?app=9995 just parses a variable to PHP or the script that app is equal to 9995. It is up to the script login.php to deal with this and I can't tell you what it does :)
 
Sarcoise said:
So the link that directs the browser to (http://10.10.1.83/index.php?app=9995) is not using any part of php do direct to another page?
That is correct. There is NO php code of any kind in the index.php file you posted.
I'm not an expert, hence the questions, but I thought the value "app=9995" was crossed referenced in a SQL database to equal another page/file (i.e login.php, which is the page that used to load.)
There is no reference to login.php anywhere in your code. If it used to load, then it loaded for some other reason besides anything you've posted.
If this is not the case, then could you explain the reason for the app= value?
I imagine whoever coded it might, but I don't think any of us are clairvoyant. There is NOTHING in your index.php file you posted that would use that value for anything at all.

Jeff
 
Alright Alright Alright.....
You guys have busted my BALLS about not knowing anything about PHP code, I admitted that.. Let me give a brief background.
I just started a new job as IT admin. They asked for someone that knew LAN/WAN layouts, server maintenance, etc. No problem for me. The previous IT admin passed away over Christmas Holidays and they knew nothing about what he actually did. So I get here and realize this guy was doing ALOT more than we had previously thought. He is hosting our web site and intranet, both which execute PHP code. Everything was fine for a few weeks, I could update the content of our site and what not. But all of the sudden yesterday, our intranet stopped doing whatever "app=9995" was supposed to do (its a Log Into the System link, so I assumed that it loaded a file in our wwwroot named login.php.) Basically I am asking why would any link on the page stop working after they worked fine and nothing (to my knowledge) has changed?
 
Sarcoise,

As said above we still can't help you if we haven't got all the information. Best thing you can do is Hire a PHP programmer or just a one time thing to look at the stuff and correct (if it is simple) the problem.

You can take hours posting in forums, but if you don't have any idea on how the script works and don't know anything about php, I would recommend to let someone with more PHP knowledge fix it.
 
I will try to help. First of all, where did you get the output of index.php that you posted above? Did you get it from a "View Source" in a web browser? Because if you did, the PHP code will not show up. You need to copy the file index.php from the server and open it in a text editor and post that code here so that we can see the actual PHP code.

You will see tags that look like:

<?php ?>

That surround the PHP code.

Also, in that code, you might see something that looks like:

if($_GET['app']=='9995'){

under this code it would tell it what to do if app=9995.

Try to do this and post the code here.

Louie
 
Last edited:
ALRIGHT - After getting my balls busted, you guys actually helped me out. Everyone kept saying there was no PHP code in the file I posted, and that I must have gotten it from the view source within IE. I knew this was wrong because I was getting the file from the server out of WWWROOT. But it HAD to have some sort of PHP code within it. Light bulb went off.. One of the hardware guys was in here and knows a little about HTML wanted to take the "Happy Holidays" off the index page on our intranet. I thought no problem, simple HTML. He loaded the page in IE, viewed the source in NOTEPAD, took out the message, then saved the file to overwrite the INDEX.PHP. The index page only logs in users and users stay logged in for days at a time so it was over a week before I started getting calls saying they couldn't log in. Didn't see a connection between the two. Luckily I had a backup of the file and simply copied it back to the folder.
You guys were busting my balls over what little I knew when one of you should have seen that right off the bat.. :) NO PHP source in the file means the code was already executed and the view source only displays the results in HTML. Who woulda thought?!
Anyway, I disregarded the message saying that "I should hire someone who knows what they are doing" because I know the guy that said that wasn't BORN with the ability to code in PHP.
From looking over more of the code, it looks VERY MUCH like C++, which I know very well.. I just wasn't sure how the code relates to the web, i.e. when I code something in C++ I get an .EXE file, PHP seems to compile on the fly server side, displaying the results in HTML. This concept was new to me.
In Closing, you guys will probably see more of me in the future as I hope to expand my knowledge of the language. Here's just a suggestion - if someone posts a question that seems retarded to you, you aren't GOD because "I know something you don't know". It would be easy to make others feel more welcome. Is it just that you don't want new people to join? Just a thought. L8er
-Sarcoise
 
I never doubted you, and was just trying to help. I'm glad you found the problem. Just goes to show you, when you think that "Absolutely Nothing Changed", that it is not usually the case. :D I've had many problems similar to yours which is what has enhanced my web programming troubleshooting. Good Luck with the new Job.

Louie
 
Back
Top