Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
file-access disabled/no suitable wrapper on line __ error
Old 01-29-2010, 10:52 AM file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
Hello users!

I am trying to set up a viral marketing contacts-importer and I keep coming up with a couple PHP errors.

You can see the page in question at:
http://1dollar1day.org/import/index.php

Feel free to try it yourself to see what I'm talking about, but when I enter my information for contacts to be imported, I get these errors:

Warning: require() [function.require]: URL file-access is disabled in the server configuration in /home/a9272438/public_html/import/importer.php on line 55


Warning: require(http://1dollar1day.org/import/import...MyPasswordHere) [function.require]: failed to open stream: no suitable wrapper could be found in /home/a9272438/public_html/import/importer.php on line 55
*actual "myEmailHere" & password removed for obvious reasons.


Fatal error: require() [function.require]: Failed opening required 'http://1dollar1day.org/import/importer/gmail.php?username=hammy123&password=!roym!qvla1y' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a9272438/public_html/import/importer.php on line 55

NOTE: Line 55 is relative to the GMAIL importing option, that number will vary depending on the email option selected. Regardless, the coding is the same for each email importing process.

Below is the importer.php code. Line 55 has been bolded red for easy finding.
Code:
<?php
include("include/session.php");
define("WEB_URL",get_web_root_url());
  
if (isset($_GET['type']))
{
    $type = $_GET['type'];
}
if (isset($_GET['username']))
{
    $username = $_GET['username'];
}

if (isset($_GET['password']))
{
    $password = $_GET['password'];
}


?>
<form name='arrayForm' id='arrayForm' method='post' action='sendemail.php'>
<table border="0" width="80%" cellpadding="0" style="border-collapse: collapse" height="105" id="table1">
  <tr> 
    <td height="25" colspan="2" bgcolor="#000000"> <p align="center" class="white"><font color="#FFFFFF"><b> 
        send email to your friends</b></font></p>
      
    </td>
    <td bgcolor="#000000" height="25"><div align="right"><A href="#send"><p align="right" class="white">send</p></a></div></td>
  </tr>
  <tr> 
    <td bgcolor="#Ffffff" height="1" colspan="3"></td>
  </tr>
  <tr> 
    <td width="25%" bgcolor="#F3F3F3" height="25"> <p align="left" class="Black"><input type=checkbox name=all1  id=all1 value=1 onclick=checkMessages(this)><b>Select/DeSelect All</b></p></td>
    <td width="40%" bgcolor="#F3F3F3"><p align="center" class="Black"><b>Email Address</b></p></td>
    <td width="35%" bgcolor="#F3F3F3" height="12" class="Black"><p align="center" class="Black"><b>Name</b></p></td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF" height="1" colspan="3"></td>
  </tr>
     <?php
      switch($type):
    case 'yahoo':
        ?>
        <?php require(WEB_URL."importer/yahoo.php?username=".$username."&password=".$password); ?>
        <?php
    break;
    case 'hotmail':
        ?>
        <?php require(WEB_URL."importer/hotmail.php?username=".$username."&password=".$password); ?>
        <?php
    break;
    case 'gmail':
        ?>
         <?php require(WEB_URL."importer/gmail.php?username=".$username."&password=".$password); ?> 
        <?php
        
    break;
    case 'aol':
        ?>
        <?php require(WEB_URL."importer/aol.php?username=".$username."&password=".$password); ?> 
        <?php
        
    break;
    case 'msn':
        ?>
        <?php require(WEB_URL."importer/msn.php?username=".$username."&password=".$password); ?> 
        <?php
        
    break;
    endswitch;
   ?>
  <tr> 
    <td width="211" bgcolor="#F3F3F3" height="25"> <p align="left" class="Black"><input type=checkbox name=all2  id=all2 value=1 onclick=checkMessages(this)><b>Select/DeSelect All</b></p></td>
    <td width="207" bgcolor="#F3F3F3">&nbsp;</td>
    <td width="368" bgcolor="#F3F3F3" height="12" class="Black">&nbsp; </td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF" height="1" colspan="3"></td>
  </tr>
  <tr> 
    <td width="211" bgcolor="#F3F3F3" height="25"> <p align="left" class="Black">Subject</p></td>
    <td width="207" bgcolor="#F3F3F3" colspan="2"><input type="text" name="subject" id="subject" value="" size="50"></td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF" height="1" colspan="3"></td>
  </tr>
  <tr> 
    <td width="211" bgcolor="#F3F3F3" height="25" valign="top"> <p align="left" class="Black">
    Email Body
    </p></td>
    <td width="207" bgcolor="#F3F3F3" colspan="2">
    <textarea name="emailbody" id="emailbody" cols="50" rows="15"></textarea>
    </td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF" height="1" colspan="3"></td>
  </tr>
  <tr bgcolor="#F3F3F3"> 
    <td height="25" colspan="3"> <p align="center"> 
        <input type='button' name='bsendemail' value='Send Email' onclick='javascript:sendemail();'>
        &nbsp; 
        <input name="Submit2" type="reset" id="Submit2" value="Reset">
        <a name="send"></a>
    </td>
  </tr>
</table>
</form>


<?php
  function show() {
    return "";
  } 
  // server side function call
  include_once("include/agent.php");
?>
Thanks in advance for any help,
Good day!

- Jason

Last edited by mmangoezz; 01-29-2010 at 10:56 AM..
mmangoezz is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-30-2010, 01:39 AM Re: file-access disabled/no suitable wrapper on line __ error
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
And what is the reason to require an url instead of a file on local filesystem?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 01-31-2010, 04:21 PM Re: file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
I don't know; I didn't write the code. If there's an alternate way to do it than I am open to suggestions....I just want it to work.

Thanks for your reply
mmangoezz is offline
Reply With Quote
View Public Profile
 
Old 01-31-2010, 06:40 PM Re: file-access disabled/no suitable wrapper on line __ error
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Simply replace the url with the local file, and it should run.
So, (a wild guess, but) replace
PHP Code:
<?php require(WEB_URL."importer/gmail.php?username=".$username."&password=".$password); ?>
with
PHP Code:
<?php require($_SERVER['DOCUMENT_ROOT']."/importer/gmail.php?username=".$username."&password=".$password); ?>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-03-2010, 10:04 PM Re: file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
Hey thanks for the reply,

What about that was a wild guess?
mmangoezz is offline
Reply With Quote
View Public Profile
 
Old 02-04-2010, 02:08 AM Re: file-access disabled/no suitable wrapper on line __ error
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
What about that was a wild guess?
The correct path :-)
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-04-2010, 11:49 PM Re: file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
My server does not allow me to use DOCUMENT_ROOT because it's, well, it's silly.

