Question:
I need help witrh PHP5 and scripts?
anonymous
2007-09-08 19:28:28 UTC
Seems like Open Source is going the same route as Windows Vista cause PHP5 Sucks and they are forcing us all to them?

Anyways enough complaining.

So I have Apache2, PHP5, and MySQL.

My problem is my php scripts keep turning blank, nothing, zit, zero, just a white screen keeps appearing on any .php script that is executed.

It used to be more simpler but now PHP is more complicated.

I used to install PHP with ease and now I may have to hire a IT Technician to help me.

PLEASE HELP ME!!!!!!!!! sorry for the caps but I don't wanna pay for help I didn't used to need. I am smart wise guy here and now reduced to a loser.
Eight answers:
anonymous
2007-09-08 20:05:59 UTC
The reason you are having this problem is because your script is creating errors, but error reporting is suppressed in PHP 5 by default in order to prevent any old hacker from seeing what's wrong with your scripts and exploiting the security holes you make.



In other words, you're the problem, not PHP. If anything, PHP is protecting you from showing the world what a bad programmer you are and how to exploit your ignorance. You should apologize.



To enable error reporting, you simply set the level of reporting you want via the error_reporting() function. For example, to get all errors and warnings:




error_reporting( 6135 );

// rest of your php code / html

?>
Wiseguy
2007-09-08 19:45:29 UTC
Let's take this a step at a time... I'll update my answer in response to your updates.



1) What OS are you running? Win Server 2003



2) Have you tried the things other posters have mentioned? Make the file with just


phpinfo();

?>



Do you get any output? If not, it would seem PHP or, more likely, Apache is misconfigured and isn't parsing PHP files.



------------

As for the complaints, I'll address them with my own opinions, but I'm not trying to start an argument.



First, it's not fair to equate all of open source to one product. If there was one man who was REALLY stupid, is it then a safe assumption that all men are REALLY stupid? I should think not. (Though some women will likely debate this, lol, it's not an assumption that logically follows, even if it's true.)



Second, I respectfully disagree that they are "forcing" PHP5 upon us. If PHP4 failed to work 6 months after PHP5 was released, that would be "forcing." PHP4 has continually been supported since PHP5's release OVER 3 YEARS AGO. They are giving us fair warning that they will stop supporting it a year from now, exactly 4 years since PHP5 was released. To use your comparison, will Windows XP still be getting updates in 2011?



Lastly, why do you think PHP5 sucks? As far as I'm concerned, there are a lot of major improvements in PHP5 over PHP4, but nothing that's worse. I'm not really saying you're wrong on this one, but I'm interested in why you find PHP5 to suck.



By the way, I don't see why PHP5 is "more complicated." Maybe because some libraries utilize objects? Everything in PHP5 otherwise works pretty much identically to PHP4. Most PHP4 code should run the same in PHP5, given the same server/environment settings.
hagakure
2007-09-08 19:42:57 UTC
I'll agree with you about vista, but open source is in no way heading the same way as that. I have no problem with PHP5 or any other up-to-date open source software.



Now, is it all of your scripts or just some of them that are coming up blank. I have had this come up a few times myself and after some careful debugging and codewalking I found the issues to be programmer(me, haha)/coding error. Once the (often tiny) mistype was correct all was well with the world again, haha.

Anywho, if its all scripts i would start from basics and do a phpinfo file and go from there. If it is just some, i would be more than willing to help check to see if its just a misplace function call or similar. I know once when using the ternary operator, i place the echo call inside instead of before it and it cause the same thing.



well, bon chance ...
John K
2007-09-08 19:39:07 UTC
You really haven't supplied enough information. Where are you installing PHP? I assume it's on your personal computer for testing purposes. I have PHP5 on my computer and it hasn't missed a beat. I use it daily to test several programs including heavyweights like osCommerce. May I suggest you completely remove Apache, PHP MySQL (save your programs and databases first because some uninstalls delete htdocs and databases.). Then download a neat little free program called Uniform Server. It doesn't need to be installed and if you hate it you can just delete the folder (after you've saved your data). Uniform server runs fine. It's the smallest, neatest package I've ever seen. If you contact me through my profile, I can email you a PDF tutorial I wrote that shows how to install Uniform Server and Zen Cart (both free) but once you load the server you can test any program. Get it from http://www.uniformserver.com



Goo luck
anonymous
2007-09-08 20:03:37 UTC
Are you insane??? Complaining about PHP5, it's way better than the semi OOP PHP4. I think it's probably you dont have enough skill to use PHP5. For the sake of simplicity if you want to have php5, mysql, apache2 download XAMPP or something like in case you cant configure any of the component
anonymous
2007-09-08 19:50:13 UTC
Make a PHP script:




phpinfo();

?>



and if that works, then it is just your syntax. Otherwise it was installed improperly and you need to uninstall it and reinstall it. Also if you are running on a localhost (windows or linux) I suggest you use XAMPP or (Windows only) WAMP. They work fine on every system I tried them on.
anonymous
2007-09-09 06:36:52 UTC
IT technicians will not work for free. May be you can contact a PHP expert. Check websites like http://oktutorial.com/
anonymous
2007-09-08 19:32:46 UTC
Too rich for my blood.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...