Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [SOLVED] New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING  (Read 4180 times)

adamj

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
[SOLVED] New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« on: November 25, 2007, 12:13:56 am »

Hi Forum :)

I'm giving the multiuser version of snews a go. A friend of mine recommended it. So I'm having problems with a fresh install displaying a blank screen. I've searched through the board and have seen this symptom being caused by numerous problems, none related to mine - so it seems!

My htaccess file is placed correctly with the right directory information, things are chmodded properly, checked and rechecked small variables I had to edit (such as dbname, password blah blah blah). Nothing looked incorrect. I also tried a reinstall - deleted everything and started over.

I check then my apache log and I found several instances of this:

[Sat Nov 24 18:03:04 2007] [error] [client xxx.xxx.xxx.xxx] PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/html/www.domain.com/public_html/xxx/xxx/snewsMU.php on line 1901

x's protect sensitive information.
So I looked down to line 1901 hoping to find a " or ' out of place, but haha, damn there are just too many.

Code: [Select]
echo '<p><label for="dp">'.l('a_display_page').':</label> <select name="display_page" id="dp">';
echo '<option value="0"'.(s('display_page') ')')')')== 0 ? ' selected="selected"' : '').'>'.l('none').'</option>';
$query = "SELECT * FROM ".db('prefix')."articles WHERE position = 3 ORDER BY id ASC";
$result = mysql_query($query);


Any ideas guys?
« Last Edit: November 26, 2007, 03:23:54 am by Keyrocks »
Logged

adamj

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #1 on: November 25, 2007, 01:46:39 am »

Thanks for your reply. :)

Yeah, I'm not using a prefix at all. Coincidentally, I've also tried 1.6 single user, and 1.5 installations. Both 1.6's come back with similar apache errors and so does 1.5, but on a different line.

Sorta mystifying. ???

edit: and according to my httpd.conf, the requested mod is installed and enabled.
« Last Edit: November 25, 2007, 02:14:03 am by adamj »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #2 on: November 25, 2007, 03:09:40 pm »

Perhaps a little more info will help us help you.
Where is your package installed - online host-server or your own localhost?
If on localhost, what server bundle are you using and what is your machine's OS?
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adamj

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #3 on: November 25, 2007, 07:30:35 pm »

This is a machine I admin. It's x64_86 FC5 - traditional LAMP environment. It has mod_rewrite installed, mysql with a dedicated db + username limited only to that db, PHP 5.1.6.

And just to be sure I didn't botch something with the db, I tried with a root login - still no dice  :P (never know - weirder things have happened hehe)
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #4 on: November 25, 2007, 07:44:00 pm »

This is a machine I admin. It's x64_86 FC5 - traditional LAMP environment. It has mod_rewrite installed, mysql with a dedicated db + username limited only to that db, PHP 5.1.6.
I'm not familiar with LAMP environments. Perhaps someone else may be able to help you.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

mike1

  • Full Member
  • ***
  • Karma: 6
  • Posts: 199
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #5 on: November 25, 2007, 08:03:55 pm »

LAMP = Linux, Apache, MySQL, PHP

Are you sure youre mot familiar with that environment  :P :)
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #6 on: November 25, 2007, 10:31:00 pm »

LAMP = Linux, Apache, MySQL, PHP
Are you sure you're mot familiar with that environment  :P :)
I know what it is... Mike... Just never used it.  :P   ;D
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adamj

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #7 on: November 26, 2007, 01:27:50 am »

Any other ideas guys? I'd hate to abandon this...It really seems ideal to fill a void of a great cms like this.
I just can't seem to figure out why apache is saying "sorry - php syntax problem"... Just doesn't make any sense.

By the power of the developers! help me figure this out!  ;D

Has anyone done any scaling with this cms to an offsite php include?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #8 on: November 26, 2007, 01:50:29 am »

@ Adamj... I am looking at the code you posted in your first post... and comparing it to the same lines in my working MU-based projects... and I am seeing a problem area. Have you been trying to modify this section? Anyway... there is some "extra" stuff in the second string that is stopping PHP right in its tracks... and I have highlighted it in red. Take them out of there and try it.
Quote

echo '<p><label for="dp">'.l('a_display_page').':</label> <select name="display_page" id="dp">';
   echo '<option value="0"'.(s('display_page') ')')')')== 0 ? ' selected="selected"' : '').'>'.l('none').'</option>';[/color]   $query = "SELECT * FROM ".db('prefix')."articles WHERE position = 3 ORDER BY id ASC";
   $result = mysql_query($query);

This same line in my working MU projects does not have those extra four sets of ') in them:

Quote
echo '<option value="0"'.(s('display_page') == 0 ? ' selected="selected"' : '').'>'.l('none').'</option>';

« Last Edit: November 26, 2007, 03:24:28 am by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adamj

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #9 on: November 26, 2007, 02:21:25 am »

That was it! Great detective work Mr. keyrocks ;)

I wonder if dreamweaver (was using that to make the variable changes - user pass etc) some how bonkered it up. Must have some way because the two other versions had similar problems.

Now to get the links working and stop referring to non-existent directories haha
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #10 on: November 26, 2007, 03:23:19 am »

That was it! Great detective work Mr. keyrocks ;)
I wonder if dreamweaver (was using that to make the variable changes - user pass etc) some how bonkered it up. Must have some way because the two other versions had similar problems.
Now to get the links working and stop referring to non-existent directories haha
If you wish to work safely with PHP code files... then you would be wise to use an Editor that does not inject code into your work unless you type it in yourself. Take a look in This Thread on good code editors.  ;)
« Last Edit: November 26, 2007, 03:32:06 am by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sasha

  • Hero Member
  • *****
  • Karma: 28
  • Posts: 938
    • cssanarchy.com
Re: [SOLVED] New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #11 on: November 26, 2007, 07:49:29 am »

I always use Wordpad.Best ,simple,easy and important no too much other bull shit :)
Logged
Every morning, I get up and look through the 'Forbes' list of the richest people in America. If I'm not there, I go to work. | If you love your job, you haven't worked a day in your life. snews with ♥

Joost

  • Guest
Re: [SOLVED] New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #12 on: November 26, 2007, 11:03:16 am »

I always use Wordpad.Best ,simple,easy and important no too much other bull shit :)
Does it create plain text? Text without hidden code?
Logged

adamj

  • Newbie
  • *
  • Karma: 0
  • Posts: 8
Re: New Install, Blank Pages, T_CONSTANT_ENCAPSED_STRING
« Reply #13 on: November 28, 2007, 02:33:05 am »

That was it! Great detective work Mr. keyrocks ;)
I wonder if dreamweaver (was using that to make the variable changes - user pass etc) some how bonkered it up. Must have some way because the two other versions had similar problems.
Now to get the links working and stop referring to non-existent directories haha
If you wish to work safely with PHP code files... then you would be wise to use an Editor that does not inject code into your work unless you type it in yourself. Take a look in This Thread on good code editors.  ;)

Heh yeah. At work, i generally use notepad or vim(vi improved). Depends on if im working in the shell at that moment or not. But at home when I do most of my web work, it always ends up being dreamweaver. Odd, it simply hasn't behaved in this manner before. But I think I'll take your advise ;)

@Joost: if you need to strip out those extra dos characters for use in a nix* environment, i suggest just using dos2unix. :)http://linuxcommand.org/man_pages/dos2unix1.html
Logged