I receive the following error at my current website:
Code:
Warning: require_once(/home/vaporman/public_html/../medical/framework/yii.php) [function.require-once]: failed to open stream: No such file or directory in /home/vaporman/public_html/index.php on line 12
Fatal error: require_once() [function.require]: Failed opening required '/home/vaporman/public_html/../medical/framework/yii.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/vaporman/public_html/index.php on line 12
Warning: require_once(/home/vaporman/public_html/../medical/framework/yii.php) [function.require-once]: failed to open stream: No such file or directory in /home/vaporman/public_html/index.php on line 12
The red bit is probably the error. You're trying to change up outside of public_html into another directory outside of it. I suspect medical is actually inside public_html not above it.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
The red bit is probably the error. You're trying to change up outside of public_html into another directory outside of it. I suspect medical is actually inside public_html not above it.
Yes. There is nothing outside of public_html related to the site.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
),
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=*************',
'emulatePrepare' => true,
'username' => '**********',
'password' => '**********,
'charset' => 'utf8',
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
Thats not the complete line. It's part of a function call spread over multiple lines (hence the , characters).
What you need to do is use a program like notepad++ which has line numbering built in and will show you the REAL line 58.
What you have shown me is something you THINK is line 58 but it actually isn't because it's been wrapped over multiple lines.
Look at this for an example of how multiple lines do NOT increment the line number - in otherwords if it's wrapped, it shouldn't (unless you pressed return) have its own line number (look at lines 6 and 16):
But just in case, try deleting the , at the end of this: 'charset' => 'utf8',
Otherwise you're going to need to post the entire script or at least a large amount more of it.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
Hmmm. Is there some type of view or format that Notepad++ should be set to, because simply opening the file in Notepad++ still shows that as line 58, with no jumps in line number because of "wrapping".
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'ashu',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=*************',
'emulatePrepare' => true,
'username' => '**********',
'password' => '*********,
'charset' => 'utf8',
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
/*
array(
'class'=>'CWebLogRoute',
),
*/
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'ashutosh2801@gmail.com',
),
);
Last edited by vaporman87; 12-24-2012 at 09:55 PM..
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
Sorry for that. I'm a bit of a novice. The code was written by a developer I hired from Freelancer.com. They had high marks, but that doesn't always mean something.
PHP Code:
<?php
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'Retro-Daze',
'defaultController' => 'site',
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'ashu',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
),
// application components
'components'=>array(
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=********',
'emulatePrepare' => true,
'username' => '**********',
'password' => '*******,
'charset' => 'utf8',
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
/*
array(
'class'=>'CWebLogRoute',
),
*/
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'ashutosh2801@gmail.com,
),
);
Last edited by vaporman87; 12-25-2012 at 06:00 AM..
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
Thank for that Tango. With your help I was able to get the site running. Though, I am finding some bugs. Here is one error I encountered and it's respective code:
Code:
Fatal error: Call to undefined method stdClass::update() in /home/vaporman/public_html/protected/controllers/SiteController.php on line 1231
PHP Code:
Yii::app()->user->setFlash('msgError','Sorry, your reply could not be posted. Please try again.');
}
$forum->update(); is line 1231. Any thoughts, or need more info?
This error occurs when a user is logged in to my site and views a forum thread, then clicks the "RetroDaze" logo to return to the home page.
The site is located here: www.retro-daze.com
Last edited by vaporman87; 12-25-2012 at 07:35 PM..
I don't do object oriented programming (which is what your code is relating to) so can't comment on it really I'm afraid.
Have you tried asking the original coder to fix this? It is their responsibility really - if they can't write working code then they need to fix it for you.
Others here may be able to help you but it may be a bit long winded.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.