GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 31-May-2005, 08:16
Clive73 Clive73 is offline
New Member
 
Join Date: May 2005
Location: Bristol
Posts: 9
Clive73 is on a distinguished road

Problems following php installation


Hello all,

I've recently installed apache 2.0.50, mysql 4.1.11, php 5.0.4 and phpmyadmin 2.6.2 on my PC and it's doing strange things. Whilst php seems to work it doesn't like variables such as $PHP_SELF (or $_SERVER[PHP_SELF]) and gives the error about an undefined variable. When creating a new table within phpmyadmin it doesn't always display all the tables and gives html code instead. It also doesn't display all the menu options of a drop-down menu - when looking at the source code there's corruption and huge chunks of it missing. Running the file on another PC is fine.

I've checked the config files against what various web sites give and they appear to be ok.

Please help!

thanks,

Clive.
  #2  
Old 31-May-2005, 08:47
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello Clive73,

If you can post a snippet of your code which includes the bits where you used the $_SERVER['PHP_SELF'] variable, that will help us figure this out.

Is this on a Windows XP PC? Which config files are you talking about when you say "config" files?

Really, you're saying a lot but nothing useful enough to suggest anything...
  #3  
Old 31-May-2005, 10:54
Clive73 Clive73 is offline
New Member
 
Join Date: May 2005
Location: Bristol
Posts: 9
Clive73 is on a distinguished road
Sorry, you're right, should have put more.

Am running XP professional. The config files I've checked are php.ini (which needed a few settings changed, in relation to the password), and httpd.conf. All the other config files I could find appeared to match what I'd read on various sites.

The PHP_SELF line is:

<form action="<? $_SERVER['PHP_SELF'] ?>">

However, I've also tried:

<form action="<? echo $_SERVER['PHP_SELF'] ?>">
<form action="<? echo $_SERVER[PHP_SELF] ?>">
<form action="<? echo $PHP_SELF ?>">

None of which seemed to work.

Not sure if this could be a problem but after having installed phpmyadmin it wouldn't connect to the database; throwing up the error:

#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Checking on the site, I'm running versions above those that could cause this error and everntually fixed it by entering a command about an old password style at the mysql command line (sorry, can't remember the exact syntex). After that could access the database fine. Before this point I hadn't really tried playing with php so can't say if PHP_SELF was working before then.

Hope this makes things a little clearer.

Thanks,

Clive.
  #4  
Old 02-Jun-2005, 08:13
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
About : Client does not support authentication protocol requested by server; consider upgrading MySQL client, we already discussed this in the past.

About : PHP_SELF

I really don't know what could be wrong but I suppose you could find out by inserting this line somewhere in your script just to see if you can find the array ($_SERVER):

<?php echo "<pre>"; print_r( $_SERVER ); echo "</pre>";?>

Also, what is the setting for this in your php.ini file:

short_open_tag = Off

It should be "on" if you want the example you gave in your last reply to really work.
  #5  
Old 02-Jun-2005, 11:03
Clive73 Clive73 is offline
New Member
 
Join Date: May 2005
Location: Bristol
Posts: 9
Clive73 is on a distinguished road
Hello....

short_open_tag is already set to on.

And inserting the $_SERVER line returns:

Quote:
Array
(
[PHPRC] => d:/php
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, application/x-shockwave-flash, */*
[HTTP_REFERER] => http://localhost/playing/
[HTTP_ACCEPT_LANGUAGE] => en-gb
[HTTP________________] => ----- -------
[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; .NET CLR 1.0.3705)
[HTTP_HOST] => localhost
[HTTP_CONNECTION] => Keep-Alive
[PATH] => d:\\borland\\CBUILD~1\\Projects\\Bpl;d:\\borland\\ CBUILD~1\\Bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C: \\WINDOWS\\System32\\Wbem
[SystemRoot] => C:\\WINDOWS
[COMSPEC] => C:\\WINDOWS\\system32\\cmd.exe
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
[WINDIR] => C:\\WINDOWS
[SERVER_SIGNATURE] => Apache/2.0.50 (Win32) PHP/4.3.11 Server at localhost Port 80

[SERVER_SOFTWARE] => Apache/2.0.50 (Win32) PHP/4.3.11
[SERVER_NAME] => localhost
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
[REMOTE_ADDR] => 127.0.0.1
[DOCUMENT_ROOT] => D:/Apache Group/Apache2/htdocs
[SERVER_ADMIN] => Clive@localhost
[SCRIPT_FILENAME] => D:/Apache Group/Apache2/htdocs/playing/phptest.php
[REMOTE_PORT] => 1097
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /playing/phptest.php
[SCRIPT_NAME] => /playing/phptest.php
[PHP_SELF] => /playing/phptest.php
[PATH_TRANSLATED] => D:/Apache Group/Apache2/htdocs/playing/phptest.php
[argv] => Array
(
)

[argc] => 0
)

Went back to an older version of php as the newer version had corruption in a config file (yet to reinstall it) but it makes no difference to presenting the information.

Does this make it any clearer? Thinking of simply removing everything (instead of just parts) and reinstalling from freshly downloaded files. Worth a try?

Thanks.
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache installation problems kenmbobua Apache Web Server Forum 1 12-May-2004 12:31
Apache - problems using PHP outside the intranet ooandioo Apache Web Server Forum 6 04-Feb-2004 10:27
Installation problems arman Apache Web Server Forum 3 03-Feb-2004 13:02
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 17:14
Problems with apache win 98 php and vhosts Kplonk Computer Software Forum - Windows 2 22-May-2002 11:06

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:42.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.