index.php problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

index.php problem

Postby mavee » 30. November 2008 12:21

Hello ...

i installed xampp yesterday and everything was working fine ...till i tried to open index.php just to try ot ...and i saw that the whole thing is messed up ...for example the title which should be 'xampp for windows ' or 'xampp für windows ' is now 'xamppfürforwindows' and am getting messed up writings all over the page ..i thought it might be a browser or a script problem ...installed new script module but that didnt work ....

any tipps about what might be wrong and how to fix it ??

thanx in advance
mavee
 
Posts: 4
Joined: 30. November 2008 11:48

Postby Sharley » 30. November 2008 12:51

Posting in several forums the same question is called cross posting and is frowned upon in all good forums - please don't do it here - thanks.
25 Forum Posting Etiquette Tips <-- Tip 11


In .\xampp\htdocs\xampp folder there should be a file called lang.tmp

If it is there, open it in your text editor and make sure it contains only the 2 letters of your language for example en for English.

If the file does not exist then either create it in your text editor as a blank file or include those 2 letters en for English etc. and save the file to the above folder.

If you create a blank file then you will have to select your language again when going to http://localhost then the lang.tmp file will be created again for you automagically.

BTW do you have problems like you had when using the index.php file by simply going to http://localhost with no index.php added?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby mavee » 30. November 2008 13:14

Sharley wrote:Posting in several forums the same question is called cross posting and is frowned upon in all good forums - please don't do it here - thanks.
25 Forum Posting Etiquette Tips <-- Tip 11


In .\xampp\htdocs\xampp folder there should be a file called lang.tmp

If it is there, open it in your text editor and make sure it contains only the 2 letters of your language for example en for English.

If the file does not exist then either create it in your text editor as a blank file or include those 2 letters en for English etc. and save the file to the above folder.

If you create a blank file then you will have to select your language again when going to http://localhost then the lang.tmp file will be created again for you automagically.

BTW do you have problems like you had when using the index.php file by simply going to http://localhost with no index.php added?



sorry for the cross posting ...

i checked my lang.tmp seems fine ...only EN in it ...

i have no problems accessing localhost ...even the scripting is fine there ...actually i have no problems ...and this index.php thing i discovered it by mistake .... and just wanted to know how the normal index.php file should look ...

thanx
mavee
 
Posts: 4
Joined: 30. November 2008 11:48

Re: index.php problem

Postby IMil » 04. December 2008 09:03

I had the same problem. It was caused by the previous installation of PHP on the same computer. The "php.ini" file from the old installation was used instead of the correct one.

To check if this applies to you, select phpinfo() from the xampp admin menu. Then look what the "Loaded Configuration File" displays. If should point to "c:/xampp/php/php.ini".

If this is the case, edit the file "c:/xampp/apache/conf/extra/httpd-xampp.conf".
Insert the line
PHPIniDir "C:/xampp/php"
before the line "LoadModule php5_module ..."

Restart Apache and everything should be OK.
IMil
 
Posts: 3
Joined: 04. December 2008 08:47

Re: index.php problem

Postby Sharley » 04. December 2008 10:39

IMil wrote:...Then look what the "Loaded Configuration File" displays. If should point to "c:/xampp/php/php.ini"...
This is not correct.

The php.ini file used in a default XAMPP installation is:
.\xampp\apache\bin\php.ini
Which is defined in many places on the Apache Friends web site and in particular the FAQ:
http://www.apachefriends.org/en/faq-xampp-windows.html#phpini
Please take the time to read the documentation on the Apache Friends web site.

XAMPP has no control over a previous installed instance of php, only you can know this.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: index.php problem

Postby IMil » 04. December 2008 20:16

Sharley wrote:The php.ini file used in a default XAMPP installation is:
.\xampp\apache\bin\php.ini
Please take the time to read the documentation on the Apache Friends web site.
XAMPP has no control over a previous installed instance of php, only you can know this.

Thanks for the correction. However, my point remains: XAMPP is intended to be a self-contained distribution, isn't it? Therefore, the previous installation of PHP should not have any effect upon XAMPP. So the explicit PHPIniDir directive is a right thing to have in the standard distribution.

What's more, I've read the FAQ and it only mentions that apache/bin/php.ini is the correct ini file, but it tells nothing about how to make PHP use it and why the incorrect ini file may take precedence. If I hadn't uninstalled PHP before installing XAMPP I wouldn't even notice that the incorrect php.ini file is used - everything would work fine (though maybe slow). Perhaps a lot of people are using XAMPP with the ini file from another PHP installation without knowing it.
IMil
 
Posts: 3
Joined: 04. December 2008 08:47


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 123 guests