Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Use of undefined constant - PHP 4.3 issue - ANSWERED

  1. #1
    Join Date
    Jan 2003
    Posts
    3

    Default

    I am getting a long list of errors such as:

    Notice: Use of undefined constant version - assumed 'version' in c:\webfolder\OpenReality\include\common.php on line 15

    ========================================

    My web folder is:
    c:\webfolder\OpenReality

    I also have "register_globals = On" in php.ini

    Help I am pulling my hair out!

    Thanks

  2. #2
    Join Date
    Jun 2004
    Posts
    1,067

    Default

    Hi,

    When you defin the base path make sure you use "c:\\webfolder\\OpenReality " If that doens't fix it please send my your php_info() i need to look at that and i also need your version number of php and the webserver.

  3. #3
    Join Date
    Dec 2002
    Posts
    1,883

    Default

    I changed the base path as you suggested, but thte outcome was the exact same error messages.

    I can not post the URL to my PHPinfo(), I have not received my static IP yet.

    I can tell you that I have the following:
    - PHP Version 4.3.0
    - System Windows NT localhost 5.1 build 2600
    - Build Date Dec 27 2002 05:28:00
    - SERVER_SOFTWARE Apache/2.0.43 (Win32)

    Let me know if there is any other information that I can provide.

    Thanks Again!

  4. #4
    Join Date
    Jun 2004
    Posts
    1,067

    Default

    Hi,

    Ok i think php has changed quoting rules for the 4.3 relase from some of hte reading i have been doing and from what i have seen try modifing line 15 in the common.php file so that it has single quotes arround the workd version.
    Code:
    $config['version'] = '1.0.4'; //Do Not Modify
    If the error chages to line 16 then you will have to do that for every $config[''] variable.. If that works let me know, and i will make sure to inculde it in the next release.

  5. #5
    Join Date
    Dec 2002
    Posts
    1,883

    Default

    My install produced nothing but line after line of “undefined” something or the other. I added the single quotes and that solved the “undefined variable” problems but I still have line after line of “undefined indexes”, failed openings, etc. I know it’s me but I have never had this kind of problems getting something configured before! The server is a Win2k using IIS with MySQL 3.23.53-max-nt and PHP 4.3 installed.

  6. #6
    Join Date
    Jan 2003
    Posts
    3

    Default

    OK...

    So I have spent half the day changing $config[] to $config['']...

    I still get a a few errors.

    Here is what I am getting now:
    ==============================================
    Notice: Undefined index: 'template_path' in c:\CHMS_Site\listing\index.php on line 3

    Warning: main(/user_top.html) [function.main]: failed to create stream: No such file or directory in c:\CHMS_Site\listing\index.php on line 3

    Warning: main() [function.main]: Failed opening '/user_top.html' for inclusion (include_path='.;c:\php4\pear') in c:\CHMS_Site\listing\index.php on line 3

    Notice: Undefined variable: listingID in C:\chms_site\listing\template\vertical-menu\style.php on line 667

    Notice: Undefined index: 'image_column_width' in C:\chms_site\listing\template\vertical-menu\style.php on line 678

    Notice: Undefined index: 'featured_listings' in C:\chms_site\listing\template\vertical-menu\style.php on line 679


    --------------------------------------------------------------------------------

    Notice: Undefined index: 'listings_upload_path' in C:\chms_site\listing\template\vertical-menu\style.php on line 696

    Warning: getimagesize(/thumb_1_white-house.jpg) [function.getimagesize]: failed to create stream: No such file or directory in C:\chms_site\listing\template\vertical-menu\style.php on line 696

    Warning: Division by zero in C:\chms_site\listing\template\vertical-menu\style.php on line 699

    Notice: Undefined index: 'listings_view_images_path' in C:\chms_site\listing\template\vertical-menu\style.php on line 705

    Notice: Undefined index: 'click_to_learn_more' in C:\chms_site\listing\template\vertical-menu\style.php on line 705

    Example Listing
    =============================================

    Any Ides :?: :?: :?:

    HELP!!!!

  7. #7
    Join Date
    Jan 2003
    Posts
    2

    Default

    MyInfo:

    PHP 4.3.0
    Apache 1.3.24
    MySQL 3.23.49


    Same problem as mentioned above...adding single quotes gets rid of most of the warnings, except the persistent ones desctibed above. Thanks in advance for your help.

    Eager to start using Open-Realty,

    Eric

  8. #8
    Join Date
    Jun 2004
    Posts
    1,067

    Default

    Hi,

    I will be looking into this more at the begining of next week, looks like a fun problem.

    Thanks for detailed info on the issue.

  9. #9
    Join Date
    Jan 2003
    Posts
    2

    Default

    :P

    No need to wait till the beginning of next week, Ryan has already touched on the key issue:

    "php has changed quoting rules for the 4.3 relase"

    I uninstalled PHP 4.3, which it seems everyone with this problem has, and went to http://ftp.proventum.net/pub/php/win32/ and grabbed PHP 4.2.1. At first, this did not solve the problem, becuase I had the PHP4TS.DLL file from 4.3 in my WINNT folder. I replaced this one with the 4.2.1 version, which I got from the following sip archive:

    http://ftp.proventum.net/pub/php/win....2.1-Win32.zip

    Make sure you replace all reminets of the 4.3 install, and you should be good to go.

    Hope this helps you!!

    -Eric

  10. #10
    Join Date
    Jun 2004
    Posts
    1,067

    Default

    Hi,

    Ok I think I have some better info on this.. Nothing has changed in 4.3.0 except maybe the default error reporting level.. The array are all beign defined incorrectly in teh common.php file. The '' are missing arround teh string values. You can get this to display in any version of php by setting your error reporting level to E_ALL and showing errors on the screen.. That said it is a bug in open-realty that should be fixed, so I will go ahead and make a 1.0.7 version where the common.php file has teh config array correctly defined.

Similar Threads

  1. undefined variable[SOLVED]
    By chasferr in forum HELP (CLOSED)
    Replies: 3
    Last Post: 12-03-2007, 07:01 AM
  2. HELP errors - SOLVED
    By phoenix in forum HELP (CLOSED)
    Replies: 2
    Last Post: 03-08-2004, 01:35 PM
  3. Notice: Use of undefined constant - SOLVED
    By Anonymous in forum HELP (CLOSED)
    Replies: 4
    Last Post: 03-02-2004, 02:58 AM
  4. Errors with Setup
    By Anonymous in forum HELP (CLOSED)
    Replies: 11
    Last Post: 09-09-2003, 02:25 PM
  5. Call to undefined function error - Answered
    By chemaster in forum HELP (CLOSED)
    Replies: 2
    Last Post: 07-20-2003, 04:06 PM

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
  •