Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Strange Apache Error Log Messages When Viewing PHP Scripts


Whenever I would view any of my PHP scripts on any of a number of
servers that I run, the Apache error logs on each of them would have
this rather strange error:

[Tue Mar 28 13:01:33 2006] [error] [client *.*.*.*] File does not
exist: C:/Program Files/Apache Group/Apache2/htdocs/tools/myapp/tools,
referer: http://www.myappworld.com/tools/myapp

It never generates any PHP-related errors, warnings, notices, anything
related to this of any kind; furthermore, all of my apps on all of my
servers run with no problems whatsoever, however, multiple instances of
this very same error message occurs at each page that I visit.

there is no such file nor directory, of course, as
"../htdocs/tools/myapp/tools", however, there is "/htdocs/tools/myapp".




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
PHP 5.0 - No Error Messages Under Apache
PHP 5 beta under Apache 2 on 'doze - and get no error messages from my
PHP scripts. Whenever there's an error they simply silently stop
outputting. Running earlier versions under Linux works fine.

Version details:

Apache/2.0.47 (Win32) PHP/5.0.0b1 <-- note the beta s/w.

Is this a known problem? Is there a work-around?

Apache/PHP Not Giving Me Error Messages
I have just recently installed Apache2 and PHP5 on my computer.
Normally when I make a syntax mistake on my webspace it gives me an
error message on the .php page when i load it and the line the error is
on. When i load a page on my own computer through http://localhost it
just stops outputing the code on the page where the error is and leaves
the rest blank.

Do i need to configure Apache or PHP to display errors? If so, how?

Strange Apache PHP Problem In Ubuntu Breezy
I used to have Apache and PHP4 working perfectly in Ubuntu Hoary Linux.
I upgraded to Ubuntu Breezy Linux and I either get one of the following
problems:

"You don't have permission to access /testsite/index.php on this
server."

or, if I put a test.php in the root, and try to run it, I get a Firefox
dialog that's sort of like, "What do you want to do with this file?
View it in gedit (notepad)?"

So then I uninstalled and reinstalled PHP4 along with
libapache2-mod-php4 and apache2. This failed with the same result.

So then I upgraded to PHP5 and reinstalled all this. Again, this failed
with the same result.

So then I went back to PHP4 again, rebooted, and tried again. Same
result.

So then I upgrade again to PHP5 again, rebooted, and tried again. Same
result.

What's the trick? How do I get my PHP to work properly through Apache
again?

Error Messages
I set to php.ini this

error_reporting=E_ALL & ~E_NOTICE

to be a list of error messages and some warnings/tips on the code written.

All good, but if I have code like

------------------------
function foo(string $x)
{
echo($x);
}

foo("hi");
------------------------

I got this error

------------------------
Catchable fatal error: Argument 1 passed to foo() must be an instance of
string, string given, called in E:WorkphpphpFramework est.php on line 8
and defined in E:WorkphpphpFramework est.php on line 3
------------------------

!!!but... is not "hi" a string?
What kind of *Catchable fatal error* would be this?

:)

I write foo(string $x) exactly to say that the function need a string!

Suppressing Error Messages
Could any one please tell me a command in php to suppress error messages that come because of any reason like query invalid or any other problem .i would like to see none of the error message s to come, even if there are errors(sounds weird but i need that).

Suppressing Error Messages
I keep getting an error that I don't want to show up, i have not been able to get rid of it either and i was just currious of how I might go about suppressing this error
PHP Code:

Storing Error Messages
I know how to turn off error reporting to stop php from printing the error messages but what if I also want to store the error messages into an mysql table? What's the variable that stores the error message?

Not Displaying Error Messages
Is there a simple way to prevent error messages (falsely connecting to
database etc.) being diplayed?
My own build in messages are enough...

Turn Off Error Messages
I get this error message

Warning: getimagesize() [function.getimagesize]: Read error! in /mnt/w0400/d11/s01/b02a5c57/www/familyclick.ca/messageCenter/writeMessage.php on line 95

Warning: Division by zero in /mnt/w0400/d11/s01/b02a5c57/www/familyclick.ca/messageCenter/writeMessage.php on line 102

The problem I'm having I'm having a hard time preventing the error. Is there a way to turn error messages off on certain pages.  Ideally I would like to log these errors  any idea how to do this.

No Error Messages In Mamp
Im trying to use the mamp set up on a mac. For some reason error messages dont display in the browser which make development quite difficult. Does anyone know how to turn error messages on?

How To Suppress Error Messages Without Using Error_reporting(0) ?
This line:

