Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 548531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:05:20+00:00 2026-05-13T11:05:20+00:00

I have a PHP text-size select function within a Drupal site: It uses this

  • 0

I have a PHP text-size select function within a Drupal site:

It uses this selector…:

<ul id="font-sizes">
        <li class="one"><a href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/resize.php?set=small">Normal Font-Size</a></li>
        <li class="two"><a href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/resize.php?set=medium">Medium Font-Size</a></li>
        <li class="three"><a href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/resize.php?set=large">Large Font-Size</a></li>
</ul>

…which modifies a stylesheet link…:

<link rel="stylesheet" type="text/css" media="screen"  href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/<?php echo isset($_COOKIE['sitestyle'])?$_COOKIE['sitestyle']:'small'; ?>.css" />

… by using this file (resize.php):

<?php setcookie ('sitestyle', $_GET['set'], time()+31536000,'/', 'mysite.co.uk', '0'); header("Location: ".$_SERVER['HTTP_REFERER']); ?>

Now, my problem is that it works fine when logged into the CMS (as the main admin or a lower level role), but it just does not work when accessing the site as an anonymous user. I’ve been through the permissions settings, but I can’t for the life of me see anything that would affect this. I’m guessing therefore it’s do to with some higher-level PHP access thing that is beyond me.

Any ideas?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:05:20+00:00Added an answer on May 13, 2026 at 11:05 am

    Drupal is often set to cache pages for anonymous users. So even if the cookie is set the page returned will be the same.

    If your server can handle the load you could disable caching in the admin performance page and it should then work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text encoded from php with an ajax function with de php
I have this code in PHP writing views to a text-file and just increasing
I have implemented the jquery scroll text in my php web site. See my
I have a gzipped text file that I'm trying to read within PHP (using
I have a php page which dynamically produces this; ... <select name='sales_id'> <option> <option
I'm having a strange problem in that I have php inserting text into a
I'm having trouble with PHP text parsing I have a txt file which has
I have a PHP form with 4 text fields and 2 checkboxes. The checkboxes
I have a script that generates images from text using PHP. It's working fine
I have an array in php that contains all the lines of a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.