Page 1 of 2

Starting Lampp

PostPosted: 14. November 2006 13:28
by jensolav2
I have installed lampp on Ubuntu 6.10 and trying to start localhsot I get the errormassage: Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/xampp/index.php:2) in /opt/lampp/htdocs/xampp/index.php on line 4

What is that about?

kind regards

jensolav2

Re: Starting Lampp

PostPosted: 14. November 2006 20:09
by underdone
jensolav2 wrote:Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/xampp/index.php on line 2


This error is happening because the lang.tmp file in the /opt/lampp/htdocs/xampp/ folder got deleted. So use nano, vim or whatever text editor you like and make a file call lang.tmp in that folder and simply put the text "en" and save it. Make sure you don't have some kind of cleanup program that is deleting .tmp files in that folder, and if you can't figure out why just remove all privileges but read.

I'm not sure what the second error is, but see if it is resolved with the first fix.

PostPosted: 17. November 2006 21:31
by kulgan
would seem that the first error message gave html output, and therefore the headers could not be modified - makes sense.

PostPosted: 20. November 2006 17:19
by jensolav2
Now I get the errormessage:
Warning: include(lang/en .php) [function.include]: failed to open stream: No such file or directory in /opt/lampp/htdocs/xampp/index.php on line 12

Warning: include() [function.include]: Failed opening 'lang/en .php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/xampp/index.php on line 12

How does that come

kind regards

jensolav2

PostPosted: 20. November 2006 17:24
by jensolav2
Now I get the errormessage:
Warning: include(lang/en .php) [function.include]: failed to open stream: No such file or directory in /opt/lampp/htdocs/xampp/index.php on line 12

Warning: include() [function.include]: Failed opening 'lang/en .php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/xampp/index.php on line 12

How does that come

kind regards

jensolav2

PostPosted: 20. November 2006 17:38
by kulgan
it seems that there is an error message because php is searching for the wrong name - lang/en .php instead. You could try renaming the file to "en .php", but that will most likely give problems later. You could try finding the place in the file that gives the error, then see if there is a space too many somewhere....

PostPosted: 20. November 2006 19:34
by martinpre
i think that you put "en " instead of "en" in the lang.tmp

am i right?

PostPosted: 20. November 2006 20:39
by jensolav2
No , I'm not adding the space. I have the suspicion that the space comes in the index.php in the xampps-folder, but I can't figure out how.
the line:
<?include("lang/".file_get_contents("lang.tmp").".php"); ?>

By the way how do I start phpmyadmin?

I get the message:

Existing configuration file (./config.inc.php) is not readable.

starting at http://localhost/phpmyadmin.

kind regards

jensolav2

PostPosted: 20. November 2006 20:47
by martinpre
hmm, how does your read/write permissions look like? and did you installed and started the server with root rights?

PostPosted: 21. November 2006 13:25
by kulgan
jensolav2 wrote:No , I'm not adding the space. I have the suspicion that the space comes in the index.php in the xampps-folder, but I can't figure out how.
the line:
<?include("lang/".file_get_contents("lang.tmp").".php"); ?>

By the way how do I start phpmyadmin?

I get the message:

Existing configuration file (./config.inc.php) is not readable.

starting at http://localhost/phpmyadmin.

kind regards

jensolav2


Have a look in the lang/lang.tmp file....
It might be deleted after the script has run through, though, so it might not actually be there unless the script is running...

PostPosted: 21. November 2006 20:54
by Dave_L
My lang.tmp file is exactly two bytes long, and contains "en".

-rw------- 1 nobody root 2 2005-05-28 21:23 lang.tmp

If yours is longer than two bytes, edit it again and make sure it only contains those two bytes.

If the editor you're using won't do that, you can do it with this command:

echo -n "en" > lang.tmp

PostPosted: 25. November 2006 21:43
by maddog39
The way I fix this is by running the command recommended to install xampp.

Ubuntu:

sudo tar xvfz xamp-x.x.x.x.tar.gz -C /opt

or other distros:

su -c "tar xvfz xamp-x.x.x.x.tar.gz -C /opt"

PostPosted: 26. November 2006 23:16
by burckaya
Thanks for openning this subject.
I used these steps to solve the problem:

1. created lang.tmp file
2. typed en in the lang.tmp file.
3. changed the permision of the lang.tmp file to rw rw rw

my mistake was to type "en" in lang.tmp file. Then I got the error on line 12. Then I corrected the lang.tmp file.

:)

PostPosted: 01. February 2008 10:39
by Placebo
Hi i have the same problem running under vectorlinux 5.8 std gold
now i tryde the above solution given but it still doesn't work
am i doing anything wrong
excuse my poor englisch
i log in as root so i think the problem isn't there
but i cold be wrong

hope you can help me
grtzzzzzzzzz Placebo

edit found it
i made the file as a user and not as root

PostPosted: 16. February 2008 17:04
by joaomrpereira
maddog39 wrote:The way I fix this is by running the command recommended to install xampp.

Ubuntu:

sudo tar xvfz xamp-x.x.x.x.tar.gz -C /opt

or other distros:

su -c "tar xvfz xamp-x.x.x.x.tar.gz -C /opt"


If blind are those who don't want to see, and I'm one of those. Thanks maddog39. It really helps read the instructions :)