Author |
Message |
precious
WebHelper

Joined: 06 Apr 2002
Posts: 65
|
Posted:
Thu Nov 07, 2002 1:45 am (22 years, 5 months ago) |
  |
I have double checked and verified that I had already done the 777 CHMOD on the Public Directory. What could be the problem?
Could it be again the issue of "That is because the safe mode is turned on. Just use move_uploaded_file() instead of copy()" that was discussed with Daniel at http://www.4webhelp.net/forums/viewtopic.php?t=1116 - File Upload Error Msg?
Guys, pls advise on the next troubleshooting step. |
|
|
    |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Nov 07, 2002 7:13 am (22 years, 5 months ago) |
  |
Yes, it probably does. If the proxy2.de website doesn't explain what to do, then I would replace copy() with move_uploaded_file(). |
________________________________
 |
|
    |
 |
precious
WebHelper

Joined: 06 Apr 2002
Posts: 65
|
Posted:
Thu Nov 07, 2002 9:17 am (22 years, 5 months ago) |
  |
I have searched through some of the php files but none has the copy() function.
The below is the entire code I extracted from user_pic.php which resides in the template folder:
<a href="javascript:gb_picture('$row[p_filename]',$row[width],$row[height])"><img src="$GB_PG[base_url]/$GB_UPLOAD/$row[p_filename]" align="left" border="0" $new_img_size[2]></a>
Daniel, are you able to decipher and troubleshoot from here from looking at these codes? Perhaps Justin is able to help as he has successfully setup this script. |
|
|
    |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Nov 07, 2002 5:18 pm (22 years, 5 months ago) |
  |
That code doesn't really tell me anything
Are the files actually on the server? Are they just not showing up? |
________________________________
 |
|
    |
 |
Justin
4WebHelp Addict

Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Thu Nov 07, 2002 5:32 pm (22 years, 5 months ago) |
  |
precious wrote: | I have searched through some of the php files but none has the copy() function.
The below is the entire code I extracted from user_pic.php which resides in the template folder:
<a href="javascript:gb_picture('$row[p_filename]',$row[width],$row[height])"><img src="$GB_PG[base_url]/$GB_UPLOAD/$row[p_filename]" align="left" border="0" $new_img_size[2]></a>
Daniel, are you able to decipher and troubleshoot from here from looking at these codes? Perhaps Justin is able to help as he has successfully setup this script. |
Hiya,
I've tried this, and it works fine for me straight out of the zip file after setting up config.php and running the install script, I've never tried it on a server which has safe mode on, so I don't know if that is causing the problems, perhaps you should post in the support forum at their site? |
|
|
     |
 |
precious
WebHelper

Joined: 06 Apr 2002
Posts: 65
|
Posted:
Fri Nov 08, 2002 3:01 am (22 years, 5 months ago) |
  |
Daniel, care to try your recommended Advanced Guestbook on 34SP and see if the picture upload works?
Also, how do I add more URLs to the drop down box at index.php. Currently there is only the Guestbook inside the dropdown box.
Still waiting for a response on my earlier response:
How do I add SSI code to php page? Reason: I want to add some SSI codes to index.php but I have to rename it to shtml in order to it to work. Anyone care to enlighten me on this? |
|
|
    |
 |
Justin
4WebHelp Addict

Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Fri Nov 08, 2002 11:26 am (22 years, 5 months ago) |
  |
precious wrote: | Daniel, care to try your recommended Advanced Guestbook on 34SP and see if the picture upload works?
Also, how do I add more URLs to the drop down box at index.php. Currently there is only the Guestbook inside the dropdown box. |
Quote: |
This will contain the entry numbers, when you have more than 10 entrys, eg 1-10 11-20 etc. |
Quote: | Still waiting for a response on my earlier response:
How do I add SSI code to php page? Reason: I want to add some SSI codes to index.php but I have to rename it to shtml in order to it to work. Anyone care to enlighten me on this? |
Just use the header and footer templates |
|
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 08, 2002 4:37 pm (22 years, 5 months ago) |
  |
This is just a wild guess, but I don't know which directory you've chmoded to 777. If you don't already have one, create a directory called "tmp" and chmod it to 777. (No clue if it works; someone suggested that on the proxy2.de forums ) |
________________________________
 |
|
    |
 |
