Current location: Hot Scripts Forums » Programming Languages » PHP » very strange functions issue


very strange functions issue

Reply
  #1 (permalink)  
Old 05-12-04, 06:31 PM
jolac jolac is offline
New Member
 
Join Date: May 2004
Location: USA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question very strange functions issue

Hi

I have a very strange issue... after user enters name and password and logs in the page appears by has this error at the top

Warning: file(/var/www/html/templates/account/menumap_buyer_buyer_buyer_buyer_buyer_buyer_buyer_ buyer_buyer_buyer_buyer_seller_profitshare_profits hare_profitshare_profitshare.html): failed to open stream: No such file or directory in /var/www/html/includes/functions.inc.php on line 33

The correct file name is

menumap_buyer_seller_profitshare.html

and it does have this name and is in the correct folder... so why is it being called with a much longer name ?

Line 33, 34, 35, and 36 in functions.inc.php show

$output_array['location_dropdown'] = '<SELECT NAME="user_location">';
$query = $db->sql_query("SELECT * FROM locations WHERE location_active =
1");
while ($result = $db->sql_fetchrow($query))


Can anybody help or suggest a fix... I ahve never seen anything like this before... also the correct file name seems too long too... but I did not make this file... it was a previous developer... I cannot download the file as the name

menumap_buyer_seller_profitshare.html

is too long... hope somebody can offer a suggestion

Thanks

To All
Reply With Quote
  #2 (permalink)  
Old 05-13-04, 12:07 AM
ActionPoint ActionPoint is offline
Newbie Coder
 
Join Date: May 2004
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
can you post the section of your source that builds the filename? i don't think we're seeing the portion that's causing the problem

at a first glance, looks like there's a loop you're getting stuck in
Reply With Quote
  #3 (permalink)  
Old 05-13-04, 12:59 AM
jolac jolac is offline
New Member
 
Join Date: May 2004
Location: USA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ActionPoint
can you post the section of your source that builds the filename? i don't think we're seeing the portion that's causing the problem

at a first glance, looks like there's a loop you're getting stuck in
Hi thanks for the reply

Yes I think it is a loop... I put error_reporting(E_ALL); into the functions.inc.php and into the login.php and I got these errors
++++++++++++++++++++++++++
Notice: Constant IN_PHPBB already defined in /var/www/html/includes/functions.inc.php on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/includes/functions.inc.php:4) in /var/www/html/includes/sessions.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/includes/functions.inc.php:4) in /var/www/html/includes/sessions.php on line 183

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/includes/functions.inc.php:4) in /var/www/html/includes/sessions.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/includes/functions.inc.php:4) in /var/www/html/includes/sessions.php on line 183

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/includes/functions.inc.php:4) in /var/www/html/login.php on line 78
+++++++++++++++++++++++++++++++++=
Here is the original code below
++++++++++++++++++++++++++++++++++
PHP Code:

<?php

01 
// Functions include file
02 // Set variable so PHPBB functions work
03 define('IN_PHPBB'true);
04 // Includes
05 $phpbb_root_path '/var/www/html/';
06 include_once('/var/www/html/extension.inc');
07 include_once('/var/www/html/common.php');
08 require_once('/var/www/html/includes/classes.inc.php');
09 //
10 // Start session management
11 //
12 $userdata session_pagestart($user_ipPAGE_INDEX);
13 init_userprefs($userdata);
14 $script_name preg_replace('/^\/?(.*?)\/?$/''\1',
15 trim($board_config['script_path']));
16 $script_name = ( $script_name != '' ) ? $script_name '/profile.'.$phpEx :
17 'profile.'.$phpEx;
18 $server_name trim($board_config['server_name']);
19 $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' :
20 'http://';
21 $server_port = ( $board_config['server_port'] <> 80 ) ? ':' .
22 trim($board_config['server_port']) . '/' '/';
23 $server_url $server_protocol $server_name $server_port $script_name;
24 /
25 // End session management
26 //
27 // Set $User variable with the User object for the logged in user.
28 $User = new User($userdata['user_id']);
29 // Generate location drop down used on several pages
30 $output_array['location_dropdown'] = '<SELECT NAME="user_location">';
31 $query $db->sql_query("SELECT * FROM locations WHERE location_active = 1");
32 while ($result $db->sql_fetchrow($query))
33 {
34 $output_array['location_dropdown'] .= '<OPTION
35 VALUE="'
.$result['location_id'].'">'.$result['location_name'].'</OPTION>';
36 }
37 $output_array['location_dropdown'] .= "</SELECT>";
38 // Do member box login routine used on all pages
39 if ($User->logged_in())
40 {
+++++++++++++++++++++++++++
Thanks again for your reply and your time to reply.

best regards

Jolac
Reply With Quote
  #4 (permalink)  
Old 05-13-04, 01:54 AM
ActionPoint ActionPoint is offline
Newbie Coder
 
Join Date: May 2004
Location: UK
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Jolac,

not sure what it is that you're actually working with here but it seems to be modifications to a phpBB

I still don't think we're looking at the section of code that's causing the problem here. Nothing you've posted so far is building a link to a page as far as I can see, which is where I'd expect to find any loop problem that might be responsible.

since you've said that the problem occurs after a user logs in, continue on from the last code you posted and let's see what's supposed to happen after a successful login

you can pm me the source if you'd like to, I'll see if I can spot what's wrong and just post the offending lines and solution out here... assuming I can fix it!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hsphere mysql issue Sales-Trends PHP 0 03-17-04 09:03 AM
php or apache issue? lokey PHP 7 03-08-04 11:55 PM
Two useful functions Styric PHP 0 01-31-04 09:05 AM
JavaScript concurrency issue dugfresh JavaScript 0 12-09-03 01:12 PM
Array passing between functions alfreds PHP 1 08-25-03 05:29 AM


All times are GMT -5. The time now is 10:32 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.