HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED] Unable to login after install/Upload limit Issue

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#71670 (In Topic #15076)
Avatar

Fan in action

Hi forum,

I joined this forum because I am in dire need for help.

Today I decided to implement ocPortal on my website and I initially installed it through simplescripts.

The installation went just fine I logged in ok and started testing and adjusting the portal to my needs while I was at work. I was accessing the website through FF 3.x on a WinXP SP3.

Then, at the end of my shift I left everything as it was and went home where I would continue working on it.
However when I tried to log in using the same address I was using at work I got this message

"You have gone to an URL which requires ‘posted’ data to be sent (login_username), as well as the information in the URL itself. This is most likely because you have copied and pasted a link to a new browser window, but the page the link was for was a results page for an action."

I'm pretty sure the veterans here are familiar with that error.
This was on a Mac OS X on both Safari and FF 4 and I also tested on an iDevice using Safari. Same thing.

So initially I thought I must have messed something up at work and then did a complete uninstall and reinstall through simplescripts. Everything went fine during install but once again I was getting the same error.

I finally came here and started to search through the topics and I found this thread

http://ocportal.com/forum/topicview/misc/deploying/help_after_inital.htm?keep_session=630582429#post_30910

But unfortunately it lead me to a dead end since the other thread referenced on that topic is gone.

I kept searching and found this one which gave me a few clues:

http://ocportal.com/forum/topicview/misc/deploying/localhost_works_fine.htm?keep_session=630582429#post_29699

I checked the base_url in the info.php per Chris Graham's suggestion and the url was already configured the way it was supposed to be

http://website.org/ocportal

This is the exact same url I specified during the installation.

Then I went and did the test.php that Chris suggested however I'm not quite sure what I should expect.
I typed stuff in the text box and clicked test and nothing happened and on top of the box it says "array"

I don't see the text that I type anywhere after clicking test. So I went ahead and changed the action to a url per Chris' instructions and when I type stuff and click test it redirects to the page with no problems but the text I entered in the textbox shows nowhere.

I checked for redirects for my website from my host and although I do have the ability to create redirects there;s currently none set up. I'm almost positive that redirecting is not the issue since there's nothing anywhere in my host configuration that makes any sort of redirects (at least that I know of)

So this pretty much sums my woes.

I simply don't know why it was working normally and then it simply stopped when I changed computers.

I reinstalled the product twice but nothing. If there's any additional info you guys may need please just ask.

I'm at my wits end on this issue so any help or guidance is greatly appreaciated.
 
"


Last edit: by DoDD
Back to the top
 
Posted
Rating:
#71671
Avatar

Fan in action

Derp…I forgot a very important piece of info. The version of OCP is 7.0.1 my host company is hosting the website on a Linux platform which may be 64bit (can't tell for sure at this point).
Don't know if it matters but Apache is 2.2.19 and PHP is 5.2.17
Back to the top
 
Posted
Rating:
#71764
Avatar

Fan in action

Anyone?
Back to the top
 
Posted
Rating:
#71774
Avatar

Fan in action

Ok I guess I managed to fix it.

I think I broke something when I was trying to figure out how to increase the max upload from 8M to whatever number I needed.

I had changed the post_max_size and upload_max_filesize on a bunch of php.ini files in different directories, including outside of the ocportal directory.

So I went ahead and removed ocportal one more time and went into my host's cPanel and reset all PHP config and handlers to use PHP5 (not that I had changed anything there but I reset it anyway) and then install ocportal again thru simplescripts. Lo and behold, it worked.

So I went back and started to troubleshoot my original issue with the upload limit when I edited the php.ini under the ocportal directory to increase the upload_max_filesize and post_max_size to 20GB (I know it's a lot but users to my site will be uploading and downloading large files like that) and the issue occurred again.

This time however I simply reset those two lines in the ocportal/php.ini back to what they were before and then I was able to log back in.

So…apparently I'm not supposed to mess with the php.ini under the ocportal directory. Lesson learned.

Now that I've resolved this issue I still haven't figured out how to increase the upload limit event after editing the correct php.ini which is under the adminzone directory but I will open a separate topic for that.
Back to the top
 
Posted
Rating:
#71775
Avatar

Community saint

Add this to your current .htaccess file …

Code

<IfModule mod_php5.c>
# ocPortal needs uploads; many hosts leave these low
php_value post_max_size "20M"
php_value upload_max_filesize "20M"
If you are using the ocPortal plain.htaccess file, it doesn't have these values. If you have renamed and are using the ocPorrtal recommended.htaccess file, it will already be showing 16M for each of these values.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#71807
Avatar

Fan in action

After I rename the recommended.htaccess to .htaccess, where should that file be placed?

Under the ocportal directory or under the root of my website?

Obrigado pela ajuda ;)
Back to the top
 
Posted
Rating:
#71808
Avatar

The same directory as ocPortal (where its info.php file is located).


Like ocPortal on Facebook:
Back to the top
 
Posted
Rating:
#71812
Avatar

Community saint

DoDD said

Obrigado pela ajuda ;)
De nada :lol:

