4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 GuestBook
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
precious
WebHelper
WebHelper


Joined: 06 Apr 2002
Posts: 65

PostPosted: Thu Nov 07, 2002 1:45 am (15 years, 1 month ago) Reply with QuoteBack to Top

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.
OfflineView User's ProfileFind all posts by preciousSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Thu Nov 07, 2002 7:13 am (15 years, 1 month ago) Reply with QuoteBack to Top

Yes, it probably does. If the proxy2.de website doesn't explain what to do, then I would replace copy() with move_uploaded_file().

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
precious
WebHelper
WebHelper


Joined: 06 Apr 2002
Posts: 65

PostPosted: Thu Nov 07, 2002 9:17 am (15 years, 1 month ago) Reply with QuoteBack to Top

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.
OfflineView User's ProfileFind all posts by preciousSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Thu Nov 07, 2002 5:18 pm (15 years, 1 month ago) Reply with QuoteBack to Top

That code doesn't really tell me anything Sad

Are the files actually on the server? Are they just not showing up?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Nov 07, 2002 5:32 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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?
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
precious
WebHelper
WebHelper


Joined: 06 Apr 2002
Posts: 65

PostPosted: Fri Nov 08, 2002 3:01 am (15 years, 1 month ago) Reply with QuoteBack to Top

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?
OfflineView User's ProfileFind all posts by preciousSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Nov 08, 2002 11:26 am (15 years, 1 month ago) Reply with QuoteBack to Top

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
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Nov 08, 2002 4:37 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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 Confused)

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
precious
WebHelper
WebHelper


Joined: 06 Apr 2002
Posts: 65

PostPosted: Fri Nov 08, 2002 5:00 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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.
OfflineView User's ProfileFind all posts by preciousSend Personal Message
precious
WebHelper
WebHelper


Joined: 06 Apr 2002
Posts: 65

PostPosted: Fri Nov 08, 2002 5:14 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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.
OfflineView User's ProfileFind all posts by preciousSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Nov 08, 2002 5:44 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Nov 08, 2002 6:22 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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.
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Nov 08, 2002 6:23 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Nov 08, 2002 6:26 pm (15 years, 1 month ago) Reply with QuoteBack to Top

Justin, if you know of any other way to secure PHP, I'm all ears.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Fri Nov 08, 2002 6:49 pm (15 years, 1 month ago) Reply with QuoteBack to Top

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........
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   


Go to page Previous  1, 2, 3, 4, 5  Next

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.067926 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme