PHP Code Shows Up!

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

PHP Code Shows Up!

Postby DizFreak14 » 28. February 2010 02:47

Hey there, this is my first post here and I have a little issue with using XAMPP. I got the server up an running perfectly, but when I added a php files, it showed parts of the code instead of how it's supposed to look.

here's what it looks like now: http://www.dizfreakradio.co.nr/samPHPweb/playing.php

Hope you can help me, Thanks!
DizFreak14
 
Posts: 4
Joined: 28. February 2010 02:40

Re: PHP Code Shows Up!

Postby Altrea » 28. February 2010 11:14

Can't access your link.

Some questions to answer:

- Which XAMPP Version do you use?
- Anything changed in the config?
- Your files have the file extension .php (not .php5 or something else)?
- You access them in your Browser with http://localhost/ or full IP/Domain Name (not directly from your Harddisc like C:\xampp\...)?
- Do you use short open tags (<? and <?= instead of <?php and <?php echo) in your file or included files of them?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: PHP Code Shows Up!

Postby DizFreak14 » 28. February 2010 17:03

That's funny, I've forwarded and opened port 80, so I'll have to check why the link can't be accessed.

Anyway, I have XAMPP version 1.7.3, I didn't change anything in the xampp config, but I did change the php config to have short_open_tags=on so that means that I use short open tags.

I just went again to access the file through localhost, and I get the following error: Parse error: syntax error, unexpected T_ECHO in C:\XAMPP\xampp\htdocs\samPHPweb\playing.php on line 74

Never got that until now.
DizFreak14
 
Posts: 4
Joined: 28. February 2010 02:40

Re: PHP Code Shows Up!

Postby Altrea » 28. February 2010 17:07

look around your line 74 if you have forgotton brackets or semicolons or produced some other syntax error
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: PHP Code Shows Up!

Postby DizFreak14 » 02. March 2010 01:29

Ok, so I fixed a bracket issue on line 74, but now I'm getting this message: Parse error: syntax error, unexpected $end in C:\XAMPP\xampp\htdocs\samPHPweb\common\metabase\metabase_interface.php on line 675
DizFreak14
 
Posts: 4
Joined: 28. February 2010 02:40

Re: PHP Code Shows Up!

Postby Altrea » 02. March 2010 04:59

There must be anything else you haven't closed well. Check your code, if all open brackets are closed again
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: PHP Code Shows Up!

Postby DizFreak14 » 03. March 2010 01:15

Ok, fixed another bracket issue. Now I'm getting this Fatal error: Cannot redeclare MetabaseSetupDatabase() (previously declared in C:\XAMPP\xampp\htdocs\samPHPweb\common\metabase\metabase_interface.php:9) in C:\XAMPP\xampp\htdocs\samPHPweb\common\metabase\metabase_interface.php on line 22
DizFreak14
 
Posts: 4
Joined: 28. February 2010 02:40


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 56 guests