IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> error in php scripts
betty
post Jan 9 2008, 06:41 AM
Post #1


Newbie
*

Group: Members
Posts: 5
Joined: 24-December 07
Member No.: 6



I tried running a php file I uploaded to a server online and I get error from the script. The thing is that that same file run successfully on a different server online and on my testing server in my computer.
I receiver errors like: Notice: Use of undefined constant process - assumed 'process' in /home/mysite.com/httpdocs/file.php on line 136
Notice: Undefined index: reqname in /home/mysite.com/httpdocs/file.php on line 13
Go to the top of the page
 
+Quote Post
azadmin
post Jan 9 2008, 07:06 AM
Post #2


Administrator
*

Group: Root Admin
Posts: 4
Joined: 16-December 07
Member No.: 1



QUOTE (betty @ Jan 9 2008, 06:41 AM) *
I tried running a php file I uploaded to a server online and I get error from the script. The thing is that that same file run successfully on a different server online and on my testing server in my computer.
I receiver errors like: Notice: Use of undefined constant process - assumed 'process' in /home/mysite.com/httpdocs/file.php on line 136
Notice: Undefined index: reqname in /home/mysite.com/httpdocs/file.php on line 13


Can you post a sample of the script giving you the error
Go to the top of the page
 
+Quote Post
betty
post Jan 9 2008, 07:31 AM
Post #3


Newbie
*

Group: Members
Posts: 5
Joined: 24-December 07
Member No.: 6



a sample of the script giving me error below;

CODE
if ( isset($_POST[process])){
if ((empty($message)) OR (strlen($message) < 3))
{
$msg = "<font color=\"red\">Mesage is too Short! </font><BR>";
}
if ((empty($email)) OR (strlen($email) < 4))
{
$msg = "<font color=\"red\">Your Email seems to be invaild!</font><BR>";
}
echo $msg;


This script is from a form that submits to itself
Go to the top of the page
 
+Quote Post
Usetrad
post Jan 10 2008, 02:51 PM
Post #4


Newbie
*

Group: Members
Posts: 4
Joined: 24-December 07
Member No.: 4



Why don't you save your time by using javascript to validate the form before it is submitted
Go to the top of the page
 
+Quote Post
betty
post Jan 10 2008, 05:05 PM
Post #5


Newbie
*

Group: Members
Posts: 5
Joined: 24-December 07
Member No.: 6



QUOTE (Usetrad @ Jan 10 2008, 03:51 PM) *
Why don't you save your time by using javascript to validate the form before it is submitted


I am not about validating the form becasue I still experience similar problem with other scripts.
Go to the top of the page
 
+Quote Post
Magnus
post Jan 10 2008, 10:37 PM
Post #6


Newbie
*

Group: Administrators
Posts: 2
Joined: 20-December 07
From: Nigeria
Member No.: 2



Why you are receiving the error is bacause on your server display_errors is set to in its php.ini file. If you have access to the php configuration file having the .ini extension on the server you find the below section;
CODE
; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On


You then change the display_errors = off and save the file on your server

If you have no access to the php configuration setting file on the server hosting your website you can contact your Webhost to do it for you.
Alternatively, you can add below to the begining your script on every file you have the problem.
CODE
ini_set(display_errors, off);
Go to the top of the page
 
+Quote Post
Usetrad
post Apr 21 2008, 04:41 AM
Post #7


Newbie
*

Group: Members
Posts: 4
Joined: 24-December 07
Member No.: 4



10
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 28th August 2008 - 03:29 AM
Google
 
SEO by MinervaSEO © Icelabz.net