09-15-2017, 05:26 PM
Sorry.. had to get some lunch.
Next I am presented the path error.
Warning: require_once(C:/wamp64/www/users/helpers/helpers.php): failed to open stream: No such file or directory in C:\webs\Reservations\users\init.php on line 22
Call Stack
# Time Memory Function Location
1 0.0360 247304 {main}( ) ...\index.php:0
2 0.0370 273544 require_once( 'C:\webs\Reservations\users\init.php' ) ...\index.php:9
So, as I mentioned above, my file path is 'c:/webs/Reservations' and this error is referring to the file path of the WAMP installation.
On checking the error in init.php identified I found that the issue is with the variable created on line 4.
The server document root variable refers to the default web root as designated in the Apache configuration:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "${INSTALL_DIR}/www"
And, INSTALL_DIR is identified earlier in the configuration. For my Apache config:
Define INSTALL_DIR c:/wamp64
So, I definitely have to change that variable to point to my aliased file directory.
I change it to :
Upon refreshing the page, it did make a difference, but now I have a new error.
Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string in C:\webs\Reservations\users\classes\DB.php on line 51
Call Stack
# Time Memory Function Location
1 0.0156 248360 {main}( ) ...\index.php:0
2 0.0156 274464 require_once( 'C:\webs\Reservations\users\init.php' ) ...\index.php:9
3 0.0624 1066840 User->__construct( ) ...\init.php:92
4 0.0780 1075488 User->find( ) ...\User.php:33
5 0.0780 1076208 DB->get( ) ...\User.php:65
6 0.0780 1076352 DB->action( ) ...\DB.php:97
7 0.0780 1078144 DB->query( ) ...\DB.php:90
8 0.0780 1079224 bindValue ( ) ...\DB.php:51
Ok, back to some debugging.
As I'm following the code in init.php I notice on line 44:
I definetely set that to 'Chicago' so maybe someone needs to look in to why that is not changed.
Continuing through the init.php code:
-- ok alot of stuff going on, but we get down to line 92 to create the user:
Following the User class now:
well... I followed along but the code jumps around too much to a whole day into it...
Anyone seen this error on DB.php line 51?
thanks,
chris
Next I am presented the path error.
Warning: require_once(C:/wamp64/www/users/helpers/helpers.php): failed to open stream: No such file or directory in C:\webs\Reservations\users\init.php on line 22
Call Stack
# Time Memory Function Location
1 0.0360 247304 {main}( ) ...\index.php:0
2 0.0370 273544 require_once( 'C:\webs\Reservations\users\init.php' ) ...\index.php:9
So, as I mentioned above, my file path is 'c:/webs/Reservations' and this error is referring to the file path of the WAMP installation.
On checking the error in init.php identified I found that the issue is with the variable created on line 4.
Code:
$abs_us_root=$_SERVER['DOCUMENT_ROOT'];
The server document root variable refers to the default web root as designated in the Apache configuration:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "${INSTALL_DIR}/www"
And, INSTALL_DIR is identified earlier in the configuration. For my Apache config:
Define INSTALL_DIR c:/wamp64
So, I definitely have to change that variable to point to my aliased file directory.
I change it to :
Code:
$abs_us_root='c:/webs/Reservations';
Upon refreshing the page, it did make a difference, but now I have a new error.
Catchable fatal error: Object of class __PHP_Incomplete_Class could not be converted to string in C:\webs\Reservations\users\classes\DB.php on line 51
Call Stack
# Time Memory Function Location
1 0.0156 248360 {main}( ) ...\index.php:0
2 0.0156 274464 require_once( 'C:\webs\Reservations\users\init.php' ) ...\index.php:9
3 0.0624 1066840 User->__construct( ) ...\init.php:92
4 0.0780 1075488 User->find( ) ...\User.php:33
5 0.0780 1076208 DB->get( ) ...\User.php:65
6 0.0780 1076352 DB->action( ) ...\DB.php:97
7 0.0780 1078144 DB->query( ) ...\DB.php:90
8 0.0780 1079224 bindValue ( ) ...\DB.php:51
Ok, back to some debugging.
As I'm following the code in init.php I notice on line 44:
Code:
$timezone_string = 'Africa/Abidjan';
I definetely set that to 'Chicago' so maybe someone needs to look in to why that is not changed.
Continuing through the init.php code:
-- ok alot of stuff going on, but we get down to line 92 to create the user:
Code:
$user = new User();
Following the User class now:
well... I followed along but the code jumps around too much to a whole day into it...
Anyone seen this error on DB.php line 51?
thanks,
chris