Codeigniter don't load changes made in the source code - php

I created an online inventory system with a downloaded template. At first, I can see all my codes is being reflected in the view page but after some time no matter what I added or change in my code nothing happens to the view even though I already put header no cache and many times I cleared the browser history and pressed ctrl+F5. Now I am stuck to the view page from last 3 days and I already made so many changes in my source code. Please help......

Related

PHP Page does not load data till I refresh after form submit

I have a main php Admin page that allows me to edit information contained within my database. I have several forms on the page, and a tabbed setup that allows me to nest the edit forms within each tab. All the forms refer Action="" back to the same php page for process and the page naturally looks to see if a button isset after POSTing otherwise just loads the usual tables and does not UPDATE the database.
Prior to web deployment I utilise XAMPP to develop the pages, however, once contented with the pages I upload to HostPapa. Whilst in the XAMPP environment, when i submit my information to be processed the page loads fine, the database is UPDATEd and the Success Message displays fine. However, once I upload to HostPapa and attempt the same steps, once i click the submit button and the data is sent back to the same page for processing, only a blank screen appears. When i hit refresh though it completes the processing and displays the Success Message. Data is UPDATEd in the database and nothing else appears to be wrong.
My questions are:
Any idea why my localhost website would display fine but my live version kind of stutters through the processing
Is this a setting on HostPapa that may need changing
Have i fallen pray to a coding taboo that prompts this response in the live environment
Worth noting that I had another XAMPP/HostPapa issue where I had not utilised the correct file name with Capitals in a form and this caused a failure as the file name did not match the coded file name exactly. This was rectified by insuring that file names and coded file name were match and case sensitive. The local XAMPP server did not care about case sensitivity which makes be believe that the form submission issue noted above may be a PHP option on HostPapa that is currently turn one.
Any assistance in this matter would be appreciated.
Regards,
C
To anyone who reads this and had a similar issue when utilising multiple forms on the same page. My issue is I had breaks(empty rows) between my <?php ?> tags in the header of the document.
I used several <?php ?> tags to encompass the different $_POST functions for my own clarity. This caused the server to interpret these breaks(empty rows) as an intentional space and made it appear that the header had already been sent. So naturally as my page attempted to load, the server believed i was attempting modify the header that had already been sent.
I believe this coding faux pas was masked by XAMPP during my offline build. I did a bit more research and I believe this also has something to do with the UTC selection.
At any rate, thank you Dony for attempting to assist. It was a hard issue to articulate.
Regards,
Cheyne

Some elements missing / changed when trying to change from html to php

