Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-26-2012, 09:02 PM   PM User | #1
cewinds
New to the CF scene

 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
cewinds is an unknown quantity at this point
Another "syntax error, unexpected T_CONSTANT_ENCAPSED_STRING" Thread

Just trying to figure out what is wrong here. Nothing was changed - I cleared cache in my admin panel (magento) and my website went down - and I was able to find out the problem, but cannot fix it because (to me) it looks right... but I am a novice.

Website: www.cewinds.com

Error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/vhosts/cewinds.com/httpdocs/index.php on line 75

Code:
57 if (file_exists($maintenanceFile)) {
    $basePath = dirname($_SERVER['PHP_SELF']);
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}

require_once $mageFilename;

#Varien_Profiler::enable();

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

ini_set(display_errors', 1);

73 umask(0);
74 
75 $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
76 $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
77
78 Mage::run($mageRunCode, $mageRunType);
Thanks for any help...!

Last edited by Inigoesdr; 01-27-2012 at 03:21 AM..
cewinds is offline   Reply With Quote
Old 01-26-2012, 09:11 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,650
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
You're syntax error is on line 71. You are missing an opening ' on your ini_set, so it thinks your entire ini_set is that of ,1 through to isset($_SERVER[ on line 75.
Fou-Lu is offline   Reply With Quote
Old 01-26-2012, 09:22 PM   PM User | #3
cewinds
New to the CF scene

 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
cewinds is an unknown quantity at this point
Awesome, thanks... I actually took that out because I thought that was the solution to at least finding out what was wrong... now that I put it back in I am back to square one... I get no error, and no site.

Now back to scratching my head to figure out what actually went wrong.

It was so simple, I just hit the clear cache button so I could save a back up before installing an extension, and now my site isn't working.

Thanks for your help!
cewinds is offline   Reply With Quote
Old 01-26-2012, 09:26 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,650
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
That we can't help you with since you'll need to debug it.
Presumably the only output is generated by Mage::Run. That would indicate that $mageRunCode and $mageRunType are empty or don't provide any path for which Mage::run to execute and output. Effectively: its bad error handling from the side of Mage. We certainly know your error reporting is enabled.
I do see that these values come from $_SERVER. This is typically not written into by PHP, so that would tell me there is an environment variable configured in .htaccess which is not there when it should be. Did you perform any modifications to .htaccess (or any other file really) prior to an installation?
Fou-Lu is offline   Reply With Quote
Old 01-26-2012, 09:36 PM   PM User | #5
cewinds
New to the CF scene

 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
cewinds is an unknown quantity at this point
Angry

Never even made it that far. No files were changes, other than the clear cache.

I read somewhere else that the same thing happened to another person... but no answer to how they fixed theirs was posted.

I did check my error logs (httpdocs/var/reports/ and read this in one of the files, if you think it means something.... (not sure if there is a specific way I should post this)

a:5:{i:0;s:282:"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') + 1 AS `range`, COUNT(*) AS `count` FROM `catalog_product_entity` AS `e`
INNE' at line 1";i:1;s:5004:"#0 /var/www/vhosts/cewinds.com/httpdocs/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/cewinds.com/httpdocs/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /var/www/vhosts/cewinds.com/httpdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT FLOOR(((...', Array)
#3 /var/www/vhosts/cewinds.com/httpdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT FLOOR(((...', Array)
#4 /var/www/vhosts/cewinds.com/httpdocs/lib/Zend/Db/Adapter/Abstract.php(782): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Layer/Filter/Price.php(162): Zend_Db_Adapter_Abstract->fetchPairs(Object(Varien_Db_Select))
#6 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php(142): Mage_Catalog_Model_Resource_Eav_Mysql4_Layer_Filter_Price->getCount(Object(Mage_Catalog_Model_Layer_Filter_Price), NULL)
#7 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php(189): Mage_Catalog_Model_Layer_Filter_Price->getRangeItemCounts(NULL)
#8 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(151): Mage_Catalog_Model_Layer_Filter_Price->_getItemsData()
#9 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(120): Mage_Catalog_Model_Layer_Filter_Abstract->_initItems()
#10 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php(109): Mage_Catalog_Model_Layer_Filter_Abstract->getItems()
#11 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(126): Mage_Catalog_Model_Layer_Filter_Abstract->getItemsCount()
#12 /var/www/vhosts/cewinds.com/httpdocs/app/design/frontend/base/default/template/catalog/layer/view.phtml(46): Mage_Catalog_Block_Layer_Filter_Abstract->getItemsCount()
#13 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Template.php(216): include('/var/www/vhosts...')
#14 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Template.php(247): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#15 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Template.php(261): Mage_Core_Block_Template->renderView()
#16 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#17 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#18 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(758): Mage_Core_Block_Text_List->_toHtml()
#19 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(525): Mage_Core_Block_Abstract->toHtml()
#20 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(476): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#21 /var/www/vhosts/cewinds.com/httpdocs/app/design/frontend/base/default/template/page/3columns.phtml(51): Mage_Core_Block_Abstract->getChildHtml('left')
#22 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Template.php(216): include('/var/www/vhosts...')
#23 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Template.php(247): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#24 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Template.php(261): Mage_Core_Block_Template->renderView()
#25 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Block/Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#26 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#27 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(389): Mage_Core_Model_Layout->getOutput()
#28 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Catalog/controllers/CategoryController.php(152): Mage_Core_Controller_Varien_Action->renderLayout()
#29 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()
#30 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('view')
#31 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#32 /var/www/vhosts/cewinds.com/httpdocs/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#33 /var/www/vhosts/cewinds.com/httpdocs/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#34 /var/www/vhosts/cewinds.com/httpdocs/index.php(78): Mage::run('', 'store')
#35 {main}";s:3:"url";s:97:"/alpha-series-saxophones-flutes-trumpets.html?amp=&cat=57&dir=desc&limit=10&mode=list&order=price";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
cewinds is offline   Reply With Quote
Old 01-26-2012, 11:05 PM   PM User | #6
cewinds
New to the CF scene

 
Join Date: Jan 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
cewinds is an unknown quantity at this point
Well, I was able to get it fixed - not sure exactly how it happened, but the site is up and running at least, and I have a few bugs to fix, but the site is up which is the most important thing.

Somehow I ended up on a page where I was able to upgrade alot of the magento packages (Magento Connect Manager) and after upgrading several files the site came up.

What a nightmare.

Thanks for all your help.

Brian S
CE Winds
cewinds is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:41 AM.


Advertisement
Log in to turn off these ads.