Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 10
 41 
 on: March 10, 2014, 05:37:14 AM 
Started by hy - Last post by nukpana
2nd question: I am looking for a forum with php-topics. Once I registered at a forum that unfortunately is not really crowded.
Stack Overflow

 42 
 on: March 09, 2014, 05:07:10 PM 
Started by hy - Last post by Keyrocks
Kudos to Skian for sharing his work-around.
I am practically clue-less when it comes to .htaccess modifications.  :P

 43 
 on: March 08, 2014, 07:43:03 PM 
Started by hy - Last post by hy
Hi skian,
I needed an additional line after your line to make it work as I wanted:
Code: [Select]
RewriteRule ^(.*) $1 [L]
thanks again

 44 
 on: March 08, 2014, 06:54:04 PM 
Started by hy - Last post by hy
thanks skian. this is a great answer. I was just about to digging into the apache manuals.

 45 
 on: March 08, 2014, 06:49:43 PM 
Started by hy - Last post by skian
I ran into that problem a few years ago. Still not fixed.

see http://snewscms.com/forum/index.php/topic,9076.msg66058.html#msg66058

Here is a workaround. Modify .htaccess and add the first condition check

Code: [Select]
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|s?html|css|js|cgi|png|ico|txt)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?category=$1 [L]

 46 
 on: March 08, 2014, 06:46:23 PM 
Started by hy - Last post by hy
In order to clarify I would like you to read:
favicon on wikipedia
the section "how to use" explains that some browsers support loading the favicon.ico from the websites' root automagically.

And it is obviously that the rewrite mechanism will redirect to index.php

 47 
 on: March 08, 2014, 06:39:38 PM 
Started by hy - Last post by hy
Hi, first of all thanks for your reply.
I think you didn't understand the problem.
I have one index file.

I am logging several stuff which looks in the log file like:
Code: [Select]
Start *** 2014/03/08 17-24-28

: URI: http://www.qmd.test/excursions
: USER OK - 50
: USER verification finished
processstatus: 1
Stop *** 2014/03/08 17-24-28
The start is logged with time. The next line contains the URL that called the script:
"URI: ".$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']

BUT I can also see:
Code: [Select]
Start *** 2014/03/08 17-24-28

: URI: http://www.qmd.test/favicon.ico
: http://www.qmd.test/favicon.ico
: www.qmd.test/favicon.ico 0
processstatus: 0
:
Stop *** 2014/03/08 17-24-28

The same applies to *.js and *.css

Obviously favicon and some css and js are being loaded by the browser automagically.
The browser wants to load a file named favicon.ico in the root and the rewrite mechanism sends him to execute my script. )-;
Same applies for *.js and *.css

The  *.js and *.css that I need to load are loaded properly. And I am sure NO ONE else is calling
http://www.qmd.test/favicon.ico
on my local server at the exact same time. So I think the matter is within rewrite...

One more thing: the log mechanism that I have established is outputting everything correctly.
But
Code: [Select]
<script type="text/javascript">alert("foo")</script>
shows up in the browser only once for the regular call to index.php - not for the subsequent calls when favicon.ico and the css and javascript files are loaded.

My temporary solution is a preg_match for URLs with favicon,*.jss, *.css and abort the script if it matches.
A better solution is to edit the rewrite rules. But I am not an expert at that.

 48 
 on: March 08, 2014, 05:48:51 PM 
Started by hy - Last post by Keyrocks
I have never had a problem like this. Favicon.ico images and CSS files load properly with all of my sNews sites.
There should be no problem if the favicon.ico and all CSS files required for your website are loaded from within the <head> section of your template (index.php) file.

If you have only one template, then it would be the index.php file in your site's root.
If you are using several templates, all of which are in a root/templates directory, then the favicon-ico and CSS files (for that template) would need to be loaded in the <head> section of each template folder's index.php file.

Be sure to check your template index.php files to make sure the paths to all favocon.ico images and CSS files are correct and that there aren't any path strings in them for files that do not exist.

 49 
 on: March 08, 2014, 10:50:22 AM 
Started by hy - Last post by hy
Hi, I just encountered a strange behaviour which took me 10 hours to track down....
Problem: I couldn't post comments and got always "wrong captcha code"
I could log into my site with the same captcha mechanism taking place.
Strange.
After hours of debugging to no avail - I logged almost everything into a text-file.
From the start of the script to the finish.
Finally I saw it:
After loading the site the browser tried to load /favicon.ico automagically.
This was redirected to my index.php as well - due to the regular rewrite mechanism.
My script interpreted the URL as 'take no action' and the SESSION-variables have been deleted and
so the mathCaptcha-digits didn't match anymore ... )-;
So I excluded in my script everything if the URL was .../favicon.ico
What was strange: For debugging I implemented an alert when changing or unsetting SESSION-variables.
The alert worked well - but never showed up when the URL was like ./favicon.ico.

Still it didn't work properly...
Again a look at my logfile: The browser tried to load some css-File that
didn't exist and again due to rewrite rules the index php the script was executed and
the mathCaptcha-digits have been changed.
Actually the correct favicon is loaded in all of my test-sites.
Does anyone encounter similar problems? Or is there more that can be loaded automagically - that I have to take care of?

2nd question: I am looking for a forum with php-topics. Once I registered at a forum that unfortunately is not really crowded.


 50 
 on: March 05, 2014, 08:27:14 AM 
Started by janelu - Last post by adminphp
that's a great one. Hmm, You should see my website that running the great snews 1.6 since 2009. Everytime, from that date, I developed It to a certain required level, actually I created My own template with various changes and addons. Look at it; i love this forum, though there isn't updates all the time. I Have to stop;  take a look at this; aljazeera-rif.com

Pages: 1 ... 3 4 [5] 6 7 ... 10