I am in Lisboa, but my Portuguese is pretty 'rubbish'!

I think Robbie has answered your question.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#71815
Avatar

Fan in action

Thank you for the input Fletch and Robbie.

Unfortunately that didn't work either.

I thought that maybe my hosting provider was capping the uploads so I did some investigating on them but according to my hosting plan, the Terms of Service and their support they "do not set arbitrary limits on the amount of visitor traffic a web site can receive or on the amount of content a Subscriber can upload to his/her/its website in a given month, nor do they charge additional fees based on increased use of bandwidth"

So here's where I'm at right now. I changed the max_post and max_upload values to 1GB on the php.ini under the ocportal/adminzone

Code

; Maximum size of POST data that PHP will accept.
post_max_size = 1G

; Maximum allowed size for uploaded files.
upload_max_filesize = 1G


And the (recommended).htaccess settings are

Code

<IfModule mod_php5.c>
# ocPortal needs uploads; many hosts leave these low
php_value post_max_size "1G"
php_value upload_max_filesize "1G"

These changes reflect in the PHP info of the ocportal as you can see below

http://imageshack.us/f/585/phpinfo1.jpg/ (Sorry, I tried using the attachment feature here but it didn't work)

http://imageshack.us/f/97/phpinfo2.jpg/


However, when I go to Content Management > Downloads > Add download, it says the limit is still 8MB

http://imageshack.us/f/818/8mdownloads.jpg/


And if I try to upload anything above 8MB but not nearly close to 1GB I get this error

http://imageshack.us/f/163/8merror.jpg/

If I follow the link on the Add download page to change the upload limit, it states that limits for post and upload are 1GB

http://imageshack.us/f/808/siteoptions.jpg/


So, php.ini was configured ok
.htaccess was renamed from the recommended file and also configured ok.

I really don't know where else to look :(

Any ideas or clues on this is much appreciated.
Back to the top
 
Posted
Rating:
#71816
Avatar

Community saint

Try editing this …


You might try setting ALL to 64M. This appears to be a limit that is being set by hosts - despite the reassurances you've received. If it works when set to 64M, try increasing it incrementally.

Don't forget to use the ocPortal Tools to clear caches, etc.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#71820
Avatar

Community saint

One more information:
My previous Host was only accepting PHP directives if the php.ini file was located in public_html directory.

You can add a simple text file with the following code:
upload_max_filesize = 64M
post_max_size = 64M

…and save it as "php.ini" and upload it to the public_html directory.

Once the above had been completed, I needed to add the following line to my .htaccess file also located in the public_html directory:
suPHP_ConfigPath /home/username/public_html
where "username" is the hosting account username. This will cause the php.ini file to affect all subfolders, unless a php.ini file is in a subfolder, at which point the php.ini in the subfolder takes precedence.

This solved my problem at the time.
Back to the top
 
Posted
Rating:
#71827
Avatar

Fan in action

I got it working!!

Thank you! You guys put me in the right direction.

My host has both PHP options, either a single php.ini for the whole site or individual php.ini under the relevant folders.

Since I run other applications on my site I can't have a single php.ini for all of them because each application needs different settings.

The value that Fletch marked on the screenshot for the memory limit got me investigating other subdirectories of ocPortal since that value under column Local would not change no matter what.

These two vital pieces of info put me on the right track which lead me to the FAQ!

Under the section

How do I set PHP settings on a CGI server?

I found this

Theoretically the file should be placed in any directory from which a PHP file might be called up by URL. Practically though you can just put it in the base directory, adminzone, cms, collaboration, data, data_custom, forum, personalzone and site directories.

So I placed my custom php.ini with the settings I needed under each one of the folders in bold and it worked! I can upload files within the file size range I need.

Wow what a journey! But I'm glad everything worked out.

Thank you very very much for all the help, it was really helpful. If needed, please mark this thread as resolved :)
Back to the top
 
Posted
Rating:
#71829
Avatar

Community saint

DoDD said

… please mark this thread as resolved :)
…..pssssst!, edit your first post and prefix the title with the 'resolved' phrase of your choice …  :lol:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: