cancel
Showing results for 
Search instead for 
Did you mean: 

CGI Space changes ...

Chris3005
Grafter
Posts: 33
Registered: ‎14-10-2007

Re: CGI Space changes ...

Quote
There is a script that should fix that for you, but at this stage, I'd just wait for the migration.
Gabe

Thanks, Gabe. I've tried your script (3 reasons - wanting to learn, wanting something that works before the move and because my phpBB isn't new, it's moved from elsewhere and I'd like to restore it fully).
I ran the script, it duly created php.ini, symlinks and /tmp (the second of your magic scripts I've used, thanks you) but in my ACP, php information still showed upload_tmp_dir as not set, and I was still unable to upload. Looking in the php.ini, the line for upload_tmp_dir was commented out, so I changed that and pointed to /tmp - and php information then showed it to be set to that, but still no upload.
Noting that /tmp is the default and it may be full (although I'm confused how /tmp in my root can be full?) I also created phpBB3/tmp and pointed to that, but no joy.
Maybe I have the wrong permissions on the tmp folder - or perhaps, the permissions it need to be written to by a board user are incompatible with those enforced by suEXEC?
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: CGI Space changes ...

When you checked the value of upload_tmp_dir in the php.ini created by Gabe's script did you check the value of the setting around line 562 or at the bottom of the file? The earlier one is the current unset default but the one at the bottom of the file overrides that and should be the full path to the newly created /tmp located in your own webspace.
If you run phpinfo() in a .php script this should show the loaded configuration file (a few lines from the top) is yours and upload_tmp_dir (in the PHP Core section) is your own /tmp.
BTW did you remove those ini_set hacks from config.php and index.php?
David
Edit: correct text where I meant to put phpinfo.
David
decomplexity
Rising Star
Posts: 493
Thanks: 26
Registered: ‎30-07-2007

Re: CGI Space changes ...

Five years ago, after strong hints from Ian Wild that CCGI was to be closed down, I moved almost all the active server pages of my various websites from CCGI to the (free) PAYH "preview" service which was offered as a replacement.
(For those who were not around a the time, this was a restricted version of full PAYH.)
After a workaround battle with Safe Mode (which upset several PHP-based packages), the need for additional Permissions relaxations (often 644 to 666), Magic Quotes and so on, the websites which my business depended upon worked.
Since CCGI is now finally to be be moved to a white-labeller, PLEASE PLEASE could PN provide some ADVANCE visibility about the future of:
- Preview accounts
- 'home pages' (i.e. non-active)  website space
- email
Q's that come to mind:
Will hosting of the DNS associated with  the moved websites also be moved (to allow changes to be made via the new hoster's control panel) ?
What about email submitted from e.g. PHP in the new environment? It will presumably have a non-PN IP address so will be subject a more restrictive 'number of addressees'  limit
Zen from May 17. PN Business account from 2004 - 2017
starfry
Rising Star
Posts: 290
Thanks: 20
Fixes: 2
Registered: ‎14-09-2007

Re: CGI Space changes ...

Will we get SSH access back?
Chris3005
Grafter
Posts: 33
Registered: ‎14-10-2007

Re: CGI Space changes ...

Quote from: spraxyt
When you checked the value of upload_tmp_dir in the php.ini created by Gabe's script did you check the value of the setting around line 562 or at the bottom of the file? The earlier one is the current unset default but the one at the bottom of the file overrides that and should be the full path to the newly created /tmp located in your own webspace.

Thanks David. I was looking at the one at line 562. I had searched for occurrences of tmp; I did find one at the bottom of the file but it was soap.wsdl_cache_dir="/tmp", upload_tmp_dir  - that's my ignorance of php, I didn't think soap or wsdl would be used in uploading an avatar. It makes no difference whether I comment it out or not.
Quote
If you run a phpini.php script this should show the loaded configuration file (a few lines from the top) is yours and upload_tmp_dir (in the PHP Core section) is your own /tmp.

OK, I didn't know about phpinfo, I do now, thanks, and I see it's what the ACP on phpBB was using to report the setting.
Quote
BTW did you remove those ini_set hacks from config.php and index.php?

I didn't  Embarrassed  but I have now, thanks.
So, with the ini-set hacks removed, and phpinfo confirming where upload_tmp_dir is set to, I still get the error, whether I set to /tmp or /phpBB3/tmp 
I have made sure I used ascii for my ftp transfers, the tmp folder permission is set to 710 and I've verified that I can read a file in the folder from my browser.
When trying (as a board user) to upload a file, such as a small jpg as an avatar, or an attachment to a post, I still get the error:
Quote
Temporary folder could not be found. Please check your PHP installation.
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: CGI Space changes ...

Quote from: Chris3005
I still get the error

Apologies, I should have checked this to begin with, as hominid had flagged it up earlier. I'm also getting the upload error in Wordpress, also in SMF, but not in Dokuwiki or a script of my own. Not immediately clear what's causing the glitch. The database is still talking. I guess the migration team has switched something. Probably missing the obvious. Not an ideal time to debug. Urrgh.
Gabe
Chris3005
Grafter
Posts: 33
Registered: ‎14-10-2007

Re: CGI Space changes ...

Thanks, Gabe. I originally started a new thread with my question and it was merged into this by a mod; I think hominid's post was the reason. I will leave it for now as it looks more like a Plusnet configuration issue than just my inexperience. But I've learned a bit from chasing it  Smiley
Chris
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: CGI Space changes ...

Note I'm working on the Force9 ccgi server which might behave differently from the Plusnet one.
I created an upload form and test script to check out file uploading and had no problems either using the standard php.ini or with Gabe's 'own-webspace' version.
With the standard php.ini the uploaded file goes temporarily into /tmp
With the own-webspace version it goes into the upload_tmp_dir defined in that php.ini
Upload (using my own form and script) also works on the new server. It uses a designated upload_tmp_dir on there.
David
David
Chris3005
Grafter
Posts: 33
Registered: ‎14-10-2007

Re: CGI Space changes ...

David, if you are able to post your upload form and test script, or PM them to me, I would like to try them on the Plusnet ccgi server.
Unfortunately I don't (yet?) have the skills to write some for myself.
Chris
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: CGI Space changes ...

Found part of the reason for the errors I was seeing. I'd rerun the phpini script to test. Unfortunately, for reasons that currently escape me but are probably obvious, cat seems to have stopped playing, so no values were appended, leaving the default ini, which points to /tmp, and /tmp currently seems to have over 100,000 files in it, so it's not surprising that the garbage collector is falling over. As a messy fix:
#!/bin/bash
echo "Content-type: text/html"
echo
mkdir tmp && chmod 710 tmp
cp /etc/php5/cgi/php.ini ~ && chmod 600 php.ini
if [ -e php.ini ]
then
echo "
; Override section
display_errors = Off
expose_php = Off
register_globals = Off
upload_tmp_dir = $(pwd)/tmp
session.save_path = $(pwd)/tmp
session.use_only_cookies = 1
session.gc_probability = 1" >> php.ini
for file in $(find . -mindepth 1 -type d -print0 | xargs -0)
do
[[ $(ls "$file") =~ \.php ]] && ln -s "$(pwd)/php.ini" "$file/php.ini" && echo "$file/php.ini<br>"
done
fi

Sorry, that's properly bad coding but quick to type. It fixes the upload problems I was seeing, at least. Apologies for rushing - Christmas.
Gabe
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: CGI Space changes ...

To add to my previous post - again note I'm using the Force9 ccgi server:
Uploading an avatar to images/avatars/upload using phpBB3 version 3.0.5 works OK for me (using the default php.ini). The uploaded avatar displays with my posts.
File permissions for those directories are 0710 and that for the uploaded image file is 0600.
I assume this means the Force9 server /tmp is not full.
Avatar uploading and display also works on the new server where I have phpBB3 version 3.0.12.
David
David
badbetty
Grafter
Posts: 31
Registered: ‎25-09-2008

CGI space changes... improvements/inclusions and more q's im sure

the email received on the above topic indicates a much more enthusiastic view of cgi  for the future.... i do hope so
if there is a dedicated topic for questions etc, i haven't seen it, so im just banging it in here.

it may become more clear about what server modules are available, but i would hope the full suite of XML XSL XSLT modules will be available (ive posted before on this and i got a muted response on updating modules to deliver this).....    so i live in hope.....maybe this can be confirmed at some point, or 'arranged' if needs be  🙂
Merry Christmas everyone and best wishes for the new year
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: CGI space changes... improvements/inclusions and more q's im sure

XSL	enabled
libxslt Version 1.1.26
libxslt compiled against libxml Version 2.7.7
EXSLT enabled
libexslt Version 1.1.26

Smiley
Gabe
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: CGI space changes... improvements/inclusions and more q's im sure

Yes XSLT is available and it works too (on a test I cobbled together).  I'd planned to post in the original thread in due course.
Questions on the migrated service can go in the stickied post at the top of this forum.
David
David
badbetty
Grafter
Posts: 31
Registered: ‎25-09-2008

Re: CGI space changes... improvements/inclusions and more q's im sure

wow - thanks for the info folks  🙂      🙂
ps:  how did you do the test ?    can i start to hack around too yet ?