1
KenBarlow
Undefined index: REQUEST_METHOD
  • 2005/3/13 14:31

  • KenBarlow

  • Just popping in

  • Posts: 5

  • Since: 2005/3/13


I am new to php and MySQL so patients appreciated! I do know C and C++, so am not completely green, but ....

I have the problem mentioned by a few people with a blank screen during the installation.

The installation appears to work with everything showing 'green' and no warnings at all. After the database checks I just get a blank screen. Any php file I try to view is the same blank whiteness - but I can write a hello world php file and this works fine so php is installed correctly.

If I go into the appropriate directory and type:

"php -f index.php"

I get the following warning:
Notice [PHP]: Undefined index: REQUEST_METHOD in file C:\Program Files\Apache Group\Apache2\
htdocs\include\common.php line 78<br>

I have done some googling and searching on this site but cannot find that anybody else has this exact cause. I think it must be something simple to fix?

PHP 5.0.3
Apache 2.0.53
MySQL server 4.1
Win2K local host installation.

Thanks in advance for any assistance.


2
Dave_L
Re: Undefined index: REQUEST_METHOD
  • 2005/3/13 15:39

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Quote:
If I go into the appropriate directory and type:

"php -f index.php"


Running PHP from the command line is not the same as running it in from a web server; it's a different environment. In particular, the variable $_SERVER['REQUEST_METHOD'] is only defined in a web server environment. A web application such as XOOPS wil not run correctly from the command line.

3
KenBarlow
Re: Undefined index: REQUEST_METHOD
  • 2005/3/13 21:27

  • KenBarlow

  • Just popping in

  • Posts: 5

  • Since: 2005/3/13


Oops

I cannot find a conclusion to the 'blank screen' problem in any of these threads. Have I missed something? I have seen the FAQ linked from a different post.

What is the recommended debug method that works from within the browser environment?

Thanks.

4
rowdie
Re: Undefined index: REQUEST_METHOD
  • 2005/3/13 21:49

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


Did you mean that you've seen the "Why do I have a blank white page FAQ? If so, did you manage to turn on PHP Debug?

5
KenBarlow
Re: Undefined index: REQUEST_METHOD
  • 2005/3/14 9:37

  • KenBarlow

  • Just popping in

  • Posts: 5

  • Since: 2005/3/13


Thanks for your reply...

Yes - having looked at the FAQ I set the php.ini file as follows:

track_errors = On
ignore_repeated_source = Off
ignore_repeated_errors = Off
log_errors = On
display_startup_errors = On
error_reporting =E_ALL
log_errors_max_len = 0
html_errors = On
error_log = c:\php\ErrorLog.txt
display_errors = On


but cannot seem to get any output either to ErrorLog.txt or displayed. Hence my googling to find the inappropriate command line posted in my original message.

If I open http://localhost I just get a directory listing of the htdocs directory. If I open http://localhost/index.php I just get the blank screen. Could this be a clue?

I am thinking there must be something basic wrong with my setup, if I could get some debug output it would be good.

A couple of other notes: I have tried turning the firewall off (just in case). I seem to have two php.ini files, one in c:\php and the other in c:\winnt. I have tried making the changes in both.

Is php.ini read once on startup? Or each time you open a browser window? I have been resetting my PC to check but it would be good not to have to bother.

Thanks again.

6
rowdie
Re: Undefined index: REQUEST_METHOD
  • 2005/3/14 10:08

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


The directory listing is easy to solve, that's an Apache setting. In httpd.conf add "index.php" to this config setting:

# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
DirectoryIndex index
index.html index.htm index.shtml index.php


php.ini is only read when the server restarts, I believe...

Have you tried to set the php debug config "on" in the database, as is outlined in the faq?

Quote:
2. If you can't get to the administration page, but have access to mysql, try the query "UPDATE xoops_config SET conf_value=1 WHERE conf_name = 'debug_mode'". Be sure to make sure "xoops_config" matches the name of the config table in your installation.


That's how you'll get the most relevent error messages, if you can get it to work.

And a final suggestion... are the templates_c, uploads and cache folders given write permissions - CHMOD 777?

7
KenBarlow
Re: Undefined index: REQUEST_METHOD
  • 2005/3/14 11:32

  • KenBarlow

  • Just popping in

  • Posts: 5

  • Since: 2005/3/13


I am still working on the "UPDATE xoops_config" query ...

With all the debug turned on as per my previous post I have tried reinstalling XOOPS from the beginning (running though the wizard from the install directory).

Interestingly on the page that shows:

"Saving configuration data..
File ../mainfile.php overwritten by ../mainfile.dist.php.
Constant XOOPS_ROOT_PATH written to C:/Program Files/Apache Group/Apache2/htdocs.
Constant XOOPS_URL written to http://localhost.
Constant XOOPS_DB_TYPE written to mysql.

<snip>
"

I get the warning:

"Notice: Use of undefined constant XOOPS_ROOT_PATH - assumed 'XOOPS_ROOT_PATH' in C:\Program Files\Apache Group\Apache2\htdocs\install\index.php on line 258"

This looks wrong to me. Should XOOPS_ROOT_PATH be set to the htdocs directory? Rather than the install directory?

However, looking in mainfile.php I find what I would think was correct:

"define('XOOPS_ROOT_PATH', 'C:/Program Files/Apache Group/Apache2/htdocs');"


I have checked that the directories mentioned in the previous post can be written.
Thanks once again.

8
KenBarlow
Re: Undefined index: REQUEST_METHOD
  • 2005/3/14 16:51

  • KenBarlow

  • Just popping in

  • Posts: 5

  • Since: 2005/3/13


I have uninstalled Apache, php and MySQL, then reinstalled using the single download DeveloperSide.NET from http://www.devside.net - now everything works well.

Is good -

9
mCity
Re: Undefined index: REQUEST_METHOD
  • 2005/3/21 7:35

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Your problem may be caused by MySQL 4.1
I got the problem and so search anyone using MySQL 4.1 with similar result.

Login

Who's Online

59 user(s) are online (29 user(s) are browsing Support Forums)


Members: 0


Guests: 59


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits