By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

PHP Configuration Problems

P: n/a
Hi

I have been successfully running db driven websites on my ISPs webserver
using PHP Version 4.2.3.for a while now.

I am now experimenting with running mysql/php on my lap-top so I can access
these sites without being connected to the internet.

I have downloaded the latest binaries for MySQL and PHP and they are running
on the laptop with IIS5.1.

However, when I use the code that was running correctly on my ISPs webserver
on the LOCALHOST...

$logged_on_member_id=$_SESSION['s_member_id'];
$logged_on_member_name=$_SESSION['s_member_name'];

Throws up the following error messages...

Notice: Undefined index: s_member_id in membervariables.php on line 2
Notice: Undefined index: s_member_name in membervariables.php on line 3

What have I done differently/incorrectly/badly???

TIA

Mark

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
If this is bad or not is a matter of taste....
I usually try to avoid warnings and notices in my code
which sometimes can result in few lines of code more
but at least I know exactly what is going on.

What is different is that your localhost is set to display
notices and warnings while your ISP is not...

Check your php.ini directive error_reporting.

Tomy.

Mark wrote:
Hi

I have been successfully running db driven websites on my ISPs
webserver using PHP Version 4.2.3.for a while now.

I am now experimenting with running mysql/php on my lap-top so I can
access these sites without being connected to the internet.

I have downloaded the latest binaries for MySQL and PHP and they are
running on the laptop with IIS5.1.

However, when I use the code that was running correctly on my ISPs
webserver on the LOCALHOST...

$logged_on_member_id=$_SESSION['s_member_id'];
$logged_on_member_name=$_SESSION['s_member_name'];

Throws up the following error messages...

Notice: Undefined index: s_member_id in membervariables.php on line 2
Notice: Undefined index: s_member_name in membervariables.php on line
3

What have I done differently/incorrectly/badly???

TIA

Mark

Jul 17 '05 #2

P: n/a
Thanks for your reply Tomy

This solved many of my problems.

I also had to set register_globals to ON to get the site working properly.

I hadn't realised my code was so sloppy

Thanks again

Mark
"Tomislav Petrovic" <t.********@inet.hr> wrote in message
news:bp**********@brown.net4u.hr...
If this is bad or not is a matter of taste....
I usually try to avoid warnings and notices in my code
which sometimes can result in few lines of code more
but at least I know exactly what is going on.

What is different is that your localhost is set to display
notices and warnings while your ISP is not...

Check your php.ini directive error_reporting.

Tomy.

Mark wrote:
Hi

I have been successfully running db driven websites on my ISPs
webserver using PHP Version 4.2.3.for a while now.

I am now experimenting with running mysql/php on my lap-top so I can
access these sites without being connected to the internet.

I have downloaded the latest binaries for MySQL and PHP and they are
running on the laptop with IIS5.1.

However, when I use the code that was running correctly on my ISPs
webserver on the LOCALHOST...

$logged_on_member_id=$_SESSION['s_member_id'];
$logged_on_member_name=$_SESSION['s_member_name'];

Throws up the following error messages...

Notice: Undefined index: s_member_id in membervariables.php on line 2
Notice: Undefined index: s_member_name in membervariables.php on line
3

What have I done differently/incorrectly/badly???

TIA

Mark


Jul 17 '05 #3

P: n/a
Mark wrote:
Thanks for your reply Tomy
This solved many of my problems. No problem.
I also had to set register_globals to ON to get the site working
properly.

I'd advice against it since it defaults to OFF in new PHP versions
and ISPs shall probably tend to leave it that way in future.

Moreover global variables are a BIG NO NO in any structured programing
language :). Yes, maybe, also a matter of taste :).

Tomy.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.