Jump to content

jaylimo

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by jaylimo

  1. Ok done! Everyone, use SMTP Authentication for Scripts hosted on TCH Many Thanks to Rick at TCH!
  2. Raul, everyone, Please help this is urgent I am unable to use PhpMailer, because the SMTP server on TCH has IP relaying disabled How can i send out invites from my php powered web app. Please HELP!!! We are close to going live and this is a HUGE ROADBLOCK!! Thanks Jay
  3. ok got it running. after some tweaks Thanks, and ignore earlier posts
  4. Raul, Take a look Can you set register_globals=on in php.ini ??? Thanks, Jay http://www.php-forum.com/p/viewtopic.php?t=1483 would like to address a problem that I have seen time and time again by newcomers that are posting for answers to why thier form does not post. register_globals=on is your enemy. Starting with PHP version 4.2 the php.ini is set to off. What this means is that any book or tutorial that has been published before 4.2 was released is probably telling you a big lie on how to handle POST, GET, SYSTEM, SESSION, COOKIES. I know this is the case if you are using the book published by sams titles "PHP and MySQL Web Development" I know. I own the book. It does give you a good overview of the php/mysql language, but some of it is incorrect. There is a blurb in there stating that the way they are teaching you is wrong. They even reference to you that by turning register_globals=off in the php.ini is the correct way. Why they did that I don't know. The point of my post is to be a possible reference to those wondering why they do not see thier variables after they hit the submit button. I will try and give some examples so that you will overcome your teachings of miss-information. 1. Sessions Sessions are your friend. They allow you to preserve certain data across subsequent accesses. Which means you can transfer information from page to page. How this works is by using the session_start() function that is built into PHP. What this does is create a unique id that is sent to the clients computer in either the form of a cookie or through the URL. Please note that there has been talk of removing the method to set it from the URL. If you are somewhat firmilar with sessions and are using session_register() this is not the best way to do it. Not only is there more code involved it also may confuse the living s@!$% out of you. There is a much easier way to do this. Introduced into PHP 4.1 are Predefined Variables. These are a set of reserved variables that have made working with sessions and other functions as easy as simple arrays. Using this method to set a session variable all you have to do is use the $_SESSION super global. Code: <?php session_start(); $_SESSION['new_variable'] = 1; ?> This will create a session variable that will remain untill you use session_destroy(), the user closes the browser, or the time you have specified times out. The information that is set within the $_SESSION[] can be accessed from page to page. This is good when using a shopping cart, restricting access to different pages, or even making sure that your webpage counter doesn't keep increasing when they hit the refresh button.
  5. Raul, Thanks for the info: Have the site sort of partially working Here's something that is causing it to break.... my $_SESSION[pid] are not working...... anything that you need to turn on at the tCH end?? googled for info on this and this is the core of the problem now, any workarounds? Thanks, Jay
  6. Raul, Will look into it, Something that will save me a lot of time as well if you can answer it. how do i set up the database connection user and password for the mysql database e.g. dbgpx that i have set up i have set up user a with password b with all priveleges for dbgpx. the user gets setup as a_a ( being the login which i use for CPanel) Now what is the username and password that i should use from php.... ihave tried all combos.... please advise
  7. Hello! looking for some "urgent help". Php is so easy to set up Have it installed on my local dev machine for 5 months now. Thought i'd test the pilot app on TCH. Well lots of unpleasant surprises. I'm using the SmartTemplate engine or Smarty (nothing more than a folder location)..... lots of errors e.g. Warning: session_destroy(): Trying to destroy uninitialized session in x.php on line 8 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at libs.inc.php:25) in x.php on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at libs.inc.php:25) in x.php on line 9 Warning: Cannot modify header information - headers already sent by (output started at libs.inc.php:25) in x.php on line 35 Please Help! The setup on my dev machine was very easy and i did not need to do any changes with the php.ini file at all. Thanks, Jay
×
×
  • Create New...