jebediah
-
Posts
11 -
Joined
-
Last visited
Posts posted by jebediah
-
-
RegExp for the 2nd question would look like this...
#S[\d]{5}/[\d]{4}#
Thanks for that and sorry for the old bump.
If i would like to add a E to that, so both S18757/2002 and SE18757/2002 works, how would that look like?
-
Well, i hope this is ending up in the right place, if not i'm sorry.
First of, i'm still not that familiar with php as i hope to be.
I have a a slight problem with a registration code that i need help with.
First.
if (!preg_match( "/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $email_address)) { $errors .= "\n Fel: Ogiltig E-mail adress"; } if( empty($errors))
This code works just fine. But i i want to remove the if( empty($errors)) line. How would the code look like then?
I've tried several solution but non of them works.
Second.
I have to add a new code similar to the $email_address code named something like $med_nr, but the entering option would look something like this
S18757/2002
There's always a S in the beginning, 5 numbers then a / and then 4 numbers again.
Any help with this is appreciated.
-
Hi guys.
Yes, the never ending story, and i cant solve it by my own.
I want to import a database file on ~350mb. So i've change the necessary lines in the php.ini file.
upload_max_filesize 400M
post_max_size 400M
max_execution_time 3000
max_input_time 3000
Well the upload seems to work fine now, but right after the upload to browser says "waiting for www.xxxxxxx.com" and after a couple minutes "6-7 min or so" i recive this message.
Fatal error: Maximum execution time of 300 seconds exceeded in /dir/xxx/xxx/string_mb.lib.php on line 47
Well, the line 47 in that file is
return mb_substr($string, $start, $length);
I'm out of ideas, and i don't think i have to mention that i'm new to phpmyadmin
-
Just to be sure, which one of them do you mean?
-
This is all i could find, under Net -> All
Response Header
Accept-Ranges bytes
Cache-Control max-age=7200, private, must-revalidate
Connection close
Content-Length 5837
Content-Type text/html
Date Fri, 06 Jul 2012 18:11:10 GMT
Etag "4632a4f8-16cd-4c40643ab72c0"
Expires Fri, 06 Jul 2012 20:11:10 GMT
Last-Modified Wed, 04 Jul 2012 19:44:51 GMT
Server Apache
Request Headers
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3
Cache-Control no-cache
Connection keep-alive
Host
Pragma no-cache
Referer
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
-
Hi again requinix and thanks for the answer.
Weel i cant really see where i can find that information.
I've installed Firebug, hard refresh the site and clicked on the Firebug icon. Then what?
I can only se what's in between <head> tags
-
Sorry to bring up this old thread again, but i have same problem with another site.
The site is only built with HTML.
The problem.
I have a div that i upload some picture to now and then and all new picture won't show up untill i press ctrl+f5.
This only happens with Firefox and not IE. The thing is that i run my FF with default settings, so all other users with FF should have the same problem.
What i've tried so far is
<meta http-equiv="expires" content="wed, 09 aug 2000 08:21:57 gmt" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" />
<img src="images/pic.jpg?34523576"/> [b]At all new picture[/b]
And some that i found on the web
<ifModule mod_headers.c> # YEAR <filesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf)$"> Header set Cache-Control "max-age=29030400" </filesMatch> # WEEK <filesMatch "\.(js|css|swf)$"> Header set Cache-Control "max-age=604800" </filesMatch> # 45 MIN <filesMatch "\.(html|htm|txt)$"> Header set Cache-Control "max-age=2700" </filesMatch> </ifModule>
# Turn on Expires and set default expires to 3 days ExpiresActive On ExpiresDefault A259200 # Set up caching on media files for 1 month <filesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$"> ExpiresDefault A2419200 Header append Cache-Control "public" </filesMatch> # Set up 2 Hour caching on commonly updated files <filesMatch "\.(xml|txt|html|js|css)$"> ExpiresDefault A7200 Header append Cache-Control "private, must-revalidate" </filesMatch> # Force no caching for dynamic files <filesMatch "\.(php|cgi|pl|htm)$"> ExpiresDefault A0 Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0" Header set Pragma "no-cache" </filesMatch>
No one works. So is there any other solution?
EDIT: Just notices that this question should be posted at HTML section? Mod, or should i start a new thread?
-
Thanks again requinix for the explanation.
-
Sweet, i really appreciate that you took the time to explain. Not often a newcomer get that kind of help
For static files the web server (like Apache or IIS) should handle caching automatically.
Any idea what the "default" time for this is, if any?
Most of my problems is that images are not updated as soon as i've uploaded them.
Lets say that i do some minor changes on a picture in the header, the new one wont appear untill i make a hard refresh.
What i've noticed though is that if i wait like 24 hours or so "without a hard refresh", the new picture will appear automatically. So it has to be some kind of timespan somewhere?
In my experience caching problems are almost always the result of the web server not handling caching for static files, like scripts and stylesheets, as you expect. Like they'll send Expires headers* that last a long time, or generate ETags** using limited information. Both of those can be fixed quite easily but you only need to do so if you discover a problem.
It is not every day i change the .css file, but it happens some times
When that day comes, is the code that i posted earlier a good choice then?
-
Hi guys. First of, English is not my spoken language so have patience
I've google it and done some reading regarding "hard refresh" but i cant find the information i'm looking for.
Lets say that i visit a website that i've visit 6 month earlier, and what if they done some changes that require a so called hard refresh. How should people know that the site require a ctrl+5?
I mean, i could be visit sites that looks different without my knowledge, that could been changed several month ago?
How does it work? Is it manage automatically or is it up to the webmaster to implate some codes like
<?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?>
I dont know much about site development and i try to learn as much as i can. Is there no better way to handle this.
And my second question.
Where should i paste codes like this to solve the cache problem? In the header.php?
if (!preg_match(
in Regex Help
Posted
Thanks for the help again.
Everything works great