473,386 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Warning: Unexpected character

Can someone please tell me why i get the following error ??
The strange is that sometimes i get the error and sometimes not !!
Also there is no syntax error on line 251
Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/functions.php on line 251

Thanks,
Vagos

Nov 22 '05 #1
8 5693
vagos <va***@freemail.gr> wrote:
Can someone please tell me why i get the following error ??
The strange is that sometimes i get the error and sometimes not !!
Also there is no syntax error on line 251
Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/functions.php on line 251


is there a variable in your line 251 ($_REQUEST['variable'] maybe)
or in line 250 ?

does this variable contain **sometimes** an ' ?

--
@@@@@
E -00 comme on est very beaux dis !
' `) /
|\_ =="
Nov 22 '05 #2
vagos wrote:
Can someone please tell me why i get the following error ??
The strange is that sometimes i get the error and sometimes not !!
Also there is no syntax error on line 251
Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/functions.php on line 251

Thanks,
Vagos


Can you send us the contents of line 251 (and a few surrounding lines)?

--
talk to the teacher now and then about something other than the subject
a beef jerky web site : http://www.choicebeefjerky.com.au
teach the kids how to ride a skate board, then learn yourself
Nov 22 '05 #3


denisb wrote:
vagos <va***@freemail.gr> wrote:
Can someone please tell me why i get the following error ??
The strange is that sometimes i get the error and sometimes not !!
Also there is no syntax error on line 251
Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/functions.php on line 251

is there a variable in your line 251 ($_REQUEST['variable'] maybe)
or in line 250 ?

I do not get the same error every time.
Sometimes i get an error in functions.php, sometimes in select_lang.php
config.php etc, in diferent line every time.
The last 10 minutes, i reloaded my site 50 times and i did not get any
error !

This is an example of my members.php

$u = $HTTP_COOKIE_VARS["member"];
$res = mysql_query("SELECT * FROM members WHERE id = '$u'");
while ($r = mysql_fetch_array($result))
{
$name = $r["name"];
$epitheto = $r["last_name"];
$email = $r["email"];
$address = $r["address"];
}

this is an example of lang.php

$lang_main_name = "Name";
$lang_main_epitheto = "Last name";
$lang_main_email = "E-mail";
$lang_main_address = "Address";

Is that a wrong way to write code ??

Thanks
Vagos does this variable contain **sometimes** an ' ?


If i always get an error, i have to correct my code in xxx line.
Now, i get an error in functions.php line 251, reload page and get error
in config.php line 50, reload page and NO error !

Nov 22 '05 #4
vagos wrote:
Can someone please tell me why i get the following error ??
The strange is that sometimes i get the error and sometimes not !!
Also there is no syntax error on line 251
Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/functions.php on line 251

Thanks,
Vagos


That error is emitted by the PHP parser. Maybe you left your FTP agent
on or something, and the file was still being uploaded just as you're
accessing the page.

Nov 23 '05 #5


Chung Leong wrote:
vagos wrote:
Can someone please tell me why i get the following error ??
The strange is that sometimes i get the error and sometimes not !!
Also there is no syntax error on line 251
Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/functions.php on line 251

Thanks,
Vagos

That error is emitted by the PHP parser. Maybe you left your FTP agent
on or something, and the file was still being uploaded just as you're
accessing the page.

Yes, it looks like that. But i did not leave my Ftp agent on.
Two days now, and i did not get any errors.
I do not think that the problem is in the code. I think it is something
else.
I am not an advanced php programmer, but let me ask this:
Is it posible that a large file or function with lots of 'ifs' to cause
that errors ??? Maybe at a moment that the web server is a little more
busy ???

Nov 24 '05 #6
Well, if it's not happening any more, then it's probably a transcient
error of some sort. Maybe the server administrator was doing a file
restore. Or maybe the disk drive was experiencing problems. It's highly
unlikely that the error was caused by large PHP files.

Nov 24 '05 #7


Chung Leong wrote:
Well, if it's not happening any more, then it's probably a transcient
error of some sort. Maybe the server administrator was doing a file
restore. Or maybe the disk drive was experiencing problems. It's highly
unlikely that the error was caused by large PHP files.


Sorry, but i am still getting those errors

Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/super/lib/mod_lib.php on line 20

....
18. if ($mod == "in_m1") {
19. $main2 .= "<table width=100% border=0 cellpadding=\"1\"
cellspacing=\"1\">";
20. $result = mysql_query("SELECT * FROM cat_products WHERE sid = '0'
ORDER BY short ASC");
21.
22. while ($row = mysql_fetch_array($result))
....

This time i get error in a different file.
The strange is that web page is shown correctlly (exept the first line
writting the error)

The only solution i found is to @include("mod_lib.php") in my index.php
and no errors will be shown !! (hm, not the needed solution of course)

Dec 2 '05 #8
vagos wrote:


Chung Leong wrote:
Well, if it's not happening any more, then it's probably a transcient
error of some sort. Maybe the server administrator was doing a file
restore. Or maybe the disk drive was experiencing problems. It's highly
unlikely that the error was caused by large PHP files.


Sorry, but i am still getting those errors

Warning: Unexpected character in input: ' in
/usr/local/apache/htdocs/super/lib/mod_lib.php on line 20

...
18. if ($mod == "in_m1") {
19. $main2 .= "<table width=100% border=0 cellpadding=\"1\"
cellspacing=\"1\">";
20. $result = mysql_query("SELECT * FROM cat_products WHERE sid = '0'
ORDER BY short ASC");
21.
22. while ($row = mysql_fetch_array($result))
...

This time i get error in a different file.
The strange is that web page is shown correctlly (exept the first line
writting the error)

The only solution i found is to @include("mod_lib.php") in my index.php
and no errors will be shown !! (hm, not the needed solution of course)


Check to see if you have mismatched single quotes (') earlier in your
script (or in an included script).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Dec 2 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
43
by: Anitha | last post by:
Hi I observed something while coding the other day: if I declare a character array as char s, and try to use it as any other character array..it works perfectly fine most of the times. It...
55
by: Sameer | last post by:
Hi, when i compile my C programs (even 2 line progs) give the warning, no new line at end of file. What does this mean ? -Regards, Sameer
6
by: ehabaziz2001 | last post by:
My Program turned a char variable into string using null character but unexpected character displayed infront of the variable after using printf . Syntax : ------------- #include <stdio.h> ...
2
by: Dimitri Furman | last post by:
SQL Server 2000 SP4. Running the script below prints 'Unexpected': ----------------------------- DECLARE @String AS varchar(1) SELECT @String = 'z' IF @String LIKE ''
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 unexpectedly stopped generating the *.designer.vb files for *.aspx and *.ascx files. After a few days of frustration trying to fix this, I noticed that it had the following...
1
Lazandra
by: Lazandra | last post by:
Hi guys I have the following error: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr/webdata/kirkwood/config/config.php on line 2 Parse error: syntax error, unexpected...
4
by: gsaray101 | last post by:
I keep getting PHP Warning: Unexpected character in input: '\' (ASCII=92)) this error on windows platform. this script works fine on Linux. Can anybody help? This script is supposed to return the...
3
by: swethak | last post by:
hi, i create the one file.At time of creation i insert below contents into the file &lt;?php include("ClassName.class"); $myclass = &new ClassName; echo $myclass->myfunction1(); ?&gt;
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.