SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 29
  1. #1
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Path or Include Error

    Good Morning

    I have the following directory structurein a folder named testing in the root.

    Database (dir)
    --MySQL.php (file in dir)
    dkAdmin(dir)
    --siteadmin.php (file in dir)
    Includes(dir)
    --constants.php (file in dir)
    --dbknx.php (file in dir)
    ------------------------------------------------------------------

    My db connection class is placed before the header and is:

    <?php
    // Include DBKNX
    require_once ('Includes/dbknx.php');
    ?>

    The above is the only php on the page.

    I get these errors:
    Warning: main(Includes/dbknx.php) [function.main]: failed to open stream: No such file or directory in D:\inetpub\websites\********\testing\dkAdmin\siteadmin.php on line 3

    Fatal error: main() [function.require]: Failed opening required 'Includes/dbknx.php' (include_path='.;C:\php5\pear') in D:\inetpub\websites\***********\testing\dkAdmin\siteadmin.php on line 3


    There is an index.php that sits at /testing/index.php and it uses the same:
    <?php
    // Include DBKNX
    require_once ('Includes/dbknx.php');
    ?>

    and returns no errors.

    This must be some path issue - not sure?

  2. #2
    My precious!!! astericks's Avatar
    Join Date
    Mar 2002
    Location
    Vancouver, BC
    Posts
    1,971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Warning: main(Includes/dbknx.php) [function.main]: failed to open stream: No such file or directory in D:\inetpub\websites\********\testing\dkAdmin\siteadmin.php on line 3
    It means that the page you are running cannot find the dbknx.php page in \dkAdmin\Includes\ folder. Check if the file is there.

    That should take care of the second error too.

    cheers
    ast

  3. #3
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Parry Sound, ON
    Posts
    725
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Linux we would just always
    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'] . '/Includes/dbknx.php'); 
    That'll work no matter where you are. I have a feeling that won't work on crusty old Windows though.

  4. #4
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what is your file's path which is giving error

  5. #5
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check if the file is there.
    Yes they are they - verified.

    siteadmin page calls to dbknx.php via ('Includes/dbknx.php');

    dbknx.php calls out to mysql.php class for db connection at \database\mysql.php from \dkadmin\siteadmin.php

    I hope that ansers your q jaswinder_ranna.

  6. #6
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in that case HardCoded is right.
    Quote Originally Posted by HardCoded
    In Linux we would just always
    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'] . '/Includes/dbknx.php'); 
    That'll work no matter where you are. I have a feeling that won't work on crusty old Windows though.
    because the way relative paths work when including files is very strange take a look at following
    HTML Code:
    index.php
    DB(dir)-db.php
    DB(dir)-dbquery.php
    now in index.php you do require_once('db/db.php');

    and in db.php you do require_once('dbquery.php');//this is wrong in this context(and i mean in this context)

    NOW IT LOOKS LIKE IT IS CORRECT BUT ITS NOT. STRANGE EH

    relative paths work from the file you start including. SO THE CORRECT WAY IS

    in index.php you do require_once('db/db.php');

    and in db.php you do require_once('db/dbquery.php');//this is right in this context(and i mean in this context)

    again strange. but that's how it works with relative paths. so get into the habit of using absolute paths. it helps.

    hope i made you understand

  7. #7
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It does and thank you.

    Now I set my include path in my php.ini file to read this:

    include_path = ".;C:\php\PEAR;C:\inetpub\websites\mydomain\includes

    I understand the manual to read that now anytime I put :

    <?php
    // Include DBKNX
    require_once 'dbknx.php' ;
    ?>

    It will not matter how deep in the directory structure, the PHP always knows the path now, no materr your location in the directory? Correct?

    Parenthesis or not example: require_once ('file.php'); or omit the ()?

    Thank you
    Last edited by Tecknowjnkie; Jan 2, 2005 at 09:57. Reason: spelling

  8. #8
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BUT think of the situation where you are hosting with somebody and they don't allow you to change the PHP.ini what will you do then?...........

    so whenever you code my suggestion would be don't try to change php.ini (ofcourse somethings have to change) because you would make your code working once but you might not get the same include path with other hosts

    not there are 2 options to do the same thing
    .htaccess (don't really know how to do in there)

    ini_set('include_path','your path here same as you wanted to put in php.ini')

    but still i would recommend to use absolute paths because they save you a heck of a time and you don't have to do any of this.

    just my 2 cents......

    I MIGHT BE WRONG.

  9. #9
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you JR

    Would you mind laying out an example of your absolute via PHP? Thank you.

    I am confused on this one:

    require_once($_SERVER['DOCUMENT_ROOT'].

  10. #10
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    index.php
    db/db.php
    mysql/mysql.php
    test/test.php


    index.php is
    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'].'/db/db.php'); 
    db.php
    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'].'/mysql/msql.php'); 
    test.php
    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'].'/db/db.php'); 

    now if you were using relative then in db.php you had to require_once('mysql/mysql.php'); if you had to include db.php in index.php
    BUT
    if you had to include db.php in test/test.php you had to do require_once('../mysql/mysql.php');

    so it means you had to develop two versions of db.php for 2 files and many for many different files depending on the path. but accoring to above example you don't have to worry HOW ARE you including mysql.php because no matter what it will include mysql/mysql.php according to the path from root.

    if i am not being clear enough please mention (and if somebody think something is wrong in the above example please correct it for me) thanks

  11. #11
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JR-

    I have switched index.php's line to read:

    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'].'/includes/dbknx.php'); 
    The line in dbknx.php that calls to the MYSQL.php is now:

    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'].'/includes/MySQL.php'); 
    I moved all files into /includes and I get this error:

    Warning: main(/includes/dbknx.php) [function.main]: failed to open stream: No such file or directory in D:\inetpub\websites\MYDOMIAIN\testing\index.php on line 3
    The line in index.php on line 3 is:
    PHP Code:
    require_once($_SERVER['DOCUMENT_ROOT'].'/includes/dbknx.php'); 
    aghhhh... sorry if this is confusing JR

  12. #12
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok try this code and see what comes up
    PHP Code:
    if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/includes/dbknx.php'))
       echo 
    $_SERVER['DOCUMENT_ROOT'].'/includes/dbknx.php file does not exist';
    else
      echo 
    $_SERVER['DOCUMENT_ROOT'].'/includes/dbknx.php file exists'
    this code is just to test whether the file you are including actually exists or ther is some thing wrong.just put these lines in your index.php (don't take out $_SERVER['DOCUMENT_ROOT'] just wanna test something.

    post back the answer from this if statement

  13. #13
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $%^&^%!!!!

    It says its not there, man I tell you, its there!

    /includes/dbknx.php file does not exist
    Warning: main(/includes/dbknx.php) [function.main]: failed to open stream: No such file or directory in D:\inetpub\websites\MYDOMAIN\testing\index.php on line 10

    Fatal error: main() [function.require]: Failed opening required '/includes/dbknx.php' (include_path='.;C:\PHP\pear;D:\inetpub\websites\MYDOMIAN\includes') in D:\inetpub\websites\MYDOMAIN\testing\index.php on line 10

  14. #14
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    weird. It looks from the message as though $_SERVER['DOCUMENT_ROOT'] does not exsit.

    Try out this code, and post the results.
    PHP Code:
     clearstatcache();
     
    $inc_file $_SERVER['DOCUMENT_ROOT'] . '\includes\dbknxx.php';
     
     echo 
    '<pre>';
     
    print_r($_SERVER);
     echo 
    '</pre>';
     echo 
    ' checking for ' $inc_file;
     
     if (
    true === file_exists($inc_file))
     {
      echo 
    $inc_file ' exists <br />';
     }
     else
     {
      echo 
    $inc_file ' DOES NOT exist <br />';
     } 
    You might want to also change the includes path in your php.ini file to
    Code:
      include_path = ".;C:\php\PEAR;D:\inetpub\websites\mydomain\
    Don't forget to restart your webserver after you make this change.

  15. #15
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Array
    (
    [ALLUSERSPROFILE] => C:\Documents and Settings\All Users
    [APP_POOL_ID] => DefaultAppPool
    [CommonProgramFiles] => C:\Program Files\Common Files
    [COMPUTERNAME] => XXXXXXX
    [ComSpec] => C:\WINDOWS\system32\cmd.exe
    [DellAgentPath] => C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help
    [NUMBER_OF_PROCESSORS] => 2
    [OS] => Windows_NT
    [Path] => D:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\OpenManage\oma\bin;C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help;C:\Program Files\Dell\OpenManage\LU\bin;C:\Program Files\Dell\OpenManage\oldiags\bin;C:\php
    [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.VBS
    [PROCESSOR_ARCHITECTURE] => x86
    [PROCESSOR_IDENTIFIER] => x86 Family 6 Model 8 Stepping 6, GenuineIntel
    [PROCESSOR_LEVEL] => 6
    [PROCESSOR_REVISION] => 0806
    [ProgramFiles] => C:\Program Files
    [SystemDrive] => C:
    [SystemRoot] => C:\WINDOWS
    [TEMP] => C:\WINDOWS\TEMP
    [TMP] => C:\WINDOWS\TEMP
    [USERPROFILE] => C:\Documents and Settings\LocalService
    [windir] => C:\WINDOWS
    [HTTP_CONNECTION] => Keep-Alive
    [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    [HTTP_ACCEPT_ENCODING] => gzip, deflate
    [HTTP_ACCEPT_LANGUAGE] => en-us
    [HTTP_HOST] => www.MYDOMAIN.com
    [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
    [AUTH_TYPE] =>
    [AUTH_PASSWORD] =>
    [AUTH_USER] =>
    [CERT_COOKIE] =>
    [CERT_FLAGS] =>
    [CERT_ISSUER] =>
    [CERT_SERIALNUMBER] =>
    [CERT_SUBJECT] =>
    [CONTENT_LENGTH] => 0
    [CONTENT_TYPE] =>
    [GATEWAY_INTERFACE] => CGI/1.1
    [HTTPS] => off
    [HTTPS_KEYSIZE] =>
    [HTTPS_SECRETKEYSIZE] =>
    [HTTPS_SERVER_ISSUER] =>
    [HTTPS_SERVER_SUBJECT] =>
    [INSTANCE_ID] => 1590029509
    [LOCAL_ADDR] => 192.168.0.18
    [LOGON_USER] =>
    [QUERY_STRING] =>
    [REMOTE_ADDR] => xx.xx.xx.xxx
    [REMOTE_HOST] => xx.xx.xx.xxx
    [REMOTE_USER] =>
    [REQUEST_METHOD] => GET
    [SCRIPT_NAME] => /testing/index.php
    [SERVER_NAME] => www.MYDOMAIN.com
    [SERVER_PORT] => 80
    [SERVER_PORT_SECURE] => 0
    [SERVER_PROTOCOL] => HTTP/1.1
    [SERVER_SOFTWARE] => Microsoft-IIS/6.0
    [UNMAPPED_REMOTE_USER] =>
    [ORIG_PATH_TRANSLATED] => D:\inetpub\websites\MYDOMAIN\testing\index.php
    [ORIG_PATH_INFO] => /testing/index.php
    [ORIG_SCRIPT_NAME] => /testing/index.php
    [SCRIPT_FILENAME] => D:\inetpub\websites\MYDOMAIN\testing\index.php
    [PHP_SELF] => /testing/index.php
    [argv] => Array
    (
    )

    [argc] => 0
    )

    checking for \includes\dbknxx.php\includes\dbknxx.php DOES NOT exist

  16. #16
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah it looks like $_SERVER['DOCUMENT_ROOT'] does not exist. i can't think of why??

  17. #17
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok - that makes things very much clearer.

    You are running the IIS 6 web server, and it seems that it hasn't populated the $_SERVER super global with all the values that it should have.

    I would search www.php.net for any information about setting up PHP and IIS and also google for that as well.

    If you have set it up correctly, then we will have to find some other method of working out the document root. However, it doesn't look obvious from the data posted so far.

    Usig that same script, you can trr printing the $_ENV and $_GLOBAL arrays as well, to see if that wil help.

  18. #18
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this might help to get the root path same as document_root
    PHP Code:
            $serPath $_SERVER['PATH_TRANSLATED'];//stripslashes($_SERVER['PATH_TRANSLATED']);
            
    $pagPath $_SERVER['PATH_INFO'];//stripslashes($_SERVER['PATH_INFO']);;
            
    $length = (strlen($serPath) - strlen($pagPath))+1;
            
    $patName substr($serPath,0,$length);
            echo 
    $serPath"<br>".  $length"<br>"$patName.'<br>'
    sometimes you hav eto use stripslashes i think if you are on IIS then. i have put them in comments. try both to see which one works for you.

  19. #19
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have emailed host admin to go over install. I'll advise on outcome. Thank you both for your help.

  20. #20
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow - I must have weight LOL i got the guy to restart the shared server! Now all i get is No Input File Specified

  21. #21
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow - that was a fast response indeed.

    exactly what code are you running to get the No Input File Specified error message?

    In the code I posted (#14) replace the line
    PHP Code:
     print_r($_SERVER); 
    with

    PHP Code:
     phpinfo(); 
    This will show the complete state of your PHP environment.

  22. #22
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Version 5.0.3
    System Windows NT TRIXWEB03 5.2 build 3790 Build Date Dec 15 2004 08:06:41 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API CGI/FastCGI Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINDOWS\php.ini PHP API 20031224 PHP Extension 20041030 Zend Extension 220040412 Debug Build no Thread Safety enabled IPv6 Support enabled Registered PHP Streams php, file, http, ftp, compress.zlib Registered Stream Socket Transports tcp, udp
    This program makes use of the Zend Scripting Language Engine:Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies
    --------------------------------------------------------------------------------
    PHP Credits
    --------------------------------------------------------------------------------
    Configuration
    PHP Core
    Directive Local Value Master Value allow_call_time_pass_reference On On allow_url_fopen On On always_populate_raw_post_data Off Off arg_separator.input & & arg_separator.output & & asp_tags Off Off auto_append_file no value no value auto_globals_jit On On auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_classes no value no value disable_functions no value no value display_errors On On display_startup_errors Off Off doc_root no value no value docref_ext no value no value docref_root no value no value enable_dl On On error_append_string no value no value error_log no value no value error_prepend_string no value no value error_reporting 2039 2039 expose_php On On extension_dir C:\php\ext C:\php\ext file_uploads On On highlight.bg #FFFFFF #FFFFFF highlight.comment #FF8000 #FF8000 highlight.default #0000BB #0000BB highlight.html #000000 #000000 highlight.keyword #007700 #007700 highlight.string #DD0000 #DD0000 html_errors On On ignore_repeated_errors Off Off ignore_repeated_source Off Off ignore_user_abort Off Off implicit_flush Off Off include_path .;C:\PHP\pear;D:\inetpub\websites\mydomain\includes .;C:\PHP\pear;D:\inetpub\websites\MYDOMAIN\includes log_errors Off Off log_errors_max_len 1024 1024 magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off mail.force_extra_parameters no value no value max_execution_time 30 30 max_input_time 60 60 open_basedir no value no value output_buffering no value no value output_handler no value no value post_max_size 8M 8M precision 12 12 register_argc_argv On On register_globals On On register_long_arrays On On report_memleaks On On report_zend_debug On On safe_mode Off Off safe_mode_exec_dir no value no value safe_mode_gid Off Off safe_mode_include_dir no value no value sendmail_from sendmail_path no value no value serialize_precision 100 100 short_open_tag On On SMTP 192.168.0.9 192.168.0.9 smtp_port 25 25 sql.safe_mode Off Off track_errors Off Off unserialize_callback_func no value no value upload_max_filesize 2M 2M upload_tmp_dir C:\PHP\uploadtemp C:\PHP\uploadtemp user_dir no value no value variables_order EGPCS EGPCS xmlrpc_error_number 0 0 xmlrpc_errors Off Off y2k_compliance On On zend.ze1_compatibility_mode Off Off
    bcmath
    BCMath support enabled
    calendar
    Calendar support enabled
    com_dotnet
    COM support enabled DCOM support disabled .Net support enabled
    Directive Local Value Master Value com.allow_dcom 0 0 com.autoregister_casesensitive 1 1 com.autoregister_typelib 0 0 com.autoregister_verbose 0 0 com.code_page no value no value com.typelib_file no value no value
    ctype
    ctype functions enabled
    curl
    CURL support enabled CURL Information libcurl/7.11.2 OpenSSL/0.9.7c zlib/1.1.4
    dom
    DOM/XML enabled DOM/XML API Version 20031129 libxml Version 2.6.11 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled
    ftp
    FTP support enabled
    gd
    GD Support enabled GD Version bundled (2.0.28 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.1.9 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled
    iconv
    iconv support enabled iconv implementation "libiconv" iconv library version 1.9
    Directive Local Value Master Value iconv.input_encoding ISO-8859-1 ISO-8859-1 iconv.internal_encoding ISO-8859-1 ISO-8859-1 iconv.output_encoding ISO-8859-1 ISO-8859-1
    libxml
    libXML support active libXML Version 2.6.11 libXML streams enabled
    mysql
    MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 4.1.7
    Directive Local Value Master Value mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off
    odbc
    ODBC Support enabled Active Persistent Links 0 Active Links 0 ODBC library Win32
    Directive Local Value Master Value odbc.allow_persistent On On odbc.check_persistent On On odbc.default_db no value no value odbc.default_pw no value no value odbc.default_user no value no value odbc.defaultbinmode return as is return as is odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes odbc.max_links Unlimited Unlimited odbc.max_persistent Unlimited Unlimited
    pcre
    PCRE (Perl Compatible Regular Expressions) Support enabled PCRE Library Version 4.5 01-December-2003
    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 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_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 100 100 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 4 4 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:\PHP\sessiondata C:\PHP\sessiondata session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid 0 0
    SimpleXML
    Simplexml support enabled Revision $Revision: 1.139.2.4 $ Schema support enabled
    SPL
    SPL support enabled Interfaces RecursiveIterator, SeekableIterator Classes ArrayObject, ArrayIterator, CachingIterator, CachingRecursiveIterator, DirectoryIterator, FilterIterator, LimitIterator, ParentIterator, RecursiveDirectoryIterator, RecursiveIteratorIterator, SimpleXMLIterator
    SQLite
    SQLite support enabled PECL Module version 2.0-dev $Id: sqlite.c,v 1.146.2.3 2004/09/26 01:41:40 wez Exp $ SQLite Library 2.8.14 SQLite Encoding iso8859
    Directive Local Value Master Value sqlite.assoc_case 0 0
    standard
    Regex Library Bundled library enabled Dynamic Library Support enabled Internal Sendmail Support for Windows enabled
    Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 auto_detect_line_endings 0 0 date.default_latitude 31.7667 31.7667 date.default_longitude 35.2333 35.2333 date.sunrise_zenith 90.83 90.83 date.sunset_zenith 90.83 90.83 default_socket_timeout 60 60 safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset= user_agent no value no value
    tokenizer
    Tokenizer Support enabled
    wddx
    WDDX Support enabled WDDX Session Serializer enabled
    xml
    XML Support active XML Namespace Support active libxml2 Version 2.6.11
    xsl
    XSL enabled libxslt Version 1.1.7 libxslt compiled against libxml Version 2.6.11 EXSLT enabled libexslt Version 0.8.5
    zlib
    ZLib Support enabled Compiled Version 1.1.4 Linked Version 1.1.4
    Directive Local Value Master Value zlib.output_compression Off Off zlib.output_compression_level -1 -1 zlib.output_handler no value no value
    Additional Modules
    Module Name
    Environment
    Variable Value ALLUSERSPROFILE C:\Documents and Settings\All Users APP_POOL_ID DefaultAppPool CommonProgramFiles C:\Program Files\Common Files COMPUTERNAME TRIXWEB03 ComSpec C:\WINDOWS\system32\cmd.exe DellAgentPath C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help NUMBER_OF_PROCESSORS 2 OS Windows_NT Path D:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\OpenManage\oma\bin;C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help;C:\Program Files\Dell\OpenManage\LU\bin;C:\Program Files\Dell\OpenManage\oldiags\bin;C:\php PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.VBS PROCESSOR_ARCHITECTURE x86 PROCESSOR_IDENTIFIER x86 Family 6 Model 8 Stepping 6, GenuineIntel PROCESSOR_LEVEL 6 PROCESSOR_REVISION 0806 ProgramFiles C:\Program Files SystemDrive C: SystemRoot C:\WINDOWS TEMP C:\WINDOWS\TEMP TMP C:\WINDOWS\TEMP USERPROFILE C:\Documents and Settings\LocalService windir C:\WINDOWS HTTP_CONNECTION Keep-Alive HTTP_ACCEPT */* HTTP_ACCEPT_ENCODING gzip, deflate HTTP_ACCEPT_LANGUAGE en-us HTTP_HOST www.MYDOMAIN.com HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) APP_POOL_ID DefaultAppPool AUTH_TYPE no value AUTH_PASSWORD no value AUTH_USER no value CERT_COOKIE no value CERT_FLAGS no value CERT_ISSUER no value CERT_SERIALNUMBER no value CERT_SUBJECT no value CONTENT_LENGTH 0 CONTENT_TYPE no value GATEWAY_INTERFACE CGI/1.1 HTTPS off HTTPS_KEYSIZE no value HTTPS_SECRETKEYSIZE no value HTTPS_SERVER_ISSUER no value HTTPS_SERVER_SUBJECT no value INSTANCE_ID 1590029509 LOCAL_ADDR 192.168.0.18 LOGON_USER no value QUERY_STRING no value REMOTE_ADDR REMOTE_HOST REMOTE_USER no value REQUEST_METHOD GET SCRIPT_NAME /testing/index.php SERVER_NAME www.MYDOMAIN.com SERVER_PORT 80 SERVER_PORT_SECURE 0 SERVER_PROTOCOL HTTP/1.1 SERVER_SOFTWARE Microsoft-IIS/6.0 UNMAPPED_REMOTE_USER no value ORIG_PATH_TRANSLATED D:\inetpub\websites\MYDOMAIN\testing\index.php ORIG_PATH_INFO /testing/index.php ORIG_SCRIPT_NAME MYDOMAI N\testing\index.php
    PHP Variables
    Variable Value PHP_SELF /testing/index.php _SERVER["ALLUSERSPROFILE"] C:\Documents and Settings\All Users _SERVER["APP_POOL_ID"] DefaultAppPool _SERVER["CommonProgramFiles"] C:\Program Files\Common Files _SERVER["COMPUTERNAME"] TRIXWEB03 _SERVER["ComSpec"] C:\WINDOWS\system32\cmd.exe _SERVER["DellAgentPath"] C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help _SERVER["NUMBER_OF_PROCESSORS"] 2 _SERVER["OS"] Windows_NT _SERVER["Path"] D:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\OpenManage\oma\bin;C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help;C:\Program Files\Dell\OpenManage\LU\bin;C:\Program Files\Dell\OpenManage\oldiags\bin;C:\php _SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.VBS _SERVER["PROCESSOR_ARCHITECTURE"] x86 _SERVER["PROCESSOR_IDENTIFIER"] x86 Family 6 Model 8 Stepping 6, GenuineIntel _SERVER["PROCESSOR_LEVEL"] 6 _SERVER["PROCESSOR_REVISION"] 0806 _SERVER["ProgramFiles"] C:\Program Files _SERVER["SystemDrive"] C: _SERVER["SystemRoot"] C:\WINDOWS _SERVER["TEMP"] C:\WINDOWS\TEMP _SERVER["TMP"] C:\WINDOWS\TEMP _SERVER["USERPROFILE"] C:\Documents and Settings\LocalService _SERVER["windir"] C:\WINDOWS _SERVER["HTTP_CONNECTION"] Keep-Alive _SERVER["HTTP_ACCEPT"] */* _SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate _SERVER["HTTP_ACCEPT_LANGUAGE"] en-us _SERVER["HTTP_HOST"] www.MYDOMAIN.com _SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) _SERVER["AUTH_TYPE"] no value _SERVER["AUTH_PASSWORD"] no value _SERVER["AUTH_USER"] no value _SERVER["CERT_COOKIE"] no value _SERVER["CERT_FLAGS"] no value _SERVER["CERT_ISSUER"] no value _SERVER["CERT_SERIALNUMBER"] no value _SERVER["CERT_SUBJECT"] no value _SERVER["CONTENT_LENGTH"] 0 _SERVER["CONTENT_TYPE"] no value _SERVER["GATEWAY_INTERFACE"] CGI/1.1 _SERVER["HTTPS"] off _SERVER["HTTPS_KEYSIZE"] no value _SERVER["HTTPS_SECRETKEYSIZE"] no value _SERVER["HTTPS_SERVER_ISSUER"] no value _SERVER["HTTPS_SERVER_SUBJECT"] no value _SERVER["INSTANCE_ID"] 1590029509 _SERVER["LOCAL_ADDR"] 192.168.0.18 _SERVER["LOGON_USER"] no value _SERVER["QUERY_STRING"] no value _SERVER["REMOTE_ADDR"] _SERVER["REMOTE_HOST"] _SERVER["REMOTE_USER"] no value _SERVER["REQUEST_METHOD"] GET _SERVER["SCRIPT_NAME"] /testing/index.php _SERVER["SERVER_NAME"] www.MYDOMAIN.com _SERVER["SERVER_PORT"] 80 _SERVER["SERVER_PORT_SECURE"] 0 _SERVER["SERVER_PROTOCOL"] HTTP/1.1 _SERVER["SERVER_SOFTWARE"] Microsoft-IIS/6.0 _SERVER["UNMAPPED_REMOTE_USER"] no value _SERVER["ORIG_PATH_TRANSLATED"] D:\inetpub\websites\MYDOMAIN\testing\index.php _SERVER["ORIG_PATH_INFO"] /testing/index.php _SERVER["ORIG_SCRIPT_NAME"] /testing/index.php _SERVER["SCRIPT_FILENAME"] D:\inetpub\websites\MYDOMAIN\testing\index.php _SERVER["PHP_SELF"] /testing/index.php _SERVER["argv"] Array
    (
    )
    _SERVER["argc"] 0 _ENV["ALLUSERSPROFILE"] C:\Documents and Settings\All Users _ENV["APP_POOL_ID"] DefaultAppPool _ENV["CommonProgramFiles"] C:\Program Files\Common Files _ENV["COMPUTERNAME"] TRIXWEB03 _ENV["ComSpec"] C:\WINDOWS\system32\cmd.exe _ENV["DellAgentPath"] C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help _ENV["NUMBER_OF_PROCESSORS"] 2 _ENV["OS"] Windows_NT _ENV["Path"] D:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\OpenManage\oma\bin;C:\Program Files\Dell\OpenManage\OMSA\bin;C:\Program Files\Dell\OpenManage\OMSA\;C:\Program Files\Dell\OpenManage\OMSA\help;C:\Program Files\Dell\OpenManage\LU\bin;C:\Program Files\Dell\OpenManage\oldiags\bin;C:\php _ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.VBS _ENV["PROCESSOR_ARCHITECTURE"] x86 _ENV["PROCESSOR_IDENTIFIER"] x86 Family 6 Model 8 Stepping 6, GenuineIntel _ENV["PROCESSOR_LEVEL"] 6 _ENV["PROCESSOR_REVISION"] 0806 _ENV["ProgramFiles"] C:\Program Files _ENV["SystemDrive"] C: _ENV["SystemRoot"] C:\WINDOWS _ENV["TEMP"] C:\WINDOWS\TEMP _ENV["TMP"] C:\WINDOWS\TEMP _ENV["USERPROFILE"] C:\Documents and Settings\LocalService _ENV["windir"] C:\WINDOWS _ENV["HTTP_CONNECTION"] Keep-Alive _ENV["HTTP_ACCEPT"] */* _ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate _ENV["HTTP_ACCEPT_LANGUAGE"] en-us _ENV["HTTP_HOST"] www.MYDOMAIN.com _ENV["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) _ENV["AUTH_TYPE"] no value _ENV["AUTH_PASSWORD"] no value _ENV["AUTH_USER"] no value _ENV["CERT_COOKIE"] no value _ENV["CERT_FLAGS"] no value _ENV["CERT_ISSUER"] no value _ENV["CERT_SERIALNUMBER"] no value _ENV["CERT_SUBJECT"] no value _ENV["CONTENT_LENGTH"] 0 _ENV["CONTENT_TYPE"] no value _ENV["GATEWAY_INTERFACE"] CGI/1.1 _ENV["HTTPS"] off _ENV["HTTPS_KEYSIZE"] no value _ENV["HTTPS_SECRETKEYSIZE"] no value _ENV["HTTPS_SERVER_ISSUER"] no value _ENV["HTTPS_SERVER_SUBJECT"] no value _ENV["INSTANCE_ID"] 1590029509 _ENV["LOCAL_ADDR"] 192.168.0.18 _ENV["LOGON_USER"] no value _ENV["QUERY_STRING"] no value _ENV["REMOTE_ADDR"] _ENV["REMOTE_HOST"] _ENV["REMOTE_USER"] no value _ENV["REQUEST_METHOD"] GET _ENV["SCRIPT_NAME"] /testing/index.php _ENV["SERVER_NAME"] www.MYDOMAIN.com _ENV["SERVER_PORT"] 80 _ENV["SERVER_PORT_SECURE"] 0 _ENV["SERVER_PROTOCOL"] HTTP/1.1 _ENV["SERVER_SOFTWARE"] Microsoft-IIS/6.0 _ENV["UNMAPPED_REMOTE_USER"] no value _ENV["ORIG_PATH_TRANSLATED"] D:\inetpub\websites\MYDOMAIN\testing\index.php _ENV["ORIG_PATH_INFO"] /testing/index.php _ENV["ORIG_SCRIPT_NAME"] /testing/index.php _ENV["SCRIPT_FILENAME"] D:\inetpub\websites\MYDOMAIN\testing\index.php
    PHP License
    This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.

    checking for \includes\dbknxx.php\includes\dbknxx.php DOES NOT exist
    This is the header area of the three column plus header layout
    This left column must appear first in the HTML code. Using CSS, it is floated to the left side of the "wrapper" block that encloses all three columns.

    If you assign a background color or image to this column, you will also need to style the "wrapper" block so that the background is matched when this isn't the longest column on the page.
    This right column actually comes second in the code. This is necessary for it to line up with the top of the other two columns when floated.
    This center column actually appears last in the HTML code. This is a necessary evil of this particular method. Only the absolute positioning method discussed previously allows this column to come first.

    To leave room for the side columns, this center column has left and right margins equal to their respective widths (plus additional spacing).

    This footer should float below the three columns.

  23. #23
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is very strange.

    You might see if there are any PHP5 / IIS/6 experts at your webhost, and ask them why $_SERVER['DOCUMENT_ROOT'] does not exist.

    Two things I noticed
    1) Your PATH variable seems extremley long. Is it possible to make it very much shorter - say D:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\php.

    2) You have register_globals set to ON. Set this to off.

    The only thing I can suggest, if none of the above work, is to create your own version of $_SERVER['DOCUMENT_ROOT']. You can use jaswinder_rana's code, or this little snippet

    PHP Code:

     clearstatcache
    ();
     
    $doc_root str_replace($_SERVER['PHP_SELF'], ''$_SERVER['SCRIPT_FILENAME']) . '/';
       
       
    $inc_file $doc_root 'includes/dbknx.php';
       if (
    true === file_exists($inc_file))
       {
         
    // do your include stuff here
       
    }
       else
       {
         echo 
    $inc_file ' does not exist<br />';
       } 
    Hope this helps

  24. #24
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Parry Sound, ON
    Posts
    725
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, been thru this before on Winblows. That var does not exist and apparently it's a major pita to get it to work. I ended up having to do some gay workaround like this:
    PHP Code:
    if(!isset($_SERVER['DOCUMENT_ROOT']))
    {
        
    $n $_SERVER['SCRIPT_NAME'];
        
    $f ereg_replace('\\\\''/',$_SERVER['SCRIPT_FILENAME']);
        
    $f str_replace('//','/',$f);
        
    $_SERVER['DOCUMENT_ROOT'] = eregi_replace($n""$f);

    Ugh!

  25. #25
    SitePoint Evangelist Tecknowjnkie's Avatar
    Join Date
    Nov 2004
    Location
    Mission Viejo
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Hard Coded! I have read Harry and Kevin's books over the past 60 days and I can not wait until I can do all this neat stuff with PHP/MySql.

    HC - This will be more gay - Where would I put that ditty you wrote in my structure? LOL

    Does anybody else want to comment on this anomaly with Bill's OS? If I can work out with my host (whom despises anything not not Bill G approved), I think I'll be having fun soon!

    SWDEV & JR - Thank you.
    Last edited by Tecknowjnkie; Jan 3, 2005 at 13:50. Reason: thanks


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
  •