Jump to content

etnastyles

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Everything posted by etnastyles

  1. In a radio button group 1 button is always checked maybe if you need a unchecked logic just use check boxes - they are about the same anyway...
  2. dont forget to put a exit() after your location function header('Location: logout.php?accountDeleted'); exit();
  3. I did a quick Google have heard about mail chimp - they have a repo of templates which should work in most email clients as they sell this product... https://github.com/mailchimp/Email-Blueprints/tree/master/templates
  4. this might not have anything to do with your script it might be worth checking and increasing your max upload limit and i would increase the script timeout limit too - do this in your php.ini
  5. yeah this seems easy enough - this will just be a normal text field which you can use jquery and masked input to create the rule of [0-9]:[0-9] which is cool and if i was you for the database type i would set it as a varchar this would except numbers and characters too.. hope this helpsss
  6. I have to some how get data from my sql data to a clients sql db server. They suggested using xml which is great i can output the required fields as xml but how then do i push this so it goes into the clients sql db.. We cant just do a db insert this has been ruled out. Im happy using xml just have no idea how to push it at a particular host / sql db any ideas or suggestions would be really welcome..
  7. sessions stopped working i.e. passing to the second page because i was doing a <php echo header(); ?> just after the body tag?? why does this happen??? function header() { $header = "<div id=\"masthead\"> <div id=\"logo\"> <a title=\"Return to the home page\" href=\"#\"/></a> </div> <ul id=\"main-nav\" class=\"clearfix\"> <li class=\"hidden\"> <a href=\"#accesscontent\">Skip to content</a> </li> <li id=\"masthead_whatWeDo\" class=\"whatWeDo\"> <a href=\"#\">What we do</a> <div id=\"servicesSubMenu\" style=\"display: none;\"> <ul> <li style=\"margin-right: 60px;\"> <h3>Digital</h3> <ul> <li> <a href=\"VOD-IPTV-delivery.aspx\">VOD/IPTV Delivery</a> </li> <li> <a href=\"digital-distribution.aspx\">Digital Distribution</a> </li> <li> <a href=\"digital-cinema.aspx\">Digital Cinema</a> </li> </ul> <h3>Disc</h3> <ul> <li> <a href=\"blu-ray-duplication.aspx\">Blu-ray</a> </li> <li> <a href=\"dvd-duplication.aspx\">DVD</a> </li> <li> <a href=\"cd-duplication.aspx\">CD</a> </li> <li> <a href=\"authoring-menu-design.aspx\">Authoring and Menu Design</a> </li> <li> <a href=\"packaging.aspx\">Packaging Gallery</a> </li> <li> <a href=\"artwork.aspx\">Artwork</a> </li> </ul> <h3>Tape</h3> <ul> <li> <a href=\"dubbing.aspx\">Dubbing</a> </li> <li> <a href=\"conversions.aspx\">Conversions</a> </li> <li> <a href=\"editing.aspx\">Editing</a> </li> <li> <a href=\"QC-QAR.aspx\">QC/QAR</a> </li> </ul> <h3>Flash memory</h3> <ul> <li> <a href=\"usb-branding-duplication.aspx\">USB Branding and Duplication</a> </li> <li> <a href=\"usb-gallery.aspx\">USB Gallery</a> </li> </ul> </li> <li> <h3> <a href=\"licensing-content.aspx\">Licensing content </a> </h3> <h3>Accessibility</h3> <ul> <li> <a href=\"subtitling.aspx\">Subtitling</a> </li> </ul> <h3>Security</h3> <ul> <li> <a href=\"copy-protection.aspx\">Copy Protection</a> </li> <li> <a href=\"forensic-watermarking.aspx\">Forensic Watermarking</a> </li> </ul> <h3> <a href=\"secure-library-storage.aspx\">Library</a> </h3> </li> </ul> </div> </li> <li id=\"masthead_caseStudies\"> <a href=\"casestudyList.aspx\">Our work</a> </li> <li id=\"masthead_Blog\"> <a href=\"/blog/\">Blog</a> </li> <li id=\"masthead_contactUs\"> <a href=\"contact.aspx\">Contact us</a> </li> </ul> </div>"; return($header); }
  8. this problem i was having was that i had a header being loaded into the page after the <body> tag when i removed this the sessions started to work again..wtf - never seen this issue before - can anyone shed some light on this issue... function loginheaderer() { $header = "<div id=\"masthead\"> <div id=\"logo\"> <a title=\"Return to the home page\" href=\"#\"/></a> </div> <ul id=\"main-nav\" class=\"clearfix\"> <li class=\"hidden\"> <a href=\"#accesscontent\">Skip to content</a> </li> <li id=\"masthead_whatWeDo\" class=\"whatWeDo\"> <a href=\"#\">What we do</a> <div id=\"servicesSubMenu\" style=\"display: none;\"> <ul> <li style=\"margin-right: 60px;\"> <h3>Digital</h3> <ul> <li> <a href=\"VOD-IPTV-delivery.aspx\">VOD/IPTV Delivery</a> </li> <li> <a href=\"digital-distribution.aspx\">Digital Distribution</a> </li> <li> <a href=\"digital-cinema.aspx\">Digital Cinema</a> </li> </ul> <h3>Disc</h3> <ul> <li> <a href=\"blu-ray-duplication.aspx\">Blu-ray</a> </li> <li> <a href=\"dvd-duplication.aspx\">DVD</a> </li> <li> <a href=\"cd-duplication.aspx\">CD</a> </li> <li> <a href=\"authoring-menu-design.aspx\">Authoring and Menu Design</a> </li> <li> <a href=\"packaging.aspx\">Packaging Gallery</a> </li> <li> <a href=\"artwork.aspx\">Artwork</a> </li> </ul> <h3>Tape</h3> <ul> <li> <a href=\"dubbing.aspx\">Dubbing</a> </li> <li> <a href=\"conversions.aspx\">Conversions</a> </li> <li> <a href=\"editing.aspx\">Editing</a> </li> <li> <a href=\"QC-QAR.aspx\">QC/QAR</a> </li> </ul> <h3>Flash memory</h3> <ul> <li> <a href=\"usb-branding-duplication.aspx\">USB Branding and Duplication</a> </li> <li> <a href=\"usb-gallery.aspx\">USB Gallery</a> </li> </ul> </li> <li> <h3> <a href=\"licensing-content.aspx\">Licensing content </a> </h3> <h3>Accessibility</h3> <ul> <li> <a href=\"subtitling.aspx\">Subtitling</a> </li> </ul> <h3>Security</h3> <ul> <li> <a href=\"copy-protection.aspx\">Copy Protection</a> </li> <li> <a href=\"forensic-watermarking.aspx\">Forensic Watermarking</a> </li> </ul> <h3> <a href=\"secure-library-storage.aspx\">Library</a> </h3> </li> </ul> </div> </li> <li id=\"masthead_caseStudies\"> <a href=\"casestudyList.aspx\">Our work</a> </li> <li id=\"masthead_Blog\"> <a href=\"/blog/\">Blog</a> </li> <li id=\"masthead_contactUs\"> <a href=\"contact.aspx\">Contact us</a> </li> </ul> </div>"; return($header); }
  9. this has not fixed anything super :confused: here are the two php.ini docs live session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path C:\WINDOWS\Temp C:\WINDOWS\Temp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid 0 0 local session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path c:/wamp/tmp c:/wamp/tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid 0 0
  10. yeah thanks for your reply - i saw that too just trying something - i think i might have found the issue.. when looking at the phpinfo docs of the different servers i noticed that the new windows environment is running session_save_path @ c:\windows\temp or something like that and it should be c:/windows/temp path. For example, ‘/tmp’ will be ‘C:/tmp’ in Windows. It’s also recommended to use forward slash (/) in the path to the folder instead of usual backslash (\). http://www.mydigitallife.info/2007/11/29/fix-session-save-path-red-unwritable-when-installing-joomla/
  11. uses session_start then set your session params - not session_register if you look at php.net it tells you that this methed has been stopped
  12. page 1 if (isset($_SESSION)) { session_destroy(); } /* set the cache limiter to 'private' */ session_start(); unset($_SESSION['admin']); unset($_SESSION['user']); unset($_SESSION['loggedinAccountID']); unset($_SESSION['loggedinClientID']); unset($_SESSION['loggedinProvider']); unset($_SESSION['itunesID']); unset($_SESSION['media_type']); /*****************************************************************************/ /* Load all external page definistions and functions.*/ /*****************************************************************************/ require_once('scripts/debug.php'); require_once('scripts/defs.php'); require_once('scripts/routines.php'); require_once('scripts/database.php'); unregister_globals(); $errors = NULL; $date = date("Y-m-d"); $time = date("H:i:s"); echo "print out all sessions now:::<br/>"; print_r($_SESSION); /*****************************************************************************/ /*****************************************************************************/ if(isset($_REQUEST['username'])) { $username = $_REQUEST['username']; } if(isset($_REQUEST['password'])) { $password = $_REQUEST['password']; } if(isset($_POST['devsubmit'])) { if( empty($username) && empty($password) ) { $errors['error_user_pass'] = "username and password"; } else if ( empty($username) && !empty($password) ) { $errors['error_user'] = "username"; } else if ( !empty($username) && empty($password) ) { $errors['error_pass'] = "password"; } } /*****************************************************************************/ /*****************************************************************************/ if(isset($_POST['devsubmit']) && $errors == NULL) { if (($connection = getAccountsConnection()) != NULL) { if(!$login_results = getLoginDetails(mysql_escape_string(trim($username)), mysql_escape_string(trim($password)), $connection)) { debug("error:::no login results returned....what so ever.."); header("location: login.php"); } else { $login_details = getLoginDeatilsByLoginID($login_results[TABLE_ACCOUNT__LOGIN_ID], $connection); /*****************************************************************************/ /*****************************************************************************/ if ($login_results[TABLE_ACCOUNT__ADMINISTRATOR_ID] == 1) { $_SESSION['loggedinAccountID'] = $login_results[TABLE_ACCOUNT__ACCOUNT_ID]; $_SESSION['admin'] = 1; $_SESSION['user'] = 0; updateClientLastLoginDetails($login_results[TABLE_ACCOUNT__ACCOUNT_ID], $login_results[TABLE_ACCOUNT__LOGIN_ID], $date, $time, $connection); header("location: aselection.php"); } /*****************************************************************************/ /*****************************************************************************/ if ($login_results[TABLE_ACCOUNT__ADMINISTRATOR_ID] == 0) { $_SESSION['loggedinAccountID'] = $login_results[TABLE_ACCOUNT__ACCOUNT_ID]; $_SESSION['loggedinClientID'] = $login_results[TABLE_ACCOUNT__CLIENT_ID]; $_SESSION['loggedinProvider'] = $login_details[TABLE_LOGIN__PROVIDER]; $_SESSION['admin'] = 0; $_SESSION['user'] = 1; updateClientLastLoginDetails($login_results[TABLE_ACCOUNT__ACCOUNT_ID], $login_results[TABLE_ACCOUNT__LOGIN_ID], $date, $time, $connection); //print_r($_SESSION); //sleep(10); header("location: selection.php"); //var_dump($HTTP_SESSION_VARS); } } } } page 2 session_start(); if (empty($_SESSION['user'])) { header("location: login.php"); }
  13. 1st page is setting the following when i do a print Array ( ) Array ( [loggedinAccountID] => 2 [loggedinClientID] => 1 [loggedinProvider] => Contender [admin] => 0 [user] => 1 ) second page is displaying the following when i do a dump array(0) { } array(0) { } :confused: :confused: :confused:
  14. yes 100% sure - the sites worked on the dev box which looks the same as the live box the login page does a few things - it destroys any sessions that are created - and then starts a new session_start - before logged this user in a setting the session values.. the second page does a session _start then test the passed sessions
  15. ahh ripping my hair out here, so now wondering if anyone else has had this issue.. I have just moved a site from a dev box to a live box. the problem im having is with sessions - the login page sets 5 session values and the second page checks to see if these have been set and acts accordingly - for some reason the season values which i now are being set before i do a header(location change) are just not sent to the second page. I have tried doing a basic test with to demo pages to see if the session values pass from one page to another. so i created a demo page that passed the session value "test sessions" to the other page - this worked... so i went back to my original pages and tried again - now the second page still didnt see any of the 5 values that i was trying to set but for some reason picked up the "test session" value from the test pages... this is the php.ini form the dev box ---------------------------------------------- session Session Support enabled Registered save handlers files user sqlite Registered serializer handlers php php_binary wddx Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path no value no value session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid 0 0 and this is the live box ----------------------------------------------- session Session Support enabled Registered save handlers files user sqlite Registered serializer handlers php php_binary wddx Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path C:\WINDOWS\Temp C:\WINDOWS\Temp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid 0 0 they look the same - just cant figure this one out -
  16. what do you guys think the best way of doing a large upload without hacking the php.ini timeout, max ex and memory limit. What about using php to exec ftp in linux from the command line??? do you think this would be possible or would the script that ran the exec suffer the timeout issues?
  17. I wanted to know if php times out when run from the terminal??? I am trying to create a large file ftp drop box that uploads files and when the upload is completed an email is generated. The issues i have come into is that php times out in the browser and set_time_limit is a bit of a hack!!! thanks etna
×
×
  • 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.