SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Use of undefined constant SITEMAIL - assumed 'SITEMAIL'

    I have just installed the PHP 5.2, Apache 2.23 and MySQL 5.1 seperatly but when i run the previously built project, then it says:
    Code:
    Use of undefined constant SITEMAIL - assumed 'SITEMAIL'
    Where i have defined a variable
    PHP Code:
    define(SITEMAIL "info@mysite.com"); 
    in different file and i have required in the mail file. It says above message when the above error?

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try

    PHP Code:
    define('SITEMAIL'"info@mysite.com"); 
    http://www.php.net/define

  3. #3
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx keviin6,
    No any $_GET, $_POST and $_SESSIONs are being working properly What do do next?
    It shows the following error where i have used the $_REQUEST['sid']:
    Code:
    Notice: Undefined index: sid in D:\www\yerkes\services.php on line 13

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rajug View Post
    No any $_GET, $_POST and $_SESSIONs are being working properly What do do next?

    could you explain bit more?

  5. #5
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mean no globals working. That means no GET POST and SESSIONs are not working.

  6. #6
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rajug View Post
    I mean no globals working. That means no GET POST and SESSIONs are not working.
    could u echo the output of the following here?

    PHP Code:
    <?php

    echo "<pre>";
    print_r($_GET);
    print_r($_POST);
    print_r($_SESSION);
    echo 
    "</pre>";

    ?>
    call this file like test.php?foo=bar
    Last edited by keviin6; Dec 29, 2006 at 06:11. Reason: modified

  7. #7
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    print_r($_GET) displays just array()
    What may be the error?

  8. #8
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you using mod_rewrite or something similar?

    and, i have to ask, you did make sure that you had a query string in the url when you tested?

  9. #9
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have not used any query string but sometime it may come from url as query string so i have checked in the page $_GET but its not working it just show me the error:
    Code:
    Notice: Undefined index: page in D:\www\tracker\services.php on line 46


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •