PLEASE HELP!

9 min read

Deviation Actions

gadgetsguru's avatar
By
Published:
814 Views



I'm in a major pickle!

[Original post: Wednesday, October 8, 2008 @ 5:06am]


For those of you that know anything about programming and in particular, PHP 5.2.6, I must beg for your help!


I just made a major booboo! Let me explain: I finished upgrading to PHP version 5.2.6 from PHP 4.2.1, and in my code I use a lot of include() and require() functions to create the page templates. Well, as soon as I restarted my server, those functions stopped working. Even worse is I have literally thousands of pages on my site and practically all of them use these functions in one way or another; these pages are no longer rendering... Is there some sort of setting I need to change or fix in php.ini, or something else, or is there a way to fix this globally? If not, how can I downgrade back to PHP 4.2.1?


Also, I have a MySQL database and for some reason, I can't connect to the database using this code:

$con = mysql_connect('localhost', 'mysql_user', 'mysql_password');


It just flat out doesn't return anything. Am I doing something wrong here, too?


Please, please, please help me fix my catastrophe!! :stupidme:


 


 


[Update #1: Monday, October 13, 2008 @ 6:19pm]


Last night, I was editing my php.ini file and when I saved it and typed in artbyjb.com, suddenly everything worked (or at least nothing was broken)! :omg: I have to admit that I don't know what I did to fix it, and even though I would really like to know (to prevent that from happening in the future), I'm so incredibly relieved my websites are back up and running!!


:phew: Another catastrophe diverted! Well, at least for now anyways... :paranoid:


Oh, and the whole MySQL code not working bit is now working. Well, it's returning stuff, just not exactly the way I intended it... Regardless, that's minor as compared to my entire site being down for nearly a week. :faint:



Shameless self-promotion


Below are some of my favorite personal works:








© 2008 - 2024 gadgetsguru
Comments3
Join the community to add your comment. Already a deviant? Log In
foeo's avatar
Not sure if that would be the solution, but two parameters come to my mind.

Chek the safe_mode settings in your php.ini. At some version it was made by default that you cannot access files outside your serverdir without special configuration (openbasedir).

And regarding the mysql... not sure when the change was, but vars wouldn't be global anymore. Check register_globals in your php.ini. There's a sql.safe_mode as well, but that usually isn't a problem.

If none of this helps, push up your loging level and post some error messages. You can contact me via note if you like.