Trouble getting old message board software to work on new host - php

I recently moved my entire site to a new host. I had only minor issues getting my SMF board to work on the new host but I'm afraid I've reached my knowledge limit on getting my old, dusty Ikonboard (which uses a Berekely DB) to work. It's not a board we currently use but more of an archive.
In theory all I should've had to do was edit the server settings in a file called Boardinfo.cgi, which I did. I was still getting errors when I tried to access the board. So I contacted my new host and asked them if there was anything else they could think of that I needed to do to get it running. Their response was, in part:
It appears there are some issue with the version/software you are
trying to use. The environment Ikonboard is trying use Apache/1.3.27
(Unix) while the server currently uses Apache/2.2.25 (Unix).
Also when getting visiting
[http://OURSITE.com/cgi-bin/ikonboard.cgi] we are getting errors
for the PHP handler. We are not sure if Ikonboard is trying to use
"nobody" or another user to run. Which ever it is not correctly set up
for suPHP which is the current PHP handler.
As in [http://OURSITE.com/Install_Guide.html] we have chmod the
files to 755 and that is allowing the file to oad, but not
successfully run the code inside.
We have added in a php.ini to the public_html folder that will allow
you to adjust any php setting that may require it to run. However
looking into the code does fall out of the realms of our support. You
may try contacting Ikonboard to see if they can shed some light on
this issue.
I'm primarily a web/graphic designer and not a programmer so most of this doesn't make much sense to me (though I've had some success doing php edits on sites in the past). I did pose the question on the Ikonboard message boards but since Ikonboard is pretty much dead, their support boards are populated by a bunch of tumbleweeds blowing by. I'm willing to throw money at this issue, if it can be solved, but I thought I'd ask here before I do that.
Any ideas would be very much appreciated!

Related

How can I get CPU Usage with PHP on Windows IIS 8.5? (2012 R2)

What I'm looking for is an easy way to get either individual core usage or total CPU usage for the system that the PHP Script is running on.
However I'm unable to do so. I've looked all over for all manner of solutions from using perf (with and without passthru) to using winmgmts through COM.
The issue is, some of these will work on Windows if you use Apache, but with IIS the security restrictions stop PHP from being able to use for example winmgmts through COM so I just get back a null object.
How can I solve this? - I've honestly tried every solution I can find on the internet and while there is lots of information about how to raise the permissions all the guides point to IIS 7 or earlier and are no longer applicable to IIS 8.5 with literally the suggested option changes being non-existent.
If anyone could help me with this I'd be really appreciative, a workaround like using a third party application that could provide this data would also be acceptable if I can query the data through PHP either from a file or network etc Even a asp.net script that I could query? (I don't know anything about asp.net but I could use it for this single thing if it'd work?)
Thank you.
I managed to solve this and I hope it helps someone else.
What you must do is convert the folder where your PHP (or asp) will execute to an Application. So the structure will look like this:
Website Name
-> Application Name
Then you want to select the parent folder, the Website Name folder and go to "Basic Settings" in the far right actions pane and select "Connect As..." and connect as an Administrator account.
Once you've done this the application will inherent the credentials you specified on the parent website folder and you'll now have full access to perf, wmi and so on.
If you only give the credentials directly to the application it doesn't work and it also doesn't work if you don't convert your folder where your scripts will execute to an application. This is where I was being tripped up and the documentation online is very sparse.
I'd like to thank the good people at the phpsysinfo github for their IIS documentation which pointed me on the right track on needing to convert a site to an application which was part of the puzzle I was missing.

Load test server using PHP script?

I guess this pretty vague question could be classified as a programming one. I did consider whether it belonged in the Ask Ubuntu / WordPress Development / Linux Administration communities- but of course I don't like to spam either. Apologies up front if I made a huge mistake and caused you to have a bad day.
Take a linux server, it has a number of WordPress sites on it, and we can already guess that the dominant interpreted language is PHP when you consider the above scenario.
These are not live sites, they are simply sites copied from a production server.
I want to simulate random traffic to all of them at once to see if the server can handle the load. Perhaps a PHP script run from the command line can do this?
Just looking for ideas at this stage.
I have tried https://www.blitz.io/ - works wonderfully, however just one site at a time as far as I'm aware.
http://jmeter.apache.org/ will do the job but need way more time to configure than blitz.io

Which PHP version lets you get away without copying INI file to each directory?

I've been having problems with PHP session variables since starting work on a new website for a company I work for. I phoned the hosting provider (1and1) and I was told it was because I needed to copy an INI file into each directory I make.
I recall facing this problem before, and somehow finding a list of PHP versions that you don't need to copy the INI file to each sub-directory, to use sessions with. I just can't seem to find such information on Google (despite searching for a few hours). Does anyone know what PHP version I need to downgrade to, in order to use session variables again, without having to manually copy the INI file into each of the X thousand directories I have?
I called them back and somebody else answered, who claimed to have changed something in the accounts PHP setup, after I described my problem to him. It now works fine. I guess the person I spoke to previously just didn't have the expertise to help.
Happy days :)

SWFUpload (Flash file upload) and routed URLs in Zend Framework (Mac Issue)

This gets quite specific in regard of the combination of technologies used, so I don't expect a lot of direct answers, but I have to try nonetheless.
This is (supposedly) an exclusively Mac issue with Flash Player in that it does not recognize routes (see here: http://demo.swfupload.org/Documentation/ under Mac issues, point 2). I know what you're thinking: "Mac?! For coding?! Bwaahaha!", and I concur. However, it is the weapon of choice of my employers due to cheapness when it comes to bundled software and I am forced to hack away on this shame of a machine.
I am using SWFUpload to display a fancy progress bar for users, and am stuck on sending the file to the controller - it always yields a 302 error in the debug window. If I, however, change the upload script target in the SWFUpload settings object to an absolute path to a script, everything works fine. Also, the file upload form works perfectly ok if there is no Flash overlay present, that is, if it simply POSTs to a route - just in case you're wondering.
Has anyone else encountered this problem, and if so, how have you solved it? I guess I could place a swfupload.php script somewhere and have that receive a file, then have IT send the file forth to a controller, but it seems like a very dirty workaround.
It's a bit vague, I know, if I can do anything to clarify further, please ask.
Thank you
Edit:
I should mention, this applies to local development only. As soon as I upload the code to our Linux server, the routes are a-ok and the file goes through. So if anyone has the solution for this local dev environment problem, it would be much appreciated.
Shame and regret, shame and regret! I am sorry for wasting everyone's time - it turns out I had forgotten to send and set the Session ID, which caused my Acl to redirect, which caused the 302. I failed to see all this because the debug simply says 302. Sigh! Anyway, consider this question closed - everything works fine :)

Connection Interrupted. The connection to the server was reset while the page was loading

I am calling a PHP-Script belonging to a MySQL/PHP web application using FF3. I run XAMPP on localhost. All I get is this:
Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.
There are a number of possible solutions ... depends on the "why" ... so it ends up being a bit of trial and error. On a fresh install, that's tricky to determine. But, if you made a recent "major" change that's a place to start looking - like modifying virtual hosts or adding/enabling XDebug.
Here's a list of things I've used/done/tried in the past
check for infinite loops ... in particular looping through a SQL fetch result which works 99% of the time except the 1% it doesn't. In one case, I was using the results of two previous queries as the upper and lower bounds of a for loop ... and occasionally got a upper bound of a UINT max ... har har har (vomit)
copying the ./php/libmysql.dll to the windows/system32 directory (Particularly if you see Parent: child process exited with status 3221225477 -- Restarting in your log files ... check out: http://www.java-samples.com/showtutorial.php?tutorialid=1050)
if you modify PHP's error_reporting at runtime ... in certain circumstances this can cause PHP to degenerate into an unstable state if, say, in your PHP code you modify the superglobals or fiddle around with other deep and personal background system variables (Nah, who would ever do such evil hackery? ahem)
if you convert your MySQL to something other than MyISAM or mysqli
There is a known bug with MySQL related to MyISAM, the UTF8 character set and indexes (http://bugs.mysql.com/bug.php?id=4541)
Solution is to use InnoDB dialect (eg sql set GLOBAL storage_engine='InnoDb';)
Doing that changes how new tables are created ... which might slightly alter the way results are returned to a fetch statement ... leading to an infinite loop, a malformed dataset, etc. (although this change should not hang the database itself)
Other helpful items are to ramp up the debug reporting for PHP and apache in their config files and restart the servers. The log files sometimes give a clue as to at least where the problem might reside. If it happens after your page content was finished it's more likely in the php settings. If it's during page construction, check your PHP code. Etc. etc.
Hope the above laundry list helps somebody someday ... probably myself when I run into it again and come back here looking for "how the heck did I fix it last time?" ... :)
It's possible that your script could be caught in an infinite loop. If that doesn't apply, then I'd check the error logs like TimB suggested.
It sounds like the PHP script you're calling is failing without returning a valid response. Depending on the level of logging that you have set up, this should generate an error in the Apache logfile, which will give you some idea of the problem. I'm not familiar with XAMPP, but you should be able to find out where the logs are, and look for an error that occurred at the time you made your request to the PHP script.
copying libmysql.dll to apache\bin folder may help you overcome this strange error
I solved this problem Upgrading the xampp\php\ext\xdebug\php_xdebug.dll
(changed to php xdebug v.2.0.5-5.3-vc9 )
I had the same problem and this is what i did.
I issued the http get command through php cli script, and as it turns out I had declared one class twice somewhere.
By the way , i use AMPPS on an mac
Hope this helps some one!
Try doing the request with Firebug enabled and see what info you can get out of that; I always find that using wget is helpful for seeing the raw HTTP interaction without worrying about Firefox's UI elements interfering.
If you are using certificates for ssl in Windows 2008 Server(iis 7) from old selfssl tool(iis 6), that is the problem. Sometimes Microsoft releases patches which can destruct all these old certificates. The solution is to generate them again.
copying libmysql.dll to apache\bin folder may help you overcome this strange error
Indeed this helped me to solve this problem
The connection to the server was reset while the page was loading.
Incase the issue is not working this did the trick for me.
1. I got a new zip directory for PHP and connected it with apache
2. I searched for the libmysql in the new php and inserted this to the apache/bin
its this libmysql.dll that is needed there and not the one form mySQL/bin.
ok at least thats the one that worked.
I experienced a very similar issue - which doesn't apply to the person who asked this question - but may be of help to others who are reading this page...
I had an issue where in certain cases PHP 5.4 + eAccelerator = connection reset. There was no error output in any log files, and it only happened on certain URLs, which made it difficult to diagnose. Turns out it only happened for certain PHP code / certain PHP files, and was due to some incompatibilities with specific PHP code and eAccelerator. Easiest solution was to disable eAccelerator for that specific site, by adding the following to .htaccess file
php_flag eaccelerator.enable 0
php_flag eaccelerator.optimizer 0
(or equivalent lines in php.ini):
eaccelerator.enable="0"
eaccelerator.optimizer="0"

Categories