PDA

View Full Version : phpAdsNew help!


js
05-14-2001, 10:49 PM
Maybe someone can help me...

I cannot get phpAdsNew to work. The installation went ok but from the admin page I am unable to get any banners up. They just show up as a broken file. I am able to upload the file into MySql but it still doesn't show up. One can upload into MySql, onto the local webserver, via a external URL or with plain html. The only time a banner appears is when I link via an external URL, but the banner does not show up on my html page.

On my html page I have included the phpadsnew.inc.php file in the header, and where I want the banner to appear I used the "view" function as per the instructions.

I suspect that somewhere my settings are incorrect but can't see it. I have installed phpAdsNew in the WWW directory and all settings in the config file reflect that.

Any ideas???!!

Thanks.

js
05-14-2001, 11:31 PM
mmmm....I seem to be running into some errors according to my cgi-logs. I get the following:

[14-May-2001 12:17:29] PHP Warning:[nbsp][nbsp]SAFE MODE Restriction in effect.[nbsp][nbsp]The script whose uid is 46553 is not allowed to access /big/dom/tmp/phpIcwgcr owned by uid 98 in /big/dom/xsnoooz/www/phpAdsNew/admin/banner-edit.php on line 101
[14-May-2001 12:17:29] PHP Warning:[nbsp][nbsp]fopen("/big/dom/tmp/phpIcwgcr","rb") - Success in /big/dom/xsnoooz/www/phpAdsNew/admin/banner-edit.php on line 101
[14-May-2001 12:17:29] PHP Warning:[nbsp][nbsp]Supplied argument is not a valid File-Handle resource in /big/dom/xsnoooz/www/phpAdsNew/admin/banner-edit.php on line 101

Any ideas on what to do???

Terra
05-14-2001, 11:40 PM
The software author needs to update his script and use:
move_uploaded_file()

if that function exists...
http://www.php.net/manual/en/function.move-uploaded-file.php

This was specifically designed for dealing with file uploads while running in a safe_mode environment...

Read this post for a wider discussion on the topic:
http://www.aota.net/ubb/Forum15/HTML/000671-1.html

--
Terra
--Without safe_mode, it would turn into anarchy--
FutureQuest

js
05-15-2001, 12:00 AM
Here is the offending line quoted earlier (line 101 in the error logs):

}
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]$final["banner"] = addslashes(fread(fopen($mysql_banner, "rb"), filesize($mysql_banner)));
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]}

So, should I change this? I'm new to PHP so I don't want to screw up.....I'm also wondering if I am supposed to change anything else in this script....I know others on FQ are using phpAdsNew....

Terra
05-15-2001, 12:19 AM
As stated, if you are not comfortable with the required changes - see if the software author will make the necessary updates and release it...

Since he has the talent to write it - he should have the talent to update it as well...

--
Terra
sysAdmin
FutureQuest