PDA

View Full Version : Smarty Problem in Submit (Moderator please read)


sofie77
12-01-2006, 08:47 AM
Hello,

i know, the moderators are already sick of the smarty validate problems in the submission. but let me please explain.

i have the problem, that 10 % of my submissions give the smarty validate error for the customer. well, 10 % is not that much, but if i count it, its every week 90 USD that i loose.

I have already the "non cache function" from bobby on top of my submit.php.

@ header ('Expires: Mon, 14 Oct 2002 05:00:00 GMT'); // Date in the past
@ header ('Last-Modified: ' . gmdate ("D, d M Y H:i:s") . ' GMT'); // Always modified
@ header ('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP 1.1
@ header ('Cache-Control: post-check=0, pre-check=0', false);
@ header ('Pragma: no-cache'); // HTTP 1.0


But like i said, its better with the non cache function, but the problem is not complete banned. I have now in my faq, that if this error comes, they should clean the browser cache and refresh the website again. most of the time this helps. But not all read the faq and to be honest. if i would submit a website and i get this errors, i would leave the site also.

So i made the decision that i will pay 50 USD for a final solution!!! Is it possible to ban that submit valdiate errors? feel free to contact me.

haggisv
12-04-2006, 04:57 AM
Yes I still have the same problems with my website, and have made the same changes as you have.

Have you found a solution yet?

David
12-04-2006, 05:02 AM
I can ask a programmer to take a look.
Most likely it will not take more than an hour of their time, but they do charge at a rate of $20/hour (to them, not me!)
If you want I can get you some help. Just PM me.

haggisv
12-04-2006, 05:29 AM
I noticed that one of the changes in V2.1 is:
SmartyValidate library upgraded to latest stable version (2.8)

Could this change fix all the smartyvalidate problems that V2.0 seems to have? If so upgrading just this bit would be worthwhile...

proprod
12-04-2006, 05:39 AM
I think alot of this has to do with hosting companies. I've used 2.0 from the get-go and have never had these issues. And I've done some odd things with my directory. Best thing to do is go into your FTP program and verify that file sizes match that which you've copied. Sometimes a file can get truncated. If you start the upload and then leave your machine... it's hard to say if full file was transferred. Please check this.

proprod
12-04-2006, 05:42 AM
Content visible to registered users only.

Latest stable version means simply that at the time of release, the latest "working version" of the software was used. It doesn't necessarily mean the version in the last release was "non-working".

haggisv
12-04-2006, 08:03 AM
The file sizes match. It works some of the time. If there were problems with the files I would expect it to do the same everytime.

If it's host related, what questions can I ask them. They're not intrested in questions related to phpld, they can only answer server related questions...

sofie77
12-04-2006, 08:54 AM
@proprod: tx for reply. to understand u right, u think, that this problem comes, if the submit.php is not complete uploaded and if the submit.tpl need then the validation infos from the submit.php the tpl coulnd find it and give a smarty validation error?

well, i can say, that i work a lot with this my directory and i load alot of stuff up over my ftp. I have a very good host and my files are all 100 % on the server. with full size. i think, it could come for users, which use a 56k modem or have a slow connection, that this could be the reason, that the apache couldnt get the complete submit.php out? this is only a thinking..but i dont know it.

@david. i will pm u right now. like i said..money is really not the problem. 20 $ for 1 hour is IMHO nothing..i will pay 50 $ if the problem is gone. i promise!!!

haggisv
12-04-2006, 10:20 AM
I get this problem from 2 different fast connections, so I don't think it's related to speed or modem access. I DO believe it's related to caching, but I don';t know how to fix it...

What is your site sofie77, I would like to see if I get the same problem on yours.

Do you get the error on my site?

Cheers!

sofie77
12-04-2006, 11:16 AM
i have add my directory in yours

Niche sports directory

i got NO error. feel free to add yours in mine..but please change on top to english.

yeah.it might be a cache problem that happends once in a while...i think for first we have to clear why it happends..then we or the mods will find a solution. I think, the problem comes, if the submit.php havent the validation infos for the tpl. but why this affects only if u press the submit button and not before.

mmhh..the browser sent request to the apache..apache give the files out and the browser save it in the temporary internet files. further the file is in the temp/templates folder of the directory. If i got a message from a user, that the smarty validation prob is happend, i had a look in my temp/templates submit.php and the file was complete. if i look in my pending links, there was a lot of links pending after one user got the error. so with the file is everything ok. it might be related if a person have a full browser cache or what? but we have that NO CACHE function in our submit.php so this should be no problem too...mmmhh i am really of with ideas...

tx for help

haggisv
12-04-2006, 12:19 PM
Yes I would like to try yours, but what is the URL?

haggisv
12-04-2006, 12:23 PM
Oops, forget my last post... found your directory, in my own directory, heh heh LOL!

Nice directory! Didn't realise yours was paid so I could not try it...

sofie77
12-04-2006, 12:31 PM
tx

@Didn't realise yours was paid so I could not try it...

please select the regular link and i will aproove u..no problem!!!
u have nothing to pay!!!

haggisv
12-04-2006, 10:55 PM
Thank you sofie77!

I have submitted my URL, and got NO errors. When i try my own directory I get errors EVERY time now. This does not make sense to me...

I certainly hope this can be sorted out...

Isabel
12-04-2006, 11:19 PM
I have the same problem and this forum is full about thoses errors.

Anybody can help me?
http://www.phplinkdirectory.com/forum/showthread.php?t=8007

haggisv
12-05-2006, 10:50 AM
When I delete all the files in temp/templates/ directory, and deletel all tempory files from ym browser cache, it seems to work OK again, but the problem always comes back later...

Hopefully this will help in tracking down the problem...

haggisv
12-07-2006, 03:50 AM
Is the caching done by the php script? If so is it possible to disable it?

It seems to work properly when I delete the files from temp/templates/
So If I can stop these files from being generated, the problem may be solved....

haggisv
12-10-2006, 11:41 PM
Well there finally seems to be a fix for this problem, which seemed to work for me, with great thank to Dawzz!

His solution is below. I made the mod, but actually forgot to comment out the original line as he suggested, but it seemed to work well. So I don't know if it will work when the line IS commented out.

add this:

$tpl->caching = false;
echo $tpl->display('submit.tpl', $id);

right before this:

echo $tpl->fetch('submit.tpl', $id);

in submit.php
comment out the above line

sofie77
12-13-2006, 11:00 PM
hi m8,

tx for letting me know this one. it seem that it works for me as well. i will let it in use some days now, then i know it for sure.

DAWZZ, one question, could you please explain me in 2 sentences why its working with this one or what was the problem and what is now better?!
now the caching is off or mmhh?!?! tx for letting me know!!

haggisv
12-13-2006, 11:31 PM
Hi!

Sorry to break the bad news, but my smartyvalidate errors have come back! I worked perfectly for several days, and now suddenly it started producing errors again!

VERY frustrating...

sofie77
12-14-2006, 07:57 AM
do u have the other line now comment out?

maybe thats the problem?

it would be nice, if a mod could take a look if the

echo $tpl->fetch('submit.tpl', $id);

have to be commented out...tx

James
12-14-2006, 08:20 AM
Due to reasons beyond our control I couldnt have access to haggisv's account, if you want to pm me ftp info and can wait a couple of days until I clear my plate I will work on this for you.

sfod_d223
12-25-2006, 07:02 PM
Warning: Smarty error: unable to read resource: "top_bar.tpl" in /home/content/s/f/o/sfod223/html/libs/smarty/Smarty.class.php on line 1095

What about this one? anyone got a clue?

neurosis4u
12-25-2006, 07:47 PM
unable to read ressource.... this means it cant read the file...
So check that the file is on your server in its Folder (tpl files are usually in the templates folder) and that it have the right permissions (chmod 644)