if (file_exists($fileName)) {

is (on some web servers) giving me this kind of error:

Warning: SAFE MODE Restriction in effect. The script whose uid is 1022
is not allowed to access /home/www owned by uid 0 in
/home/www/krubner/ppKernel/McControllerForAll.php on line 454

This only happens when the software is checking directories that are
above what where PHP is allowed to check.

I want this software to work on all servers and I don't want the end
user to have to know PHP, and so I don't want them to have to set
error_reporting() on their own. I also feel like I shouldn't have to
do this:

error_reporting(0);

because my software should capture all errors on its own and store all
the error messages that I write in the resultsObject that my software
uses. Turning off error reporting is cheating, in my view, the
programmer should capture all errors on their own.

So how do I suppress errors on a line like this?

if (file_exists($fileName)) {

PHP Error Messages As String In A Variable
Can I put all errors which PHP outputs when error_reporting(E_ALL); is
activated into a variable? I want to react if an error occurs.
I'm working on a Script to check if an ftp is running or not. The only way
to get the error message of the ftp when the connection fails is if
error_reporting(E_WARNING); or error_reporting(E_ALL); is activated. I want
to format the Error Message. E.g. The errormessage is:
Warning: ftp_login() [function.ftp-login]: Sorry, Over 2 connection not
allow in c:inetpubwwwrootscriptsvbb_ftp.php on line 13.

I only want this output: "Status: Sorry, Over 2 connection not allow "

Apache2Triad PHP Errors Without Error Messages
How do I get Apache2Triad to print the reason it stops while executing
my PHP
programs?

Mail(): Error Messages NOT Back To Wwwrun?
a friend was so kind to host my php scripts. but when they use mail()
or phpmailer (or whatever) to email e.g. to an invalid address, the
returning error message appears in *my friend's email inbox*
(recipient - or sender? - is "wwwrun" of my friend's machine). I
guess you understand which problem I mean. To fix the problem, I would
like to understand what is going on here - in the mail header, i did
set replyto, x-sender and from to *my* email address, but it doesnt
help. so where must I change what to free my kind friend from this
"spam"?

Open_basedir Is Commneted Out In My Php.ini File, Yet I Still Get The Error Messages
If I ssh to my server and look at the php.ini file, it apears that
open_basedir is off:

Interpreting Error Messages From Include Files...
lets say i have the following files:

1. error.php: that is routed to for all errors. this page should
display proper and explanatory error messages to the user based on the
parameter provided.
2. errordef.php: has all the error codes and their explanations
"defined" as constants.

now, say if i have 3 different files viz. a.php, b.php and c.php, and
when any error occuring in either these files, i want to route to
error.php for detailed explanation. each a.php, b.php and c.php passes
error code to error.php, but error.php should interpret the code from
the definition file errordef.php!

Putting Form Error Messages Into A List
I have some form validation and I want to put all the error messages that are displayed into a bulleted list. I have seen it done with more complicated validation using OOP but I don't know enough to do that. How would I add these error messages to a list if they occur? Code:

Links Pointing On PHP Manual Not Shown In Error Messages
I have html_errors set On and it's visible that it's on because I get some parts
of the error messages bold. The problem is I can't get any links to point to the
PHP manual.
docref_root = "/php_manual/"
docref_ext = ".html"
are set but no links are appearing. By that I mean there are absolutely no <a>
tags or anything of that sort in my error outputs. I tried generating almost
every type of error but please if somebody could post a line or two of code that
produces some clickable error message on their box so that I can test it on my.
(send the output also, please)

if my script is:
<?php
$var1 = 'var1'
$var2 = 'var2'
?>
I get this output
<br />
<b>Parse error</b>: syntax error, unexpected T_VARIABLE in
<b>e:www estarray.php</b> on line <b>3</b><br />

shouldn't there be any links in that pointing to PHP manual in my php_manual
dir? :-(

Strange Error
I have just got a strange error when trying to construct my sql query using pagination:
Quote: Warning: mysql_fetch_array(): 9 is not a valid MySQL result resource in manage-buyers.php on line 54 Line 54 = PHP Code:

Strange Error
I am getting the following error:

Fatal error: Call to undefined function mysql_pconnect()

What do I have set up wrong?

Strange Error
mysql is installed. I can use it from the command line.
PHP is installed. I can use phpinfo();
Apache works since I can display phpinfo() with it.

STRANGE "Fatal Error: Call To Undefined Function..." ERROR
why strange you ask? here goes:

I have been working with Php and Mysql for a week without any problems.
Today I tried executing a php page that connects to mysql and creates a
new database, I got this error:

"Fatal error: Call to undefined function mysql_connect() in C:Program
FilesApache GroupApache2 est\_debug_tmp.php on line 3".

I did some reading on the net and checked all my configuration, and it
looks o.k. (and it already worked well a whole week before today).

The strange thing is that I have another form that inserts data into
the same database in Mysql, and it works like a charm (needless to say
but both pages log in with the same username to the same database).

Strange Error In Server Log
I have two Apache servers running the same site code, on on most page
accesses one gives the following error in the server's log:

PHP Fatal error: Nesting level too deep - recursive dependency? in
Unknown on line 0, referer:

The other has no errors reported. I only use require_once to include files.

Strange Error While Trying To Set A Cookie
Whenever I run a script page, I get this error:
Warning: Cannot modify header information - headers already sent by (output
started at c:proyectoswebsites estindex.php:9) in c:proyectoswebsites estindex.php
on line 11

My code is:

<?
$cookieValue = 'abra cadabra, pedo de cabra'
setcookie('aTestCookie', $cookieValue, time() + 3600);
?>

PHP Strange Error With MY_SQL Database
I have a MySQL database and I'm able to access it correctly. I am also
able to execute select, update and insert queries, however I am getting
warnings saying:
"supplied argument is not a valid MySQL result resource" and the result
set returned is empty (for queries other than select).
Strangely, my die function includes the query but the query is not
printed. I've however printed the queries before executing and they are
fine too. Can anyone discover the problem? The code is as below:
(please also note that as the code below has @'s the warnings are not
displayed)

if(($_POST['ADD'] == "1") || ($_POST['ADD'] == "0")) {

session_start();
$cart_id = GetCartId(); // my own function, works fine

$merchants = explode("_", $_GET['merchants']);
$merchant_id = $merchants[(int)$_POST['merchantid']];

$connection = db_connect(); // my own function, works fine
if($connection) {
$where_clause = " WHERE `Session`= '" . $cart_id . "' AND `Product ID`
= " . $_POST['productid'];
$cart_query = "SELECT * from `Shopping`" . $where_clause;
$cart_result = @mysql_query($cart_query, $connection) or
die(mysql_error() . ": $cart_query");
$cart_row = @mysql_fetch_array($cart_result);

$result = null;
if($_POST['ADD']=="1") {
if($cart_row) {
$update_query = "UPDATE `Shopping` SET `Merchant ID` = " .
$merchant_id . " , `quantity`= " . $_POST['quantity'] .
$where_clause;
echo $update_query;
$update_result = @mysql_query($update_query, $connection) or
die(mysql_error() . ": $update_query");
/* Error comes here */
if(($result = @mysql_fetch_array($update_result)))
{}

} else {
$add_query = "INSERT INTO `Shopping` ( `Session`, `Product ID`,
`Merchant ID`, `quantity` ) VALUES ( '" . $cart_id . "', "
..$_POST['productid'] . ", " . $merchant_id . ", " . $_POST['quantity']
.. ")";
$add_result = @mysql_query($add_query, $connection) or die
(mysql_error() . ": $add_query");
/* Error comes here */
if(($result = @mysql_fetch_array($add_result)))
{}
}
} else {
//delete
$delete_query = "DELETE FROM `Shopping` " . $where_clause;
$delete_result = @mysql_query($delete_query, $connection) or die
(mysql_error() . ": $delete_query");
if(($result=@mysql_fetch_array($delete_result)))
{}
}

Application Crashed With Strange Error
After running a php command-line-based application for a few days, the application shut down and returned the following error in the log.

<b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted at fsock.c:548 (tried to allocate 8192 bytes) in <b>./nserv</b> on line <b>69</b>

I assume fsock.c is part of the PHP code because my application does not include any files called fsock.c I also assume that this error is related to sockets. The application had connected a socket to a server for a number of days. Anyone know what might have cause this, or what I can do to stop it happening again?

"Cannot Find Module" Error Messages In PHP
Red Hat Enterprise Linux 4.X.

I'm writing command-line PHP scripts for the first time.

I get the messages below. What do they mean? Are these operating system
library modules, or something in PHP that I don't have? Do I need to
install more Linux packages? Or adjust PHP in some way?

[dashley@pamc standalone]$ ./sitehashkeygen.php
No log handling enabled - turning on stderr logging
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Content-type: text/html
X-Powered-By: PHP/4.3.9

Apache Error?
I am creating a logon screen which seems to work fine unless the folowing combination happens:

1) log on with a correct userid and password
2) close window, and logon again, this time with a wrong userid password.

What than happens is the following popup message: APACHE caused an invalid page fault in
module PHP4TS.DLL at 015f:100ddfc1. Registers:

Than the browserscreen gives a message showing the SQL statement followed by NO DATABASE FOUND or something.

Php5 Apache Error
I just installed on a new machine windows server 2003 and installed apache 2.2 on it and then unzip the php 5.1 files in c:php5 then added the load module php5_module line in httpd conf file copied the php5ts.dll to system32 and also in apache bin but when i start apache it keeps giving me error php5apache2.dll module not found if i remove this line from apache it works fine and apache starts but if i add this line it does not start can anybody suggest how to fix the problem why cant apache find the file php5apache2.dll the path is correct.

Phpmyadmin Error On Apache
i just replaced ms pws with apache 1.3.20, i am on win98. whenever i try to browse the contents of a mysql table on phpmyadmin, i get an illegal operation error with this message: - PHP caused an invalid page fault in module PHP4TS.DLL. does some one have a solution to this problem - other than changing win98.

Error Installing PHP 5.2 With Apache 1.3
I'm a big newbie with all this, and I'm trying to install PHP 5.2 under
Apache 1.3, my OS is Win XP. I first installed Apache and it is working
fine. Please go through the following steps / file fragments and tell
me where I'm going wrong in installing PHP.

1- I unzipped the PHP files to C:/Programming/PHP, and also copied the
dll's to the system32 directory.

2- I copied the php.ini-dist file to the windows directory (renamed as
php.ini) and added the following to it -
doc_root = "C:/Programming/Apache Group/Apache/htdocs"
extension_dir = "C:/Programming/PHP/ext"

Also I turned on extensions for various things.

3- Then I added the following lines to the httpd.conf file -
LoadModule php5_module "C:/Programming/PHP/php5apache.dll"
Addmodule mod_php5.c
AddType application/x-httpd-php .php

Then when I made a test.php in the Apache htdocs directory, it gives me
the option of downloading the file (that means it is finding the file,
I guess. It doesn't know what to do with it.)

Send Default Apache 404 Error From Php
How can I trigger the default Apache 404 error from PHP? I don't want
to specify a custom handler, I want the default handler. The reason is
that I am using mod_rewrite with Apache for my site. If certain a
certain page is requested that is not published, then I want to send
the apache default 404 error page. Currently, I am doing this to
return a custom error.

if($pageNotPublished) {
header("HTTP/1.1 404 Not Found");
// How do I send the default apache 404 message
// instead of the message below?
print("<html><body>HTTP 404 - Not Found</body></html>");
exit();
}

The default 404 error page has more details,

Php Errors Going To Apache Error Log - Can't Change
I've got a problem with a bunch of "PHP Warning" and "PHP Notice"
messages being dumped into my apache error log, on a FC4 server. I
tried editing the /etc/php.ini file, changing the "error_log =" to it's
own file, and even tried turning off logging all together. No luck.
No matter what I do, these messages still end up my apache log.

Query Oci_parse() Apache Error
I get this error, apparently because of my Query:

Apache.exe has encountered a problem and needs to close. We are sorry for
the inconvenience.

the error in on oci_parse() , but when I replace the above query with for
example "select * from clients"; I don't get the error. Though I need to
use query I put in variable $query....

All my other variables are ok, and the query works when I use it in SQL
worksheet for instance. (I use oracle 9i, php5, apche 1.3)

what can I do with that query to make it work?

$req_id = $_GET['request_id'];

print "request id : $req_id <br>";

$req_name = $_POST['request_name'];

print "request_name -> $req_name <br>";

$req_date = $_POST['request_date'];

print "request_date -> $req_date <br>";

$req_client_id = $_POST['request_client_name'];

print "request_client_name -> $req_client_id <br>";

$req_req_type_id = $_POST['request_type'];

print "request_type -> $req_req_type_id <br>";

$req_brand_id = $_POST['request_brand_name'];

if ($req_brand_id=='Brand Name') $req_brand_id='NULL'

R_PPC_REL24 Relocation Error With Apache
I've been scanning groups and Googling and can't figure out why I'm
getting this error. I've read about using the -fPIC flag but I've been
doing that.

Cannot load /usr/local/apache2/modules/libphp5.so into server:
/usr/local/apache2/modules/libphp5.so: R_PPC_REL24 relocation at
0x0e56191c for symbol `floor' out of range

Lots of people post about this problem but I can't find solutions. The
symbol out of range changes, but the problem is always this R_PPC_REL24
relocation.

Apache Error Log Fills Up With Php Notice:
apache error log:

/var/log/httpd-error.log

gets filled up with various notices such as:

php notice: Use of undefined constant name - assumed 'name' in xxxxx on
line 1, referer: yyyy

the size of the file is 200 mb now..

how do I suppress these notices without touching my php source code ?

Local Apache Server Error, But Ok When Hosted
I have just used a script that includes the first line

session_start();

On my computer where I have apache php and mysql installed I get the error:

Warning: session_start(): open(/tmpsess_4e8a9cf51a21ab1c9fe26630d5446262, O_RDWR) failed: No such file or directory (2) in c:serverapachehtdocsmaindex.php on line 2

But when I upload it to my host the page works without errors. Is there a problem with my apache setup or is it a php thing?

Error Loading Php_mysql.dll On Apache Startup
Since yesterday, when I try and start apache, I get the following
message:

Warning:
PHP Startup: Unable to load dynamic library 'C:Program
FilesPHPextphp_mysql.dll' - the specified procedure could not be
found.

I am running PHP 5.0 on Apache 2 and have been for some time. I got
this error when I first installed PHP5/Apache2 on this machine (a
totally fresh install - HDD reformat!!) However, it went away, and I
can't remember what I did to get rid of it.

I originally thought it was because I had a space in the location of
the dll. but I have been running it this way for a long time. I have
not changed my php.ini recently, other than trying to solve this
problem (not got any further than just commenting/uncommenting the
line that loads that module.

The module is definitely located where it is looking. I have no clue
what is going on.

Mysql_connect Error Apache Web Server To Windows Hosted Database
I've got MySQL 5.0.21 running on Windows Server 2003, and php running
on Apache on a Linux box (Fedora Core 4).

Previously when the pages were running on an IIS server the connection
was succesful, now I get:

Can't connect to MySQL server on 'SERVER' (13)

I'm connecting using:

$db = mysql_connect("SERVER", "USER", "PASSWORD")
or die("Could not connect to database:
".mysql_error());
mysql_select_db("DATABASE", $db)
or die("Could not select database: ".mysql_error());

However from the linux box I can connect no problems using:
mysql --host=SERVER -u USER -p

Viewing Characters
If I have a word such as (c_text) in a variable $p. How do I output just text. I know to use the substring function but the text will vary and the amount of characters will vary.

Viewing Disk Usage Through PHP
I have a server and am trying to setup my controlpanel for my clients to display their disk usage. I have no idea how I can acheive this, but if anyone could help me figure out a way I would appriciate it.

Problems Viewing Dates
I am confused about PHP 4.0 date display functions. After getting a date value from a mysql database I am trying to display the day of the week and date. Unfortunately, PHP incorrectly displays the date as Wed Dec 31 instead of the correct date that is stored in the database on the "production" server - php 4.0.0. On my development server(with the same date, etc running php 4.0.1pl2) the date shows up correctly. I am not sure why there is a difference in what is displayed in the browser. I am not sure if the version differences have something to do with my problems, but the installation of PHP on the production box is not under my control and was actually completed by the ISP.

The date manipulation string that I am using is:

<? echo date("D M j", strtodate($schedule_date[play_date])); ?>

Restrict Viewing Of Php_info
I am sure that this is probably an odd request, but it there a way to restrict the use of the php_info tag. The only reason I am asking this is my boss feels that it gives to much "system" information and does not want it displayed as where I don't have a problem with it. I have serached this forum and checked in the PHP manual, but nothing has a reference on how to to someting like this.

Full Screen Viewing
Can anyone tell me how to make a php page open at 100% of the viewable area?

Viewing The Contents Of A Directory
Is there anyway to view images in a folder using php? I tried asking in perl and a guy replied saying use glob but i dont think we can so is there a way in php.

Get Domain They Are Viewing The Website From
Is there anyway to get the user's domain they are looking at a website FROM I.E. I'm on the road runner domain.. is it possible to get my domain when I view a website I've developed?

Viewing Other Members's Profile In Php ?
  if($profile['member_id']==$_SESSION['user_id'])
  {
    //edit and view the page
 }
 else
 {
   //view the page
  }

the above code lets other members view another member's page but not being able to edit it...

Viewing Files In A Web Folder
I'm trying to put my files in a web dirctory.  All kind of files, so that in the future when I need something I just go there and get them.  My goal is that when I type "www.domain.com/myVitualDirectory" I would get my list of files and folders and files and I would even be able to navigate into the folders, then I would right click and Save Target As and get my file.

Storing And Viewing Transaction History
well i am about to aproach this because am building a app for my own business and i would like to view customer conact info and a there last 10 transactions with my business. i am not sure where to start on the add transaction history end. any suggestions would help.


Copyright © 2005-08 www.BigResource.com, All rights reserved