Jump to content

esoteric

Members
  • Posts

    104
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

esoteric's Achievements

Member

Member (2/5)

0

Reputation

  1. I got a reply from my host, he said he new the problem and has to reset my sessions, needless to say that didn't do anything as i expected but he also said But im not sure what he means, how would i change this to make that change, anything i try give me 'ini_set() [function.ini-set]: SAFE MODE Restriction in effect', safe mode is off. ini_set('session.save_path', '/var/www/vhosts/xxxx.co.uk/httpdocs/tmp');
  2. Is this the info you wanted? i had to download a addon for firefox to see it name - PHPSESSID host - .xxxxxxxxx.co.uk content - 7qpi4boe4n5rf26hha1tqh45p5 path - / and the host does have the . at the start. I deleted all other cookies, this is the only one i have from a fresh login attempt. I cant test it from another domain because i would need to shift a whole load of script about to do it, but if need to in order to find the problem i will?
  3. oh and i created the folder at 'xxxxx.co.uk/httpdocs/tmp' and gave it full permission (777)
  4. The cookie name is my website name without the www. (so domain.co.uk) the top of my php pages looks like this <? ini_set('session.save_path', '/var/www/vhosts/xxxxx.co.uk/httpdocs/tmp'); ini_set('session.cookie_domain', '.xxxxx.co.uk'); session_start(); I dont have access to the php.ini which i was surprised about, they wont let me change anything, i tried adding it to my htaccess it just stopped me logging in at all. session.auto_start = Off session.cookie_path = / Thank you
  5. I understand the search engine problem but it isn't really an option, my site has been set up like this for a while and changing it now would make all paperwork and existing users links etc.. invalid. We also have business cards which point to specific sub domains so i'm not too worried about search engines. thanks you though, im trying to get help from my host but its been a long wait and very little has been done.
  6. I have recently changed server and setting things up are a right pain, after 2 days im need of some help. I have my site split into sub domains so lets say; www.domain.com one.domain.com two.domain.com three.domain.com They are to separate parts of my site which used to make it easier the manage each part, so one sub domain handles accounts and logins etc.. whilst another handles products and so on. the problem im having is all my login scripts and are on say 'one.domain.com', i can log in fine but when i visit any other domain im logged out, i can't seem to sort it out. i have tried setting my session cookie path and session cookie domain by painstakingly adding ini_set('session.save_path', '/var/www/vhosts/website.co.uk/httpdocs/tmp'); ini_set('session.cookie_domain', '.website.co.uk'); to every page, but it makes no difference, im also getting the occasional error Warning: session_start() [function.session-start]: open(/tmp/sess_d387ha6eqvj53f135q0fh4d733, O_RDWR) failed: Permission denied I have contacted my server provider by after endless messages they are no longer helping but rather keep saying 'leave it with us' then 'we fixed it' although they didnt. It doesn't help im so limited in what i have access to, i cant access the php.ini so everything has to be done via php So i would really appreciate any help getting this session problem sorted out. Thank you.
  7. Hi, I have setup my paypal payment method for a shopping cart on my site, all is well but in order for my server to flag an invoice as paid, the user must return to my website after paying and the query string in the url give the script the go ahead to mark it as paid which in turn alerts the appropriate department that its ok to source the order. ~The problem is, if the user for whatever reason skip the redirect back to my site, the invoice is remain 'unpaid' and has to be changed manually when the payment has been checked in the account. As you might imagine this is a bit of a problem because not only can it cause quite a delay, it also requires manually changing values which can lead to other problems. So if there is a better way i would appreciate the info, thanks a lot.
  8. Hi, im trying to work out a point based credit system on my site but require your expertise, The variable containing the total price of the invoice is called $TOTAL The amount of credit points a user has is saved as $credit My credit 'exchange' rate is 1000 credit points equal to £1 So my question is how do i go about subtracting the correct value from my total? I assume i have to divide the $credit variable by 1000 then do i simply just subtract this from the total? So something like // 1000 points £1 $credit_value = $credit / 1000; // set new total - credits $REDUCED_TOTAL = $TOTAL - $credit_value; or am i miles off? Thanks very much for any help, i urgently need to get this fixed.
  9. I tried the function but i don't understand the out put, at 20:07 the output without using strtotime is 200700 (which i what i want), but when i use the function it makes it 1325448448
  10. Yes i understand that, im forcing it as GMT at the moment, i will play about with it after i have the basics working. Thanks for the reply.
  11. Im trying to get the current time, so lets says its 7 oclock, the value of time would then be (in 24hr, hour,min,sec) 190000 I then want to see what if this value is higher than day_start but lower than day_end, if not then it should be higher than night_start but lower than night_end. Why would this need a special function? Shouldn't it just be a standard check? Thank you for the help.
  12. Hi, Im trying to create a simple script that will change the style sheet depending on the time of day. I have the following but it doesn't seem to be working. The stylesheets work fine when not used in the code (if i just add it to the head section) Appreciate any help <? // timezone date_default_timezone_set('GMT'); // check time $time = date("His"); // 6AM to 6PM $day_start = '060000'; $day_end = '180000'; // 6PM to 6AM $night_start = '180001'; $night_end = '055959'; // time of day if (($time >= $day_start) && ($time <= $day_end)) { // it is daytime // echo 'day'; echo '<link rel="stylesheet" media="screen" type="text/css" href="css/wc_parallax_day.css" />'; } if (($time >= $night_start) && ($time <= $night_end)) { // it is nighttime // echo 'night'; echo '<link rel="stylesheet" media="screen" type="text/css" href="css/wc_parallax_day.css" />'; } ?>
  13. Hello, Im trying to create a simple voting script for my site, i been trying different things but cannot get it too function properly. The idea is you click the 'thumbs up' image to add 1 to the 'likes' value and thumbs down to add '1' to the dislikes. Sound simple but its giving me headaches. Would really appreciate it if someone could take a quick look at my script. The table is called 'youtube_rating' (because thats the look i was going for) and in the table is 4 columns, id (aut0_increment), liked (counts liked votes), disliked (counts dislikes) and item_num which is the id for teh product the rating is for. <? if ( $row['rating'] == 'YES' ) { require ("../rating/voting/dbcon.php"); $result1 = mysql_query("select * from youtube_rating WHERE item_num='".$page_id."'"); $row = mysql_fetch_array($result1); $dislike = $row['dislike']; $like = $row['liked']; if (isset($_POST['submitted'])) { require_once ("../database/functions.php"); $userip = $_SERVER['REMOTE_ADDR']; $id = safe($_POST['id']); $vote = '1'; // check if user already voted $result = mysql_query("SELECT * FROM youtube_ip WHERE userip='$userip' AND item_num ='".$id."'"); $num = mysql_num_rows($result); // if already voted show error if (isset($_POST['submitted']) && ($num > 0)) { echo '<div class="alreadyvoted">You have already voted!</div>'; } // add like if (isset($_POST['submitted']) && ($_POST['submitted'] == 'like') && ($num == 0)) { // add 1 to value $liked_value = mysql_query("SELECT liked FROM youtube_ip WHERE item_num ='".$id."'"); $liked_total = $liked_value + $vote; $query = "update youtube_rating set liked = '".$liked_total."' where item_num ='".$id."'"; echo '<div class="ilikethis">You like this!</div>'; } // add dislike if (isset($_POST['submitted']) && ($_POST['submitted'] == 'dislike') && ($num == 0)) { // add 1 to value $dislike_value = mysql_query("SELECT dislike FROM youtube_ip WHERE item_num ='".$id."'"); $dislike_total = $dislike_value + $vote; $query = "update youtube_rating set dislike = '".$dislike_total."' where item_num ='".$id."'"; echo '<div class="idislikethis">You Dislike this!</div>'; } // log ip // if (isset($_POST['submitted']) && ($num == 0)) // { // mysql_query ("insert into youtube_ip (userip, item_num) values ('".$userip."', '".$id."')"); // } } ?> <table width="50%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="48%" align="center"> <form action="" method="post"> <input name="id" type="hidden" value="<? echo $page_id ?>" /> <input name="submitted" type="hidden" value="like" /> <button type="submit" class="like_button" name="like" id="like" > <img src="../rating/voting/pixel-vfl73.gif" alt=""> <span><?php echo $like?></span> </button> </form> </td> <td width="52%"> <form action="" method="post"> <input name="id" type="hidden" value="<? echo $page_id ?>" /> <input name="submitted" type="hidden" value="dislike" /> <button type="submit" class="dislike_button" name="dislike" id="dislike" > <img src="../rating/voting/pixel-vfl73.gif" alt=""> <span><? echo $dislike?></span> </button> </form> </td> </tr> </table> <? } ?> The problem is the vote does not add up or update the database, also it doesn't seem to be checking if the user has voted or not, it just attempts (but fails) to add a vote no matter what Thanks for any help.
  14. Im trying to write a script so that upon clicking a link (which is a image in this case) it toggles a div displaying the necessary info below. the javascript <script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv1").hide(); $(".show_hide1").show(); $('.show_hide1').click(function(){ $(".slidingDiv1").slideToggle(); }); }); </script> <script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv2").hide(); $(".show_hide2").show(); $('.show_hide2').click(function(){ $(".slidingDiv2").slideToggle(); }); }); </script> snip from table <tr> <td class="style1"> News </td> <td><a href="#" class="show_hide1"><img src="/img/add-icon.gif" width="16" height="16" alt="" /></a></td> <td><a href="#" class="show_hide2"><img src="img/hr.gif" width="16" height="16" alt="" /></a></td> <td><img src="img/edit-icon.gif" width="16" height="16" alt="" /></td> <td><img src="img/login-icon.gif" width="16" height="16" alt="" /></td> <td><img src="img/save-icon.gif" width="16" height="16" alt="save" /></td> <td><img src="img/add-icon.gif" width="16" height="16" alt="add" /></td> </tr> the content that will be displayed upon pressing the link <div class="slidingDiv1"> <div id="admin_form"> <a href="#" class="show_hide1">Hide Form</a> form 1 test content </div> </div> Is it possible to hide all other divs when clicking a new link so only the relevant info is being shown? Also is there a way to cut this code down a bit rather than creating x amount of function that all do the exact same thing but just show different divs? Im going to have at least 20 in total so it seems a lot of wasted code if there is a way to cut it down.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.