Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 

News:



Author Topic: PHP script errors  (Read 3995 times)

Mobilepro

  • **
  • Posts: 74
    • View Profile
    • Email
PHP script errors
« on: July 14, 2010, 11:48:11 AM »
First let me say that moving to Arvixe was the best decision I could have made...it's been beyond my expectation.
 
Having said that...I could really use some help getting some PHP scripts to run and am trying to decipher whether the problem is with the script or on the server.

My hosting package is Windows and the CMS application is called Instant Update.

I have verified that all the required files have been uploaded correctly to the server under wwwroot.  If I add in a simple script line into index.php:
 <?php
define('BASE_PATH','./');
include BASE_PATH . 'manage/functions.php';
?>

I get the following error:
Warning: include(./manage/functions.php) [function.include]: failed to open stream: No such file or directory in C:\HostingSpaces\xxx\xxxxxx.com\wwwroot\index.php on line 3

Warning: include(./manage/functions.php) [function.include]: failed to open stream: No such file or directory in C:\HostingSpaces\xxx\xxxxx.com\wwwroot\index.php on line 3

Warning: include() [function.include]: Failed opening './manage/functions.php' for inclusion (include_path='.;C:\php5\pear') in C:\HostingSpaces\xxx\xxxxxx.com\wwwroot\index.php on line 3:

The file functions.php does exist in the "manage" folder under the root. When I run functions.php it parses the file but generates the same type of error on multiple lines in the file so it does look like it is finding the files.

Requirements for the application are:
■1 MySQL database
■PHP 4 or PHP 5
■register_globals turned OFF
■proper session handling
■5 MB free web space for scripts
■■mod_rewrite (optional)

Interestingly the application control panel works just fine and it's in the same folder.

Any thoughts would be greatly appreciated.

Arvand

  • Operations Manager
  • *****
  • Posts: 6142
    • View Profile
    • http://www.arvixe.com
Re: PHP script errors
« Reply #1 on: July 14, 2010, 12:00:48 PM »
Another option is to ask a staff member to set your PHP to run as CGI. This will slow down php but will fix your issue.
Arvand Sabetian
Operations Manager
arvand.sabetian@arvixe.com
1-888-927-8493 [Ext.861]

Shai

  • **
  • Posts: 214
    • View Profile
Re: PHP script errors
« Reply #2 on: July 14, 2010, 12:08:11 PM »
And this is what works for me:

Quote from: vars.php
<?php
$color = 'green';
$fruit = 'apple';
?>

Quote from: index.php
<?php
define('BASE_PATH','c:/hostingspaces/xxx/xxxxxx.com/wwwroot/');
include BASE_PATH . 'inc/vars.php';
echo "A $color $fruit"; // A green apple
?>

Result and expected output:
Quote
A green apple

Mobilepro

  • **
  • Posts: 74
    • View Profile
    • Email
Re: PHP script errors
« Reply #3 on: July 14, 2010, 12:18:09 PM »
I'm blown away by the fast response and help with this...defining BASE_PATH with the full path instead of relative did the trick.

Thanks to all!

Shai

  • **
  • Posts: 214
    • View Profile
Re: PHP script errors
« Reply #4 on: July 14, 2010, 12:20:08 PM »
People on this forum aim to please :)

Shai

  • **
  • Posts: 214
    • View Profile
Re: PHP script errors
« Reply #5 on: July 14, 2010, 12:20:47 PM »

RyanArvixe

  • Sr. Technical Operations Officer
  • *****
  • Posts: 3616
    • View Profile
    • Arvixe, LLC
    • Email
Re: PHP script errors
« Reply #6 on: July 14, 2010, 07:44:51 PM »
Glad we was able to get things running for you. As Shai said, we do aim to please here at Arvixe  :)
Ryan Chaffin
Sr. Technical Operations Officer
ryan.chaffin@arvixe.com
1-888-927-8493

 

Web Hosting

Linux Hosting
ASP .NET Hosting
Business Hosting
Reseller Hosting
Dedicated Servers

Server Alerts
Acceptable Use Policy
Terms of Service
Privacy Policy

Affiliate Program
Site Map

Blog  Hosting

WordPress Hosting
ExpressionEngine Hosting
Movable Type Hosting
Habari Hosting
Textpattern Hosting


CMS  Hosting

Joomla Hosting
Drupal Hosting
MODX Hosting
Concrete5 Hosting
Xoops Hosting
Ecommerce  Hosting

nopCommerce Hosting
OpenCart Hosting
Magento Hosting
osCommerce Hosting
Tomato Cart Hosting


Video Sharing Software  Hosting

ClipBucket Hosting
PHPMotion Hosting
ClipShare Hosting
osTube Hosting
vShare Hosting
Forum  Hosting

XenForo Hosting
vBulletin Hosting
MyBB Hosting
phpBB Hosting
Simple Machines Hosting


Social Network and Community Website  Hosting

SocialEngine Hosting
Elgg Hosting
Dolphin Hosting
phpfox Hosting
OxWall Hosting
Copyright © 2003-2014 Arvixe, LLC. All trademarks are property of their legal owner.