Gentoo Archives: gentoo-user

From: Michael Sullivan <michael@××××××××××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: [gentoo-user] OT - Need help with PHP!
Date: Fri, 22 Sep 2006 00:47:35
Message-Id: 1158885524.5997.43.camel@bullet.espersunited.com
1 Today I installed mod_suphp-0.6.1-r1 on my server box. I made the
2 changes suggested by
3 http://www.gentoo.org/proj/en/php/php4-php5-configuration.xml I then
4 restarted apache2. I'm getting weird errors from a script that worked
5 fine yesterday. Here is the info:
6
7 URL: http://www.espersunited.com/~festival/login.php
8
9 ((I have UserDir in /etc/apache2/httpd.conf set
10 to /home/*/webspace/html))
11
12 Here's the error:
13
14 Warning: include(misfunc.php) [function.include]: failed to open stream:
15 No such file or directory in /home/festival/webspace/html/login.php on
16 line 4
17
18 Warning: include() [function.include]: Failed opening 'misfunc.php' for
19 inclusion (include_path='.:/usr/share/php5:/usr/share/php')
20 in /home/festival/webspace/html/login.php on line 4
21
22 Fatal error: Call to undefined function get_var()
23 in /home/festival/webspace/html/dbconnect.php on line 3
24
25
26 Here's an ls of /home/festival/webspace/html:
27
28 festival@bullet ~/webspace/html $ ls
29 accompanist.php findschoolinfo.php specreq.php
30 buttonbar.php index.php standard.css
31 commitdirector.php login.php submitspecreq.php
32 commitschool.php mainpage.php validateaccompanist.php
33 dbconnect.php miscfunc.php validatedirector.php
34 deleteaccompanist.php registerdirector.php validateentry.php
35 email-validation.php registerschool.php validateschool.php
36 entry.php resetschoolid.php viewlogs.php
37 festival@bullet ~/webspace/html $
38
39 As you can see, miscfunc.php does exist. Just in case there's any
40 doubt, here's login.php, line 4:
41
42 include("misfunc.php");
43
44 Here are the contents of miscfunc.php:
45
46 festival@bullet ~/webspace/html $ cat miscfunc.php
47 <?
48
49 function debug($string)
50 {
51 print "***DEBUG*** $string ***DEBUG***<br><br>\n";
52 }
53
54 function get_var($varname, $esc = 0)
55 {
56 global $HTTP_GET_VARS;
57 if (isset($HTTP_SESSION_VARS["$varname"]))
58 return $esc ?
59 mysql_escape_string( $HTTP_SESSION_VARS["$varname"]) :
60 $HTTP_SESSION_VARS["$varname"];
61
62 if (isset($_SESSION["$varname"]))
63 return $esc ? mysql_escape_string( $_SESSION["$varname"]) :
64 $_SESSION["$varname"];
65 }
66
67 function set_var($varname, $value)
68 {
69 $HTTP_SESSION_VARS["$varname"] = $value;
70 $_SESSION["$varname"] = $value;
71 }
72
73 ?>
74
75 Why is this happening? I had hoped to give a demonstration of this
76 script two nights from now, but if I can't get this figured out, I won't
77 be able to...
78 -Michael Sullivan-
79
80
81
82 login.php
83
84 --
85 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: OT - Need help with PHP! (SOLVED) Michael Sullivan <michael@××××××××××××.com>