(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-31-24 08:41 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Admin+ problem New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Deleted User
Banned


 





Since: 05-08-06

Last post: None
Last view: 6312 days
Posted on 08-03-06 11:21 PM Link | Quote
I uploaded admin+ that has the php files for an admin control panel,I uploaded them in a folder named admin but when I go to "/admin/index.php"
I get this message:
Warning: main(lib/config.php): failed to open stream: No such file or directory in /home/www/board.awardspace.com/lib/function.php on line 5

Fatal error: main(): Failed opening required 'lib/config.php' (include_path='.:/usr/local/php4/share/pear') in /home/www/board.awardspace.com/lib/function.php on line 5

What could be the problem?

edit:this is in v1.92

ps:the config file is in the /lib/ folder.


(edited by the_man on 08-03-06 10:22 PM)
Randy53215

Melon Bug


 





Since: 11-17-05
From: Greenfield, Wisconsin (U.S.A)

Last post: 6312 days
Last view: 6311 days
Skype
Posted on 08-04-06 03:40 AM Link | Quote
Ugh!

Whats on line 5 in function?

Its a require I bet but write the whole line so I know.
Deleted User
Banned


 





Since: 05-08-06

Last post: None
Last view: 6312 days
Posted on 08-04-06 06:24 PM Link | Quote
oops sorry:

require 'lib/config.php';


I doubt thats the problem,because the config file is there.
Mister Lover

Red Tektite








Since: 12-26-05
From: Wisconsin

Last post: 6324 days
Last view: 6312 days
Posted on 08-05-06 12:26 AM Link | Quote
I would try deleting 'lib/config.php' and re upload it.


(edited by Mister Lover on 08-04-06 11:27 PM)
(edited by Mister Lover on 08-04-06 11:27 PM)
Cellar Dweller +

Red Koopa









Since: 11-18-05
From: Arkansas

Last post: 6320 days
Last view: 6311 days
Posted on 08-05-06 01:59 AM Link | Quote
When Apache(the web server used by a vast majority of PHP sites) executes a script it sets the current directory to the directory that the script is in. Therefore, when you use your admin panel, the current directory is set to "/home/www/board.awardspace.com/admin".

According to the error messages that you posted, the PHP interpreter on your server only looks in two places for files to include: the current directory("." expands to whatever the current directory is), and "/usr/local/php4/share/pear"(You can ignore this one; it is for includible files for all sites on the server, and you can't upload to it anyway).

er.. Let me try an easier explanation:

You must already be including "../lib/function.php" in your admin panel. Because PHP looks for files to include starting from the directory that the original script is in instead of the script with the include/require statement, when function.php tries to include "lib/config.php", PHP looks in "/home/www/board.awardspace.com/admin/lib/config.php" instead of "/home/www/board.awardspace.com/lib/config.php".

As for a solution, you could try adding a "chdir('..');" to the start of and removing the leading ".."s from the require statements in your admin scripts.
KeiiChi Kun

Leever
Learn some manners.
Password changed to gibberish and IP banned.


 





Since: 01-01-06
From: Sushi Bar

Last post: 6324 days
Last view: 6324 days
Posted on 08-05-06 07:08 AM Link | Quote
Originally posted by the_man
I uploaded admin+ that has the php files for an admin control panel,I uploaded them in a folder named admin but when I go to "/admin/index.php"
I get this message:
Warning: main(lib/config.php): failed to open stream: No such file or directory in /home/www/board.awardspace.com/lib/function.php on line 5

Fatal error: main(): Failed opening required 'lib/config.php' (include_path='.:/usr/local/php4/share/pear') in /home/www/board.awardspace.com/lib/function.php on line 5

What could be the problem?

edit:this is in v1.92

ps:the config file is in the /lib/ folder.


Um, unless you made an account called board, then you've probably got the directory wrong, it should be "board.--username--.awardspace.com".
Deleted User
Banned


 





Since: 05-08-06

Last post: None
Last view: 6312 days
Posted on 08-05-06 12:44 PM Link | Quote
the directory is ok,I can have custom sub domains not just my username.
Randy53215

Melon Bug


 





Since: 11-17-05
From: Greenfield, Wisconsin (U.S.A)

Last post: 6312 days
Last view: 6311 days
Skype
Posted on 08-06-06 08:56 AM Link | Quote
try....

..lib/config.php

Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - Admin+ problem |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.012 seconds; used 383.38 kB (max 462.48 kB)