precious
WebHelper

Joined: 06 Apr 2002
Posts: 65
|
Posted:
Fri Nov 08, 2002 5:00 pm (22 years, 5 months ago) |
  |
Daniel, could you care to try your recommended script on the 34SP as it will be faster to resolve the upload issue this way. Justin or any other experts using 34SP host are also welcome to give feedbacks to resolve this sticky issue. TIA. |
|
|
    |
 |
precious
WebHelper

Joined: 06 Apr 2002
Posts: 65
|
Posted:
Fri Nov 08, 2002 5:14 pm (22 years, 5 months ago) |
  |
I have already set the tmp to 777 as indicated in the readme file, but upload issue still persist. OK Daniel, the below technical response may help you as I this is the response from 34SP support I just received. I'm gonna to sleep now...perhaps I can get a solution from you comes the next day. Here goes the 34 SP support response:
Sir/Madam,
>
> Is the safe mode feature "turn on" at 34 SP as I have had issues
> uploading
> pictures on the advanced Guestbook on my site.
Yes php is run in safemode on the servers - it is the only safe way to
allow php in a shared enviroment.
> I have some discussion
> at
> http://www.4webhelp.net/forums/viewtopic.php?p=7161#7161
>
> <part of the post>
>
> I have searched through some of the php files but none has the copy()
> function.
>
The file that is possibly causing problems is /lib/add.class.php
There are lots of copy (...,...) commands in there as well as some
exec() commands, neither of which will work, the copy commands should be
changeable to a simple move_uploaded_file
The
exec("cp ".$this->userfile["userfile"]["tmp_name"]."
$this->include_path/$GB_TMP/img-$the_time.tmp");
may work if changed to
move_uploaded_file($this->userfile['userfile']['tmp_name'],
"$this->include_path/$GB_TMP/img-$the_time.tmp");
This is by no means guaranteed however.
> The below is the entire code I extracted from user_pic.php which
> resides in
> the template folder:
>
> <a
>
href="javascript:gb_picture('$row[p_filename]',$row[width],$row[height])"><img
> src="$GB_PG[base_url]/$GB_UPLOAD/$row[p_filename]" align="left"
> border="0"
> $new_img_size[2]></a>
> <end of part of the post>
>
This is just code to display the picture i would say.
I think you need to go through the add.class.php as i think this is
probably where most of the problems lie. |
|
|
    |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 08, 2002 5:44 pm (22 years, 5 months ago) |
  |
OK, found the problem. First of all, make sure tmp and public are chmoded to 777.
Then email help@34SP.com asking for the "/tmp" directory to be added to the open_basedir option. It should then work.
If it doesn't, then I'll email you my add.class.php file which has all the required changes (the ones mentioned in the 34SP email). |
________________________________
 |
|
    |
 |
Justin
4WebHelp Addict

Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Fri Nov 08, 2002 6:22 pm (22 years, 5 months ago) |
  |
precious wrote: |
Yes php is run in safemode on the servers - it is the only safe way to allow php in a shared enviroment. |
Do 34SP Call themselves webhosts? That statement just shows how incompetent they are, whoever wrote that ought to be ashamed of themselves. |
|
|
     |
 |
Justin
4WebHelp Addict

Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Fri Nov 08, 2002 6:23 pm (22 years, 5 months ago) |
  |
precious wrote: | Daniel, could you care to try your recommended script on the 34SP as it will be faster to resolve the upload issue this way. Justin or any other experts using 34SP host are also welcome to give feedbacks to resolve this sticky issue. TIA. |
I don't use 34SP, because :
1) I don't Like Plesk
2) I prefer My hosts to know what they're talking about.
3) I don't like Safe Mode being on! |
|
|
     |
 |
Daniel
Team Member


Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Nov 08, 2002 6:26 pm (22 years, 5 months ago) |
  |
Justin, if you know of any other way to secure PHP, I'm all ears. |
________________________________
 |
|
    |
 |
Justin
4WebHelp Addict

Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Fri Nov 08, 2002 6:49 pm (22 years, 5 months ago) |
  |
Daniel wrote: | Justin, if you know of any other way to secure PHP, I'm all ears. |
I know, but answer me this question, why is it only the really cheap hosts that use safe mode? Why do all the bigger ones not use it........ |
|
|
     |
 |
|