Is there a way I can address the local file without the document root script?
mmangoezz is offline
Reply With Quote
View Public Profile
 
Old 02-05-2010, 02:31 AM Re: file-access disabled/no suitable wrapper on line __ error
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Then you need to know where on the file system the files are located.
The DOCUMENT_ROOT variable is populated by apache, and reflect the configuration of the virtual host.
If your hoster don't use apache, then you probably won't have that information.

So, given that the files are located at /var/www/yoursite/htdocs, you should use:
PHP Code:
<?php require("/var/www/yoursite/htdocs/importer/gmail.php?username=".$username."&password=".$password); ?>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-05-2010, 03:38 AM Re: file-access disabled/no suitable wrapper on line __ error
Junior Talker

Posts: 1
Name: Henry
Trades: 0
I think your document root is
/home/a9272438/public_html
(maybe)
Requnix is offline
Reply With Quote
View Public Profile
 
Old 02-05-2010, 04:39 AM Re: file-access disabled/no suitable wrapper on line __ error
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
I think your document root is
/home/a9272438/public_html
Good call.
I didn't checked back the beginning of the thread.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-06-2010, 07:49 PM Re: file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
I'm getting errors like this:
Warning: require(/import/importer/yahoo.php?username=notrealkjnk&password=notreal) [function.require]: failed to open stream: No such file or directory in /home/a9272438/public_html/import/importer.php on line 45

Does this mean it is trying to address the file at /home/a9272438/public_html/import/importer.php/import/importer/yahoo.php?username=noreal&password=notreal

Please go to:
http://1dollar1day.org/import/index.php

Try the different email importers, each one has a different coding/file location yet none of them seem to work and some have different errors.

Note: You don't have to enter real emails or passwords. Something like 3254jl@gmail.com password:kjhwkj would still get the script submitted.

Note:
My server DOES work through apache.

Note: The file address for gmail is E.G. - /public_html/import/importer/gmail.php

Here is the current coding for the different importers:
PHP Code:
   <?php
      
switch($type):
    case 
'yahoo':
        
?>
        <?php require("/import/importer/yahoo.php?username=".$username."&password=".$password); ?>
        <?php
    
break;
    case 
'hotmail':
        
?>
        <?php require("/home/a9272438/public_html/import/importer/hotmail.php?username=".$username."&password=".$password); ?>
        <?php
    
break;
    case 
'gmail':
        
?>
        <?php require("/usr/local/apache/htdocs/home/a9272438/public_html/import/importer/gmail.php?username=".$username."&password=".$password); ?> 
        <?php
        
    
break;
    case 
'aol':
        
?>
        <?php require($_SERVER['DOCUMENT_ROOT']."/import/importer/aol.php?username=".$username."&password=".$password); ?> 
        <?php
        
    
break;
    case 
'msn':
        
?>
        <?php require($_SERVER['DOCUMENT_ROOT']."importer/msn.php?username=".$username."&password=".$password); ?> 
        <?php
        
    
break;
    endswitch;
   
?>
Thanks to all of you for helping!
mmangoezz is offline
Reply With Quote
View Public Profile
 
Old 02-07-2010, 05:06 AM Re: file-access disabled/no suitable wrapper on line __ error
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
As already pointed out above, your root seems to be /home/a9272438/public_html
So your imports should say
PHP Code:
require("/home/a9272438/public_html/import/importer/yahoo.php?username=".$username."&password=".$password); 
as it already does for the import of hotmail.php
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.

Last edited by lizciz; 02-07-2010 at 05:07 AM..
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 02-07-2010, 12:41 PM Re: file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
But hotmail.php still doesn't work.
mmangoezz is offline
Reply With Quote
View Public Profile
 
Old 02-12-2010, 07:26 PM Re: file-access disabled/no suitable wrapper on line __ error
Novice Talker

Posts: 14
Trades: 0
BumpBumpBump
mmangoezz is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to file-access disabled/no suitable wrapper on line __ error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37699 seconds with 12 queries