Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 05:36
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash Ecards (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  Is it possible to run the Ecards on a shared hosting server?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 Print
Author Topic: Is it possible to run the Ecards on a shared hosting server?  (Read 10577 times)
allhop
Server what's that
*
Posts: 21


View Profile
« on: 10/23/07, 14:39 »

My client's host is a shared hosting Apache server that runs PHPSuExec. The highest permissions allowed are 755. Is there a way to run the PHP script since it will not allow other users to "write" to the dBText file?

I've contacted my client's webhost and the only help I get is that I should hire a web developer.

I do know that the Ecards work since I've tested them on my personal webhost. They only work when the folder permissions are set to 777. I've spent so many days trying to figure this out and am getting nowhere.  Huh
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 10/23/07, 16:10 »

Use a simple PHP to create the folder:

<?php
  mkdir("folder", 0755);
?>

Put the script in the folder where this new folder should hang. Since PHP thread is the owner, permisson will work

Jorge
Logged

allhop
Server what's that
*
Posts: 21


View Profile
« Reply #2 on: 10/23/07, 18:40 »

Thank you very much for the advice. I'm a little new to this PHP scripting. Would you mind dumbing down your instructions?
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #3 on: 10/24/07, 07:46 »

Try 733

http://www.flash-db.com/Board/index.php?topic=17919.0

Jorge
Logged

allhop
Server what's that
*
Posts: 21


View Profile
« Reply #4 on: 10/24/07, 11:40 »

I changed the permissions to 733 with no success.

In an earlier post you recommended that I create a folder using PHP:

Use a simple PHP to create the folder:

<?php
  mkdir("folder", 0755);
?>

Put the script in the folder where this new folder should hang. Since PHP thread is the owner, permisson will work

Jorge


Are these the steps you would use to create the above scenario?
1. Create new PHP file (using Dreamweaver)
2. Copy and paste in code:
<?php
  mkdir("folder", 0755);
?>

3. Change "folder" in the code line, mkdir("folder", 0755); to "dBText"?
4. Copy this PHP script to the Ecards directory.

Would you please correct any of these steps if I'm headed in the wrong direction? I would REALLY appreciate your help. Thank you very much for your help so far!!
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #5 on: 10/24/07, 12:33 »

Yep, that's the idea

Jorge
Logged

allhop
Server what's that
*
Posts: 21


View Profile
« Reply #6 on: 10/24/07, 12:44 »

Okay. I tried this and it did not create the directory "dBText":

1. Made a new file called "CreateFolder.php"
2. Posted this code into it:
<?php
  mkdir("dBText", 0755);
?>
3. Saved the file and copied it into the Ecards directory.
4. Assigned it 755 permissions.

Did I make any mistakes?

Thanks again,
Angela
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #7 on: 10/24/07, 13:29 »

5. Open your browser and go to http://www.yoursite.com/CreateFolder.php

Jorge
Logged

allhop
Server what's that
*
Posts: 21


View Profile
« Reply #8 on: 10/24/07, 13:54 »

Okay, I did that and the browser window is blank. What next?

Thanks,
Angela
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #9 on: 10/24/07, 14:13 »

Check if the folder was created

Jorge
Logged

allhop
Server what's that
*
Posts: 21


View Profile
« Reply #10 on: 10/24/07, 14:32 »

Yes, it created a folder.

Do I need to add something to my SendEcard.php file or Flash files to make this work?

Thank you,
Angela
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #11 on: 10/24/07, 16:04 »

Now test it again

Jorge
Logged

allhop
Server what's that
*
Posts: 21


View Profile
« Reply #12 on: 10/24/07, 16:12 »

It still won't write a .txt file to the dBText directory. I checked the dBText directory and it has 755 permissions. Do you have any other ideas on what I should try?

Thank you,
Angela
Logged
allhop
Server what's that
*
Posts: 21


View Profile
« Reply #13 on: 10/24/07, 18:16 »

Hello,

My webhost keeps telling me that the script has errors. Here is a quote from the webhost:

Hello,

I revised your issue and checked the error log section in your cPanel, where I found the following message:

[Wed Oct 24 16:57:23 2007] [error] [client 85.14.22.50] script not found or unable to stat: /home/pinkyand/public_html/SendEcard.php

Then, in order to resolve the issue, I copied the SendEcard.php script into your public_html and tested your ecards.htm page again with no luck.

Then I revised the error_log file, which is located in your public_html directory and noticed the following lines:

pinkyand@pinkyandpeanut.com [~/public_html]# cat error_log
[24-Oct-2007 17:13:06] PHP Warning: fopen(./dBText/1193263986.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in /home/pinkyand/public_html/SendEcard.php on line 10

[24-Oct-2007 17:13:06] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/pinkyand/public_html/SendEcard.php on line 10

[24-Oct-2007 17:13:06] PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/pinkyand/public_html/SendEcard.php on line 10

As you can see from the above lines, it is indeed your script, which is not configured properly. That is why, as my colleague already suggested, you should correct your script's code or better - contact a professional developer for further assistance.

Best Regards,

Niko
Support Team
SiteGround.com


I'm rather frustrated since my code works on my other webhost.
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #14 on: 10/25/07, 04:17 »

Did you delete the folder previous to run the PHP script? If not it fails. Delete and rerun

<?php
if(mkdir("folder", 0777)) echo "Folder created";
else echo "Fails on creating folder";
?>

Jorge
Logged

Pages: [1] 2 3 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!