Page 1 of 1

PHP Code Shows Up!

PostPosted: 28. February 2010 02:47
by DizFreak14
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!

Re: PHP Code Shows Up!

PostPosted: 28. February 2010 11:14
by Altrea
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?

Re: PHP Code Shows Up!

PostPosted: 28. February 2010 17:03
by DizFreak14
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.

Re: PHP Code Shows Up!

PostPosted: 28. February 2010 17:07
by Altrea
look around your line 74 if you have forgotton brackets or semicolons or produced some other syntax error

Re: PHP Code Shows Up!

PostPosted: 02. March 2010 01:29
by DizFreak14
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

Re: PHP Code Shows Up!

PostPosted: 02. March 2010 04:59
by Altrea
There must be anything else you haven't closed well. Check your code, if all open brackets are closed again

Re: PHP Code Shows Up!

PostPosted: 03. March 2010 01:15
by DizFreak14
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