Page 1 of 1

require?

Posted: Fri Jul 07, 2006 2:57 pm
by bfdexp
Another interesting issue for everyone:

My infamous log-in script works great, except one issue with HTTPS.

In the beginning of the script, I use a mySQL Link resource to point to some mySQL files and variables. It is the first line in my code:

Code: Select all

<?php require($_SERVER["DOCUMENT_ROOT"]."/Connections/dbase.php"); ?>
It works fine when I vist the log-in as mysite.com/sec/login.php

However it no longer works when I visit the log-in with a shared SSL. It is because I have to visit the page in a differnt way, https://ipnumber/~username/sec/login.php

When I visit the site as a HTTPS, I think it is not finding the URL, here is the error:


Warning: main(/Connections/dbase.php): failed to open stream: No such file or directory in /home/username/public_html/sec/login.php on line 1

Warning: main(/Connections/dbase.php): failed to open stream: No such file or directory in /home/usename/public_html/sec/login.php on line 1

Fatal error: main(): Failed opening required '/Connections/dbase.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/sec/index.php on line 1

Any Suggestions?

Posted: Sat Jul 08, 2006 1:29 pm
by bfdexp
Any suggestions how I can require this file. I really can't figure any way of doing it????

Posted: Sat Jul 08, 2006 1:30 pm
by dull1554
you could probably creat a copy of your database include and place it inside your secure folder, and call it from there.