I'm asking for help for those who have experience in changing an html file to a php file. I've tried everything I know (and I'm not the smartest I admit) but I don't understand why the following is happening.
Currently: When viewing on mobile, the mobile menu button has gone, the toggle switch which changed prices from monthly to annually, tabs which displayed different content has gone. As a result:
If there was a toggle, both the toggle results are displayed one above the other
If there was a tab, each tab element is displayed underneath the other
The mobile menu button has gone completely
Background:
I purchased an HTML template but it turns out the seller didn't want to help. I wanted to split and convert the page into a php page as I wanted a single header/footer file which I could import. As you will see (if you check the repo) the header.php and footer.php file is getting imported into the page php file.
I created the pages by first:
Renaming the original html file to a php file
Cut the header and footer and import them back into the page php file
That's all I have done. It seemed to work, however another check (after cache cleared) I noticed the issues.
The link to the site page im referring to is:
https://blueboxhosting.co.uk/products-cloud-hosting
But if you look at any of the pages, you'll see errors on all of them now where they're should have been controls (eg toggles, mobile menu, tabs etc)
I've created a snipped so you can view the code and HOPEFULLY spot where I've been a moron:
https://bitbucket.org/snippets/bbhostinguk/7e5qxp
Any help with this would be amazing as I just can't figure it out.
Start by running the HTML generated by PHP through a validator, e.g. https://validator.w3.org/
Your code has numerous stray tags which may or may not affect the rendering.
Another tip is to comment off everything and then uncomment section by section and check when things start to break.

BigCommerce PHP Include

We have a network of Bigcommerce sites, on which we've installed several tools that are controlled by one central site, using Bigcommerce's include feature. The url passes a get value to the php, and retrieves all of the pertinent information in our DB and displays several things.
The problem is that, as of last night, all of the 40-some sites began displaying content from the newest user - the newest DB entry. I deleted the newest user, and it reverted to the user just before that.
The weird part is that when I check the url being included, the correct information is displayed.
Check it out (I've stripped out most css and js, so most relevant info is shown) -
Site URL: http://www.epicflowers.us/
Included URL: http://epicflowers.com/toolbox/fetchToolbox2/toolbox.php?store_id=123456789
The colors and the text should be exactly the same. It appears that the DB queries are returning the correct information, but the site including the url are not.
What I've already tried:
Duplicating and renaming files, in case it was a caching issue.
Ran an ajax call to retrieve the same info (which worked, but it's too slow)
This didn't seem to happen as a result of changing anything, and the PHP side seems to be working fine. No one has touched the code in a few days, but the support tickets started coming in early this morning. It's altogether possible that it's completely unique to BigCommerce.
Any ideas?
Update:
It appears the BC include is ignoring the get values at the end of the url, so http://epicflowers.com/toolbox/fetchToolbox2/toolbox.php?store_id=123456789 appears as http://epicflowers.com/toolbox/fetchToolbox2/toolbox.php, obviously negating anything unique about the store the code is on.
Any ideas on why? Bigcommerce hasn't published anything in their blog that suggests this has changed.

I load a php script using Jquery and it loads a cached result. How to solve?

Essentially I am coding a website for a university. I have a script that allows researchers to add their profile to the departments database. These profiles need to be approved by an admin before being available on the public site.
In the admin panel, I have a page called researchers, that shows the admins all the researchers in the department in a table. There is another tab that shows the researchers that are awaiting approval.
The php script to show the table is loaded through JQuery. I clear the div using JQuery empty function, then load the php script using JQuery load function. The problem is when I load the script, it loads a cached version of the script. If I approve a researcher, and click the tab awaiting approval, the researcher that I just approved still shows up as awaiting approval, unless I clear the cache. Any ideas? Not sure what code to post to help get an answer.
Thanks
How about add a timestamp to your get url. like get/this/url.php?timestamp=2345232423
This way it should not cache it.

Lost sessionvariables in firefox

I have a pretty strage problem im dealing with.
Lost sessionvariables in firefox.
Im using wordpress and have a subpage that causes the loss.
More specific:
In wordpress there exists a page called My pages (Original page names are in swedish, translated for convinience)
Under this page i have a few subpages. Among these are a page called Create test. There is nothing special about this page, for now only contains the phrase "hello world". If I enter any page other that this, it works.
But this particular page just seems to clear my session variables (wich I use to store login info)
I tried deleting the page in question in the effort to remake it.
While it was deleted I tried navigating around on the page.
Create test was the last item in the subnavigation menu, and now when its gone, the same thing happens on the last menuitem (now Account settings). This leave me to believe its something with the menu.
Even more strange, after recreating Create test, so that this page is now the last item. Still it's Account settings that is the page with the resetting of sessionvars...
I have through echo determined that the session id stays the same, just the variables that get unset.
I have unset($_SESSION['id']); at only one place, and this code is NOT run.
The problem just baffles me and I have no idea why this particular pages does this.
It may be totally unrelated, but we had problem with Firefox and sessions on certain pages in the past. It happened most of the times while developing and therefore refreshing a particular page, have you tried clearing your browser cookies which is where session is stored?
As an addition:
Check that you assign sessions before you write anything to the response stream.
Also we had similar problems with sessions set in a pages that were doing a redirection (i.e. a login page that if successful would set the session and redirect to the another page.)
I'm not sure about PHP but in .NET that can be overcome by explicitly setting not to terminate the response so that all headers are written to the response stream.
Fixed now, actually have no idea what I did. but I've change some html but mostly CSS.
So there is a strong posibility it was CSS-related.

Categories