[PHP] Help with security configuration for a shared hosting environment
Hi, I am setting a shared hosting server and I'd like to gather some advices regarding the security. Since the code will not be produced by me I'd like to focus on environment strategies. For now I've added a noexec in the mount options of the /tmp and the homedir of the web server, disabled the devel tools (such as gcc). In terms of the PHP I am inclined to use mod_suPHP to avoid having the problem with the script generated files (such as uploads) being owned by the webserver itself and I'd like to use the available php.ini options to try to make it harder for an attacker to cause problems. I will disable the register_globals and the allow url fopen. But what else can I do (open_basedir/doc_root/safe_mode etc)? I need to allow the user to access the pear classes. Using linux/php 5.2.x Regards.
Re: [PHP] not able to use mysql server
On 12/30/09, Jignesh Thummar wrote: > > It is problem with mysql client, it's not able to connect with mysql > server. > Either mysql server is not running or windows firewall is blocking to the > access of port 3306. Try to disable firewall. > > -Jignesh > > On Wed, Dec 30, 2009 at 11:41 AM, Sudhakar > wrote: > > > hi > > > > i am using windows vista and installed wamp server, initially i installed > > wamp and accessed phpmyadmin and while setting a password for the root i > > did > > a mistake and could not access phpmyadmin and also renamed some php files > > so > > i uninstalled wamp server and re installed > > > > now the problem i am facing is when i click on mysql.exe located at > > D:\wamp\bin\mysql\mysql5.1.36\bin i am getting the following error > > error 2003 cant connect to Mysql server on localhost 10061 > > > > in config.inc.php located at d:\wamp\apps\phpmyadmin3.2.0.1 i have the > > following > > $cfg['Servers'][$i]['host'] = 'localhost'; > > $cfg['Servers'][$i]['port'] = '3306'; > > $cfg['Servers'][$i]['auth_type'] = 'config'; > > $cfg['Servers'][$i]['user'] = 'root'; > > $cfg['Servers'][$i]['password'] = 'root'; > > $cfg['Servers'][$i]['AllowNoPassword'] = true; > > > > along with others. > > > > when i type http://localhost i am able to see the welcome screen of wamp > > and > > can click on phpinfo but when i click on phpmyadmin it takes a while to > > load > > and a blank screen appears > > > > also i have stopped all services and restarted all services from the > > wampserver icon in the system tray, normally the colors change from red > to > > yellow to white, the color is at yellow and does not change to white > > > > how do i solve the error error 2003 cant connect to Mysql server on > > localhost 10061 so that i can use phpmyadmin > > > > please advice. > > > > thanks. > > > Are there any error entries of mysql server on the event viewer ? Also, what is the starting state of mysql server on the services console ? You can found all tool on administrative folder on the start menu.
[PHP] If design patterns are not supposed to produce reusable code then why use them?
I have recently been engaged in an argument via email with someone who criticises my low opinion of design patterns (refer to http://www.tonymarston.net/php-mysql/design-patterns.html ). He says that design patterns are merely a convention and not a reusable component. My argument is that something called a pattern is supposed to have a recurring theme, some element of reusability, so that all subsequent implementations of a pattern should require less effort than the first implementation. If design patterns do not provide any reusable code then what is the point of using them? I do not use design patterns as I consider them to be the wrong level of abstraction. I am in the business of designing and developing entire applications which comprise of numerous application transactions, so I much prefer to use transaction patterns (refer to http://www.tonymarston.net/php-mysql/design-patterns-are-dead.html and http://www.tonymarston.net/php-mysql/transaction-patterns.html ) as these provide large amounts of reusable code and are therefore a significant aid to programmer productivity. What is your opinion? Are design patterns supposed to provide reusable code or not? If not, and each implementation of a pattern takes just as much time as the first, then where are the productivity gains from using design patterns? -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] If design patterns are not supposed to produce reusable code then why use them?
On Wed, 2009-12-30 at 16:50 +, Tony Marston wrote: > I have recently been engaged in an argument via email with someone who > criticises my low opinion of design patterns (refer to > http://www.tonymarston.net/php-mysql/design-patterns.html ). He says that > design patterns are merely a convention and not a reusable component. My > argument is that something called a pattern is supposed to have a recurring > theme, some element of reusability, so that all subsequent implementations > of a pattern should require less effort than the first implementation. If > design patterns do not provide any reusable code then what is the point of > using them? > > > > I do not use design patterns as I consider them to be the wrong level of > abstraction. I am in the business of designing and developing entire > applications which comprise of numerous application transactions, so I much > prefer to use transaction patterns (refer to > http://www.tonymarston.net/php-mysql/design-patterns-are-dead.html and > http://www.tonymarston.net/php-mysql/transaction-patterns.html ) as these > provide large amounts of reusable code and are therefore a significant aid > to programmer productivity. > > > > What is your opinion? Are design patterns supposed to provide reusable code > or not? If not, and each implementation of a pattern takes just as much time > as the first, then where are the productivity gains from using design > patterns? > > > -- > Tony Marston > http://www.tonymarston.net > http://www.radicore.org > > > In my opinion, patterns primarily aid development of systems where more than one person will be working on it, or where more people may need to refer to the code in the future as a basis for something else. Programming essentially is about not reinventing the wheel all the time, by reusing ideas either as they stand, or as a base for improving upon. To an extent, I think every programmer uses design patterns, it's just a matter of how complex a pattern one uses, and how closely one stays to the original pattern. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] If design patterns are not supposed to produce reusable code then why use them?
At 4:50 PM + 12/30/09, Tony Marston wrote: What is your opinion? Are design patterns supposed to provide reusable code or not? If not, and each implementation of a pattern takes just as much time as the first, then where are the productivity gains from using design patterns? -- Tony Marston Tony: I don't think reusable code is the main point of "Design Patterns". From what I've read, "Design Patterns" are more of a "If you are faced with this problem, here's a solution" kind of thing. Reusable code is more a by-product of the process. Instead "Design Patterns" are more about identifying and classifying common problems than reusable code. The point is if you can define your problem as a category referenced by "Design Patterns", then you are closer to solving it. With that said, I find "Design Patterns" frustrating because of the level of abstraction most authors use to identify the problem/solution pair. Instead of showing a real world example, their solution are so broad, so encompassing, so abstract, that they lose me. However, I must admit that the newer ways of doing things are bringing to the table ways to do things that were not possible before. So, in the end we all have to keep learning just to keep up. As I've said many times before "I've learned something new every day of my life -- and I'm getting damned tried of it." Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] If design patterns are not supposed to produce reusable code then why use them?
On Wed, Dec 30, 2009 at 04:50:40PM -, Tony Marston wrote: > I have recently been engaged in an argument via email with someone who > criticises my low opinion of design patterns (refer to > http://www.tonymarston.net/php-mysql/design-patterns.html ). He says that > design patterns are merely a convention and not a reusable component. My > argument is that something called a pattern is supposed to have a recurring > theme, some element of reusability, so that all subsequent implementations > of a pattern should require less effort than the first implementation. If > design patterns do not provide any reusable code then what is the point of > using them? > There's a weird terminology problem here. A "design pattern" is just an idea. Once you implement it, it can become a source of reusable code. > > > I do not use design patterns as I consider them to be the wrong level of > abstraction. I am in the business of designing and developing entire > applications which comprise of numerous application transactions, so I much > prefer to use transaction patterns (refer to > http://www.tonymarston.net/php-mysql/design-patterns-are-dead.html and > http://www.tonymarston.net/php-mysql/transaction-patterns.html ) as these > provide large amounts of reusable code and are therefore a significant aid > to programmer productivity. > > > > What is your opinion? Are design patterns supposed to provide reusable code > or not? If not, and each implementation of a pattern takes just as much time > as the first, then where are the productivity gains from using design > patterns? > It depends on how you implement it. You can prevent it from being reusable by implementing it in such a way that there's just no way to adapt it to different circumstances. But for the most part, it's like any other code you expect to reuse, whether it's just a function, a plain class or whatever. If you implement it properly, it will be reusable elsewhere. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Survey+Report in PHP
Hello Guys, I am trying to make a web app which has a survey and report based on the survey.The app is like a suvery and I have to generate a report based on the survey.Can someone please give a clue of how to generate the report .I have the answers to the questions of the survey and based on them a report will be generated. Thanks Aditya
[PHP] Re: Survey+Report in PHP
Sorry for the vague question. This is how the survey is.We have some question and answers to that questions.Some answers have multiple options(drop down) and some answers are to be entered in a text box.My aim s to get the answers and generate the report based on the answers (by using some mathematical formula's on the answers). The report would contain a paragraphs depending on what answers are selected or entered. My question is for some answers the result is fixed say What's your fav color? options:white/black/red/green Answer:-white. Report You are a peace loving person. (similarly for other colors).But for some questions the answers are to be generated on the fly. How long do you sleep ? text box:- 12 hours. report:-You are a lazy person.(here the answer depends on the value entered in the text box. So i cannot save the results in a table.So should i store some of the answers in the database?How should i go about this. Thanks Aditya
[PHP] PHP excel graph generator
Hi, I have the task to create excel sheet with embedded charts and graphs through PHP. The charts are pie chart and bar chart. The project will be run on the linux server. My question is it is possible to implement this through PHP? If yes, then please suggest the available implementations. Thanks in advance. Regards, Manoj
[PHP] Happy New Year All!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php