Re: [PHP] PHP 5 Configuration
On Thu, 2010-07-01 at 19:24 +0100, Gustavo Carrasco wrote: I've been trying to install PHP5 with windows XP, but i had received the next errors: - Error trying to access the local web services Get Object failed. You will need manual configure the web server. - Error trying to access mime type file. You will need manual configure the web server. Somebody can help me??? Regards _ Agudiza los sentidos que viene un nuevo Messenger ¿estás listo? http://explore.live.com/windows-live-messenger It seems to suggest that you've not installed a web server, such as Apache or IIS. Of the two I'd choose Apache as it's by far the most configurable and secure. Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] PHP 5 Configuration
On Thu, 2010-07-01 at 19:38 +0100, Gustavo Carrasco wrote: Hi, nice to meet you. I had installed Apache, and his service is running good. There's any sequence about how to install this products? or maybe i need to modify some lines in httpd file or php.ini file? __ Subject: Re: [PHP] PHP 5 Configuration From: a...@ashleysheridan.co.uk To: carrascojg...@hotmail.com CC: php-general@lists.php.net Date: Thu, 1 Jul 2010 19:28:30 +0100 On Thu, 2010-07-01 at 19:24 +0100, Gustavo Carrasco wrote: I've been trying to install PHP5 with windows XP, but i had received the next errors: - Error trying to access the local web services Get Object failed. You will need manual configure the web server. - Error trying to access mime type file. You will need manual configure the web server. Somebody can help me??? Regards _ Agudiza los sentidos que viene un nuevo Messenger ¿estás listo? http://explore.live.com/windows-live-messenger It seems to suggest that you've not installed a web server, such as Apache or IIS. Of the two I'd choose Apache as it's by far the most configurable and secure. Thanks, Ash http://www.ashleysheridan.co.uk __ Hotmail prepara novedades y sorpresas en breve, ¡estate atento! The php.net download area should have both the .exe install files and instructions about how to get it configured with a web server. Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] PHP 5 Configuration
Hi, nice to meet you. I had installed Apache, and his service is running good. There's any sequence about how to install this products? or maybe i need to modify some lines in httpd file or php.ini file? Subject: Re: [PHP] PHP 5 Configuration From: a...@ashleysheridan.co.uk To: carrascojg...@hotmail.com CC: php-general@lists.php.net Date: Thu, 1 Jul 2010 19:28:30 +0100 On Thu, 2010-07-01 at 19:24 +0100, Gustavo Carrasco wrote: I've been trying to install PHP5 with windows XP, but i had received the next errors: - Error trying to access the local web services Get Object failed. You will need manual configure the web server. - Error trying to access mime type file. You will need manual configure the web server. Somebody can help me??? Regards _ Agudiza los sentidos que viene un nuevo Messenger ¿estás listo? http://explore.live.com/windows-live-messenger It seems to suggest that you've not installed a web server, such as Apache or IIS. Of the two I'd choose Apache as it's by far the most configurable and secure. Thanks, Ash http://www.ashleysheridan.co.uk _ No has visto nada como el nuevo Messenger, ¡te sorprenderá! http://explore.live.com/windows-live-messenger
Re: [PHP] php 5 and mysql failure
On Wed, Apr 30, 2008 at 2:31 AM, Yehudi Alexis Garrett [EMAIL PROTECTED] wrote: I'm using a php script which performs three xml queries to other three servers to retrieve a set of ids and after I do a query to mysql of the kind SELECT * FROM table WHERE id IN ('set of ids'); Although I'm sure the connection to the database is ok, I sometimes get an error of this kind: *Warning*: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in ... This does not happen every time i run the script, only sometimes. If I echo the query, copy and paste in phpmyadmin, or if I perform the same query in a script that does only the query without the rest it works! After troubleshooting this issue I noticed that it usually failed when I had a big set of ids (positive response from more than one server). This means that the script used a bigger amount of memory and probably more resources, but I did not get an out of memory error, I got the one described bfore. My question is, is there any kind of limit somewhere in php5 or in mysql? Thanks for help, YEHUDI GARRETT -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Have you tried output your SQL query and pasting it into mysql to see if it runs? Sounds to me like it isn't a valid query, that would give you that error. You may also want to put some row count checking prior to trying to fetch any rows. -- -Dan Joseph Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] PHP 5 file_get_contents() problems
On Sun, March 30, 2008 5:03 pm, php wrote: Thanks Greg...I am aware of the allow_url_fopen/allow_url_include relationship. Your suggestion to look into curl was implemented and there still seems to be something else afoot. I created a simple set of curl functions which just printed a remote url to the browser window. This tested well on an alternate test site which has PHP 5 running. However back on the hosting client I'm having problems with, curl throws the following error message: CURLE_COULDNT_RESOLVE_HOST (6) Couldn't resolve host. The given remote host was not resolved. A second test script, uses the popular PayPal Instant Payment Notification scheme which opens up a socket connection with the paypal server. Even this method of remote communition was defeated. So I'm lead to believe there is some other PHP configuration (or server configuration) which is stopping PHP from connecting with remove services. Can you SSH into the box and ping other domain names? If that box has messed up DNS, there is NO WAY php can fix it... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 file_get_contents() problems
On Sun, Mar 30, 2008 at 6:03 PM, php [EMAIL PROTECTED] wrote: Thanks Greg...I am aware of the allow_url_fopen/allow_url_include relationship. Your suggestion to look into curl was implemented and there still seems to be something else afoot. I created a simple set of curl functions which just printed a remote url to the browser window. This tested well on an alternate test site which has PHP 5 running. However back on the hosting client I'm having problems with, curl throws the following error message: CURLE_COULDNT_RESOLVE_HOST (6) Couldn't resolve host. The given remote host was not resolved. That's a DNS issue, not a PHP issue. Is this a shared web host, or one for which you have root access? If you have at least shell access without a jail (chroot), try PING'ing the domain from the server and see what happens. It could even be something as simple as a typo in the domain, but most likely it's a DNS resolution problem. If you want to test your script on a different server, let me know and I'll set you up with a temporary account on one of mine. -- /Daniel P. Brown Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 file_get_contents() problems
Thanks Greg...I am aware of the allow_url_fopen/allow_url_include relationship. Your suggestion to look into curl was implemented and there still seems to be something else afoot. I created a simple set of curl functions which just printed a remote url to the browser window. This tested well on an alternate test site which has PHP 5 running. However back on the hosting client I'm having problems with, curl throws the following error message: CURLE_COULDNT_RESOLVE_HOST (6) Couldn't resolve host. The given remote host was not resolved. A second test script, uses the popular PayPal Instant Payment Notification scheme which opens up a socket connection with the paypal server. Even this method of remote communition was defeated. So I'm lead to believe there is some other PHP configuration (or server configuration) which is stopping PHP from connecting with remove services. Chris Greg Bowser [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The actual setting is allow_url_fopen. allow_url_include controls whether or not you can use a remote URL as an include (however, if allow_url_fopen is off, then allow_url_include will also be off.) The short answer to your question is: yes, there is a way. Several ways, in fact. You could use curl, or you could use an Http client written in php. The latter involves using either the socket_ or the fsocket functions. * http://scripts.incutio.com/httpclient/ On Tue, Mar 18, 2008 at 10:11 AM, Chris [EMAIL PROTECTED] wrote: I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include is intended to limiting PHP from accessing scripts on other servers. I have read posts that suggest setting allow_url_include to ON as a solution. Well that's great if you have the ability to modify your php.ini. But what if you have an account on a shared hosting system and the hosting company will NOT make the requested change? Is there a work around to this or how would one access remote web services if allow_url_include is OFF. This looks like a huge problem since many services, like PayPal's IPN and Google maps geocoding, rely on communication with their servers. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 file_get_contents() problems
The actual setting is allow_url_fopen. allow_url_include controls whether or not you can use a remote URL as an include (however, if allow_url_fopen is off, then allow_url_include will also be off.) The short answer to your question is: yes, there is a way. Several ways, in fact. You could use curl, or you could use an Http client written in php. The latter involves using either the socket_ or the fsocket functions. * http://scripts.incutio.com/httpclient/ On Tue, Mar 18, 2008 at 10:11 AM, Chris [EMAIL PROTECTED] wrote: I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include is intended to limiting PHP from accessing scripts on other servers. I have read posts that suggest setting allow_url_include to ON as a solution. Well that's great if you have the ability to modify your php.ini. But what if you have an account on a shared hosting system and the hosting company will NOT make the requested change? Is there a work around to this or how would one access remote web services if allow_url_include is OFF. This looks like a huge problem since many services, like PayPal's IPN and Google maps geocoding, rely on communication with their servers. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 file_get_contents() problems
Quoting Chris [EMAIL PROTECTED]: I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include is intended to limiting PHP from accessing scripts on other servers. I have read posts that suggest setting allow_url_include to ON as a solution. Well that's great if you have the ability to modify your php.ini. But what if you have an account on a shared hosting system and the hosting company will NOT make the requested change? Is there a work around to this or how would one access remote web services if allow_url_include is OFF. This looks like a huge problem since many services, like PayPal's IPN and Google maps geocoding, rely on communication with their servers. Try ini_set(allow_url_include, 1); In your script. (not tested) If that doesn't help. You can use CURL for this : http://php.net/manual/en/ref.curl.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 file_get_contents() problems
for security reasons, allow_url_include can only be set from the main php.ini On Tue, Mar 18, 2008 at 10:22 AM, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Chris [EMAIL PROTECTED]: I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include is intended to limiting PHP from accessing scripts on other servers. I have read posts that suggest setting allow_url_include to ON as a solution. Well that's great if you have the ability to modify your php.ini. But what if you have an account on a shared hosting system and the hosting company will NOT make the requested change? Is there a work around to this or how would one access remote web services if allow_url_include is OFF. This looks like a huge problem since many services, like PayPal's IPN and Google maps geocoding, rely on communication with their servers. Try ini_set(allow_url_include, 1); In your script. (not tested) If that doesn't help. You can use CURL for this : http://php.net/manual/en/ref.curl.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 file_get_contents() problems
Quoting Greg Bowser [EMAIL PROTECTED]: for security reasons, allow_url_include can only be set from the main php.ini I wasn't sure about that one. Thanks for the correction. On Tue, Mar 18, 2008 at 10:22 AM, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Chris [EMAIL PROTECTED]: I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include is intended to limiting PHP from accessing scripts on other servers. I have read posts that suggest setting allow_url_include to ON as a solution. Well that's great if you have the ability to modify your php.ini. But what if you have an account on a shared hosting system and the hosting company will NOT make the requested change? Is there a work around to this or how would one access remote web services if allow_url_include is OFF. This looks like a huge problem since many services, like PayPal's IPN and Google maps geocoding, rely on communication with their servers. Try ini_set(allow_url_include, 1); In your script. (not tested) If that doesn't help. You can use CURL for this : http://php.net/manual/en/ref.curl.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 soap question
have you used soap ui http://www.soapui.org/ before? its a great tool for testing interaction w/ web services before you implement a client layer in your own code because it shows sent and received xml. -nathan On 9/28/07, Hurst, Michael S. [EMAIL PROTECTED] wrote: I am trying to find out how to use php 5 to access a wsdl with the following structure. How do you send parameters to the service if the wsdl is like the following. - s:element name=getPayment - s:complexType - s:sequence s:element minOccurs=0 maxOccurs=1 name=pi type=tns:paymentInput / /s:sequence /s:complexType /s:element - s:complexType name=paymentInput - s:sequence s:element minOccurs=0 maxOccurs=1 name=var1 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var2 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var3 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var4 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var5 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var6 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var7 type=s:string / /s:sequence /s:complexType It is similiar but I can find nothing that addresses this sort of structure and I am at a loss as how to send vars to the request using php 5. I have looked for several days and cannot figure this out. I didn't know if there was a page you could direct me to. Mike Hurst [EMAIL PROTECTED]
Re: [PHP] php 5 soap question
can you post the url of the wsdl ? -nathan On 9/28/07, Hurst, Michael S. [EMAIL PROTECTED] wrote: I am trying to find out how to use php 5 to access a wsdl with the following structure. How do you send parameters to the service if the wsdl is like the following. - s:element name=getPayment - s:complexType - s:sequence s:element minOccurs=0 maxOccurs=1 name=pi type=tns:paymentInput / /s:sequence /s:complexType /s:element - s:complexType name=paymentInput - s:sequence s:element minOccurs=0 maxOccurs=1 name=var1 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var2 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var3 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var4 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var5 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var6 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var7 type=s:string / /s:sequence /s:complexType It is similiar but I can find nothing that addresses this sort of structure and I am at a loss as how to send vars to the request using php 5. I have looked for several days and cannot figure this out. I didn't know if there was a page you could direct me to. Mike Hurst [EMAIL PROTECTED]
RE: [PHP] php 5 soap question
I would have to get approval before I can do that. I can probably post a portion of the wsdl but not sure that it would be something that is wanted to be made public in its current form. I will need to find out. Mike From: Nathan Nobbe [mailto:[EMAIL PROTECTED] Sent: Friday, September 28, 2007 2:27 PM To: Hurst, Michael S. Cc: php-general@lists.php.net Subject: Re: [PHP] php 5 soap question can you post the url of the wsdl ? -nathan On 9/28/07, Hurst, Michael S. [EMAIL PROTECTED] wrote: I am trying to find out how to use php 5 to access a wsdl with the following structure. How do you send parameters to the service if the wsdl is like the following. - s:element name=getPayment - s:complexType - s:sequence s:element minOccurs=0 maxOccurs=1 name=pi type=tns:paymentInput / /s:sequence /s:complexType /s:element - s:complexType name=paymentInput - s:sequence s:element minOccurs=0 maxOccurs=1 name=var1 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var2 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var3 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var4 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var5 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var6 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var7 type=s:string / /s:sequence /s:complexType It is similiar but I can find nothing that addresses this sort of structure and I am at a loss as how to send vars to the request using php 5. I have looked for several days and cannot figure this out. I didn't know if there was a page you could direct me to. Mike Hurst [EMAIL PROTECTED]
Re: [PHP] php 5 soap question
__getTypes() and __getFunctions() are your friends. They tell you alot about the functions and structure of parameters and return types. Rob Hurst, Michael S. wrote: I would have to get approval before I can do that. I can probably post a portion of the wsdl but not sure that it would be something that is wanted to be made public in its current form. I will need to find out. Mike From: Nathan Nobbe [mailto:[EMAIL PROTECTED] Sent: Friday, September 28, 2007 2:27 PM To: Hurst, Michael S. Cc: php-general@lists.php.net Subject: Re: [PHP] php 5 soap question can you post the url of the wsdl ? -nathan On 9/28/07, Hurst, Michael S. [EMAIL PROTECTED] wrote: I am trying to find out how to use php 5 to access a wsdl with the following structure. How do you send parameters to the service if the wsdl is like the following. - s:element name=getPayment - s:complexType - s:sequence s:element minOccurs=0 maxOccurs=1 name=pi type=tns:paymentInput / /s:sequence /s:complexType /s:element - s:complexType name=paymentInput - s:sequence s:element minOccurs=0 maxOccurs=1 name=var1 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var2 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var3 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var4 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var5 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var6 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var7 type=s:string / /s:sequence /s:complexType It is similiar but I can find nothing that addresses this sort of structure and I am at a loss as how to send vars to the request using php 5. I have looked for several days and cannot figure this out. I didn't know if there was a page you could direct me to. Mike Hurst [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 soap question
i recommend playing around w/ soap ui then; its helped me understand how to structure many requests using SoapClient and there is no doubt it has saved me a great deal of time. once you see the request xml that soap ui generates you can understand how to structure a call to the web service using SoapClient. -nathan On 9/28/07, Hurst, Michael S. [EMAIL PROTECTED] wrote: I would have to get approval before I can do that. I can probably post a portion of the wsdl but not sure that it would be something that is wanted to be made public in its current form. I will need to find out. Mike *From:* Nathan Nobbe [mailto:[EMAIL PROTECTED] *Sent:* Friday, September 28, 2007 2:27 PM *To:* Hurst, Michael S. *Cc:* php-general@lists.php.net *Subject:* Re: [PHP] php 5 soap question can you post the url of the wsdl ? -nathan On 9/28/07, *Hurst, Michael S.* [EMAIL PROTECTED] wrote: I am trying to find out how to use php 5 to access a wsdl with the following structure. How do you send parameters to the service if the wsdl is like the following. - s:element name=getPayment - s:complexType - s:sequence s:element minOccurs=0 maxOccurs=1 name=pi type=tns:paymentInput / /s:sequence /s:complexType /s:element - s:complexType name=paymentInput - s:sequence s:element minOccurs=0 maxOccurs=1 name=var1 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var2 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var3 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var4 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var5 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var6 type=s:string / s:element minOccurs=0 maxOccurs=1 name=var7 type=s:string / /s:sequence /s:complexType It is similiar but I can find nothing that addresses this sort of structure and I am at a loss as how to send vars to the request using php 5. I have looked for several days and cannot figure this out. I didn't know if there was a page you could direct me to. Mike Hurst [EMAIL PROTECTED]
Re: [PHP] php 5 and ms sql server express won't play nice !
... but the second comment seems helpful. [1] http://www.php.net/manual/en/function.mssql-connect.php For SQL Server 2005, getting the right version of that ntwdblib.dll is crucial. However, Microsoft has apparently abandoned the NTWDBLIB library, so I have begun working with PDO ODBC instead. (It isn't 100%, though.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and ms sql server express won't play nice !
with the suggested config i get the following Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (local)\SQLEXPRESS in C:\wamp\www\test\test.php on line 8 Couldn't connect to SQL Server on (local)\SQLEXPRESS this is my connection script ?php $myServer = (local)\SQLEXPRESS; $myUser = sa; $myPass = [EMAIL PROTECTED]; $myDB = WEBCOLTECH; //connection to the database $dbhandle = mssql_connect($myServer, $myUser, $myPass) or die(Couldn't connect to SQL Server on $myServer); On 8/16/07, Kirk Friggstad [EMAIL PROTECTED] wrote: SQL Server Express defaults to installing as a named instance - assuming that you're running Apache/PHP on the same machine as SQL Server Express, I believe you'll want to use (local)\SQLEXPRESS as the host to connect to. If it's on a different machine, you'll want to use MACHINENAME\SQLEXPRESS (replace MACHINENAME with the actual name of the computer SQL Express is running on). DISCLAIMER: I haven't actually tried using SQL Server with PHP, so I can't guarantee this will work. However, I have spent a lot of time working with SQL Server and ASP in a previous life, so I'd like to think that I have half a clue when it comes to connecting to it. :-) Hope this helps. Kirk On 8/16/07, Gregory Machin [EMAIL PROTECTED] wrote: Hi I have tried most of the configuration options in the php manual / examples http://www.php.net/function.mssql-connect and I just can't get it to connect I'm running WAMP5 and have enables php_mssql.dll extentions etc .. sql server 2005 express has both named pipes and tcp/ip conections enabled, both are installed on the same machine (xp pro)... this it the error I keep getting Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8 Couldn't connect to SQL Server on SQLEXPRESS Many Thanks in advance -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- _ Kirk Friggstad, Daft Viking Consulting email / msn / gtalk: [EMAIL PROTECTED] aim / skype: daftviking mobile / SMS: 306-867-0010 -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and ms sql server express won't play nice !
On 8/16/07, Gregory Machin [EMAIL PROTECTED] wrote: Hi I have tried most of the configuration options in the php manual / examples http://www.php.net/function.mssql-connect and I just can't get it to connect I'm running WAMP5 and have enables php_mssql.dll extentions etc .. sql server 2005 express has both named pipes and tcp/ip conections enabled, both are installed on the same machine (xp pro)... this it the error I keep getting Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8 Couldn't connect to SQL Server on SQLEXPRESS Many Thanks in advance -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za If you take a look at the comments at the manual page for mssql_connect [1], you see that a lot of people have reported problems with, but there are also some solutions. I don't know if they work, because I never had any MS SQL server (MySQL rocks ;-)), but the second comment seems helpful. Tijnema [1] http://www.php.net/manual/en/function.mssql-connect.php -- If this is a mailing list: DO NOT TOP POST! why?: http://www.caliburn.nl/topposting.html Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and ms sql server express won't play nice !
On 8/17/07, Gregory Machin [EMAIL PROTECTED] wrote: with the suggested config i get the following Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (local)\SQLEXPRESS in C:\wamp\www\test\test.php on line 8 Couldn't connect to SQL Server on (local)\SQLEXPRESS That's about all I had for bright ideas on this one, sorry - like I said, I haven't actually used PHP with MSSQL myself. The link Tijnema posted looks promising, though. Best of luck to you. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and ms sql server express won't play nice !
SQL Server Express defaults to installing as a named instance - assuming that you're running Apache/PHP on the same machine as SQL Server Express, I believe you'll want to use (local)\SQLEXPRESS as the host to connect to. If it's on a different machine, you'll want to use MACHINENAME\SQLEXPRESS (replace MACHINENAME with the actual name of the computer SQL Express is running on). DISCLAIMER: I haven't actually tried using SQL Server with PHP, so I can't guarantee this will work. However, I have spent a lot of time working with SQL Server and ASP in a previous life, so I'd like to think that I have half a clue when it comes to connecting to it. :-) Hope this helps. Kirk On 8/16/07, Gregory Machin [EMAIL PROTECTED] wrote: Hi I have tried most of the configuration options in the php manual / examples http://www.php.net/function.mssql-connect and I just can't get it to connect I'm running WAMP5 and have enables php_mssql.dll extentions etc .. sql server 2005 express has both named pipes and tcp/ip conections enabled, both are installed on the same machine (xp pro)... this it the error I keep getting Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: SQLEXPRESS in C:\wamp\www\test\test.php on line 8 Couldn't connect to SQL Server on SQLEXPRESS Many Thanks in advance -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- _ Kirk Friggstad, Daft Viking Consulting email / msn / gtalk: [EMAIL PROTECTED] aim / skype: daftviking mobile / SMS: 306-867-0010 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 upgrade and background script on unix
Frederic Belleudy wrote: Jochem: won't it? what does it do? does it go into and endless loop and bring your machine to a halt by any chance? .. because by looking at it, as long as $in['bg'] is not set and not equal to true it's going to keep spawning sub-shells with cmdlines that call itself. Me: You haven't read my message? yes I did. It works fine when Im running it from the shell the question was referring to what happens when running the exec() line via the apache php module, I had thought that that was obvious. When I do: `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1 21 /var/log/test.log ` you can see bg=1 its the passing arguments! any other suggestions? fix/debug it yourself. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 upgrade and background script on unix
Frederic Belleudy wrote: Hello there, I hope someone resolved the same issue. I upgraded my server to 5.2.1 I got some script that are running background script (generally we call this technic FORKING) Ive got a web interface that running (depending the action chosen) other scripts in the background. My issue is, it doesn't work anymore since my new upgrade. So I'm using this line to run my background script from the web browser interface: /usr/local/bin/php test.php 21 error.log and the [php] code that does the fork is what exactly?? if Im executing my script from the shell, my fork is working very fine! (Odd isn't it) I taught it could be owner and rights problems but it's not the case... Anyone got suggestions?? don't fork webserver processes, granted it doesn't fix the problem, but you really should be doing it anyway. I'm guessing that the pcntl extension is not compiled into the webserver php SAPI, it's a really big guess because you didn't supply the code you use to do the forking with. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 upgrade and background script on unix
don't fork webserver processes, granted it doesn't fix the problem, but you really should be doing it anyway. I'm guessing that the pcntl extension is not compiled into the webserver php SAPI, it's a really big guess because you didn't supply the code you use to do the forking with. Ok then you want to have the fork code! I'm doing a complete example My script is forking on itself. So from my browser I go on: http://localhost/test_fork.php My code in test_fork.php is : ? $in = get_shell_args($_SERVER['argv']); // DONT PAY ATTENTION TO THAT FUNCTION, it a made home function if($in['bg']) { print HERE; sleep(30); } else { print forking; `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1 21 /var/log/test.log ` } ? So Im assuming that the fork will get the bg argument, in this case I should receive HERE in /var/log/test.log (did tail -f /var/log/test.log while I was running the script) I've put a sleep 30 seconds to get the fork PID number. Unfortunately, when I do execute test_fork.php from the web, it wont execute itself in background. This method was running fine with my old config. The script works perfectly because if Im executing test_fork.php from the shell, the fork is working fine! __ NOD32 2162 (20070402) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- Frederic Belleudy Programmer PWIdeas ICQ #: 253-372-030 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 upgrade and background script on unix
Frederic Belleudy wrote: don't fork webserver processes, granted it doesn't fix the problem, but you really should be doing it anyway. I'm guessing that the pcntl extension is not compiled into the webserver php SAPI, it's a really big guess because you didn't supply the code you use to do the forking with. Ok then you want to have the fork code! 'want' is putting it strongly - unless of course your handing out AudiRS4's in which case 'want' is spot on. I'm doing a complete example My script is forking on itself. So from my browser I go on: http://localhost/test_fork.php My code in test_fork.php is : ? $in = get_shell_args($_SERVER['argv']); // DONT PAY ATTENTION TO THAT does $_SERVER['argv'] exist at all? does your error reporting include E_NOTICE? what is the value of the ini setting 'register_argc_argv'? FUNCTION, it a made home function if($in['bg']) { print HERE; sleep(30); } else { print forking; `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1 21 /var/log/test.log ` } ? So Im assuming that the fork will get the bg argument, in this case I should receive HERE in /var/log/test.log (did tail -f /var/log/test.log while I was running the script) I've put a sleep 30 seconds to get the fork PID number. no idea how the sleep() will help. Unfortunately, when I do execute test_fork.php from the web, it wont execute itself in background. won't it? what does it do? does it go into and endless loop and bring your machine to a halt by any chance? .. because by looking at it, as long as $in['bg'] is not set and not equal to true it's going to keep spawning sub-shells with cmdlines that call itself. This method was running fine with my old config. The script works perfectly because if Im executing test_fork.php from the shell, the fork is working fine! and what is the value of the ini setting 'register_argc_argv' when running via the php CLI SAPI? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 upgrade and background script on unix
Jochem: won't it? what does it do? does it go into and endless loop and bring your machine to a halt by any chance? .. because by looking at it, as long as $in['bg'] is not set and not equal to true it's going to keep spawning sub-shells with cmdlines that call itself. Me: You haven't read my message? It works fine when Im running it from the shell When I do: `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1 21 /var/log/test.log ` you can see bg=1 its the passing arguments! any other suggestions? Jochem Maas wrote: Frederic Belleudy wrote: don't fork webserver processes, granted it doesn't fix the problem, but you really should be doing it anyway. I'm guessing that the pcntl extension is not compiled into the webserver php SAPI, it's a really big guess because you didn't supply the code you use to do the forking with. Ok then you want to have the fork code! 'want' is putting it strongly - unless of course your handing out AudiRS4's in which case 'want' is spot on. I'm doing a complete example My script is forking on itself. So from my browser I go on: http://localhost/test_fork.php My code in test_fork.php is : ? $in = get_shell_args($_SERVER['argv']); // DONT PAY ATTENTION TO THAT does $_SERVER['argv'] exist at all? does your error reporting include E_NOTICE? what is the value of the ini setting 'register_argc_argv'? FUNCTION, it a made home function if($in['bg']) { print HERE; sleep(30); } else { print forking; `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1 21 /var/log/test.log ` } ? So Im assuming that the fork will get the bg argument, in this case I should receive HERE in /var/log/test.log (did tail -f /var/log/test.log while I was running the script) I've put a sleep 30 seconds to get the fork PID number. no idea how the sleep() will help. Unfortunately, when I do execute test_fork.php from the web, it wont execute itself in background. won't it? what does it do? does it go into and endless loop and bring your machine to a halt by any chance? .. because by looking at it, as long as $in['bg'] is not set and not equal to true it's going to keep spawning sub-shells with cmdlines that call itself. This method was running fine with my old config. The script works perfectly because if Im executing test_fork.php from the shell, the fork is working fine! and what is the value of the ini setting 'register_argc_argv' when running via the php CLI SAPI? -- Frederic Belleudy Programmer PWIdeas ICQ #: 253-372-030 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 upgrade and background script on unix
Jochem Maas wrote: Frederic Belleudy wrote: don't fork webserver processes, granted it doesn't fix the problem, but you really should be doing it anyway. I'm guessing that the pcntl extension is not compiled into the webserver php SAPI, it's a really big guess because you didn't supply the code you use to do the forking with. Ok then you want to have the fork code! 'want' is putting it strongly - unless of course your handing out AudiRS4's in which case 'want' is spot on. I'm doing a complete example My script is forking on itself. So from my browser I go on: http://localhost/test_fork.php My code in test_fork.php is : ? $in = get_shell_args($_SERVER['argv']); // DONT PAY ATTENTION TO THAT does $_SERVER['argv'] exist at all? does your error reporting include E_NOTICE? what is the value of the ini setting 'register_argc_argv'? FUNCTION, it a made home function if($in['bg']) { print HERE; sleep(30); } else { print forking; `/usr/local/bin/php /www/admin.gammacash.com/test/test_fork.php bg=1 21 /var/log/test.log ` } ? So Im assuming that the fork will get the bg argument, in this case I should receive HERE in /var/log/test.log (did tail -f /var/log/test.log while I was running the script) I've put a sleep 30 seconds to get the fork PID number. no idea how the sleep() will help. Unfortunately, when I do execute test_fork.php from the web, it wont execute itself in background. won't it? what does it do? does it go into and endless loop and bring your machine to a halt by any chance? .. because by looking at it, as long as $in['bg'] is not set and not equal to true it's going to keep spawning sub-shells with cmdlines that call itself. This method was running fine with my old config. The script works perfectly because if Im executing test_fork.php from the shell, the fork is working fine! and what is the value of the ini setting 'register_argc_argv' when running via the php CLI SAPI? the value is OFF but my other servers that is running php cli is set to OFF too... -- Frederic Belleudy Programmer PWIdeas ICQ #: 253-372-030 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and register_globals=off gives lotsa errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You said if(action==main) So ... it's really that or you would said if($action==main) ??? the $ is important so ... perhaps phpv4 ignore this kind of mistake and not php5 or perhaps action is when register global is on ... so if miss $ before var, add it, and try again if not work .. send a piece of code $action = $_GET[action]; if ($action == main) { /*** do think ... ***/ }... Have fun -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) - WinPT 1.0.1 iD8DBQFFm5YqEg3iyspSWPARAmVnAJ9cATO6+9XCdz+WeH3Hgu3BeG3YjwCfdPFw eNY6PAnmZIfjV7wGN//pMIs= =opLP -END PGP SIGNATURE-
Re: [PHP] php 5 and register_globals=off gives lotsa errors
It's NOT register_globals being off. It's E_NOTICE being on. You could turn E_NOTICE off and *ignore* these errors -- They are still there, you are just ignoring them. Or you could fix the script: $action = isset($_GET['action']) ? $_GET['action'] : ''; would be the replacement line for your first example. On Sat, December 30, 2006 7:21 pm, Wikus Moller wrote: Hi to all. I am having huge problems running my script, which worked fine on a server with php 4 and register_globals turned on, on a server with php 5 and register_globals turned off. I get errors around the area in my script where I use $_GET (not the only error). For example the following code on my index.php file which like many other sites I know, handles quite a large amount if(action==main); etc etc. : ? $action = $_GET[action]; //line 55 $sid = $_GET[sid]; //line 56 $page = $_GET[page]; //line 57 $who = $_GET[who]; //line 58 ? When I go to http://chillinglounge.net (where the error is located) I get the following error message(s): Notice: Undefined index: action in C:\websites\chillinglounge.net\public_html\index.php on line 55 Notice: Undefined index: sid in C:\websites\chillinglounge.net\public_html\index.php on line 56 Notice: Undefined index: page in C:\websites\chillinglounge.net\public_html\index.php on line 57 Notice: Undefined index: who in C:\websites\chillinglounge.net\public_html\index.php on line 58 Now if you would look at exactly the same script at http://ranterswap.net you'd see absolutely no errors. That's where I need your help. I know what is causing this error. I believe it's the fact that register_globals is turned off. But what I really want to know is: How do I fix it without trying to turn register_globals on via .htaccess (because it doesn't work)? Is there a function or some magic script that would to the trick? Or do I have to recode my entire script and how? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 and register_globals=off gives lotsa errors
You did more than just turn register_globals off. You also changed your error warning level. You have turned notices on. Set the same error warning level in your PHP 4 setup and you will see exactly the same messages. To be notice-free, your code should look like this: $action = isset($_GET['action']) ? $_GET['action'] : null; replace null in the above with whatever you want your default action to be there if it is not provided in the URL. -Rasmus Wikus Moller wrote: Hi to all. I am having huge problems running my script, which worked fine on a server with php 4 and register_globals turned on, on a server with php 5 and register_globals turned off. I get errors around the area in my script where I use $_GET (not the only error). For example the following code on my index.php file which like many other sites I know, handles quite a large amount if(action==main); etc etc. : ? $action = $_GET[action]; //line 55 $sid = $_GET[sid]; //line 56 $page = $_GET[page]; //line 57 $who = $_GET[who]; //line 58 ? When I go to http://chillinglounge.net (where the error is located) I get the following error message(s): Notice: Undefined index: action in C:\websites\chillinglounge.net\public_html\index.php on line 55 Notice: Undefined index: sid in C:\websites\chillinglounge.net\public_html\index.php on line 56 Notice: Undefined index: page in C:\websites\chillinglounge.net\public_html\index.php on line 57 Notice: Undefined index: who in C:\websites\chillinglounge.net\public_html\index.php on line 58 Now if you would look at exactly the same script at http://ranterswap.net you'd see absolutely no errors. That's where I need your help. I know what is causing this error. I believe it's the fact that register_globals is turned off. But what I really want to know is: How do I fix it without trying to turn register_globals on via .htaccess (because it doesn't work)? Is there a function or some magic script that would to the trick? Or do I have to recode my entire script and how? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
On 25/10/06, Ed Lazor [EMAIL PROTECTED] wrote: Hi, I wanted to give some feedback on PHP 5 hosting in case it helps someone. I signed up with DreamHost last Thursday. I also signed up with OCS Solutions to compare the two services. I also maintain a server with CalPop. When I signed up with Dreamhost, I discovered that you have to fill out a form and fax it to them, along with a rubbing of your credit card. Personally, I found that part rather annoying. They say it's for added security, but I've never had to do that with any other online transactions that I've done. OCS Solutions had me pay for a year up front, which always makes me nervous when checking out a new provider, but they do offer a money back guarantee. Actually, both providers offered a money back guarantee. DreamHost's is 97 days. That's pretty good. They require that you fax them a rub or your credit card?!? I certainly wouldn't do that! Cost-wise, both companies were fairly inexpensive. I ran a Google search for DreamHost Coupon and found a coupon that eliminated a majority of the up front cost. Actually, I was pretty surprised. They give you a free domain registration that includes private whois for free. After the coupon, I paid $9.90 and covered the start-up fee (normally $45), the first month of service, and the domain registration. It feels like I paid for a domain registration and got free hosting for a month. Nice! My account with DreamHost was created on Monday. Technically, it took 5 days to get my account set up. That's the longest set up delay I've ever experienced with any host provider. OCS Solutions called me an hour after signing up and had my account setup shortly thereafter. That's all it should take. I also registered a domain when signing up with OCS Solutions. The whois was wrong. Somehow it ended up showing as registered to one of their employees, but I called and they quickly fixed it. The account was set up under the wrong username, but they fixed that quickly, along with problems with cpanel when it doesn't handle the name change correctly. Mistakes were made, but I was really pleased with how easy it was to get help and I was really happy with how much people obviously cared about helping out. After signing up with DreamHost, the domain that I'd registered with them wasn't working. I was exploring their control panel to figure out the problem when I came upon a DNS management page. The page automatically identified and fixed the problem. That was impressive. Also, I started exploring the DreamHost forums after signing up, something I almost wish I'd done beforehand. I found a lot of posts from very disgruntled customers. It sounds as if they've been running into problems lately on their servers. People complain A LOT about the lack of phone support from DreamHost... you have to submit a trouble ticket for everything. If your account subscription is high enough, they offer a limited number of call backs. The worst part was reading debates between the really happy and the really unhappy DreamHost clients. A lot of the discussions boiled down to verbal attacks between customers. I'm honestly surprised DreamHost didn't intervene. One last thing with OCS, the plan I started on turned out to be insufficient for my needs. I talked with them and they came up with a new plan that does everything I want and just charged me a little more to cover the difference. End result so far... CalPop: I've always had problems with the initial set up of servers at CalPop. Talking with their tech support on the phone is a nightmare; there's something wrong with their phone lines (seems like a really bad voice over IP solution). It usually takes way too many emails to resolve problems. I've also experienced a lot of hardware failures, which makes me wonder about the quality of parts they purchase. Once the server works though, everything seems to settle down until the next problem shows up. DreamHost: Best prices, low service. It seems like DreamHost is run by and tailored toward experienced techies. That's fine, I can work with that. I'm willing to try working with limited phone support. I'm really only concerned with delays I might experience when a problem shows up in something that's mission critical. Beyond that, there are a lot of features available here that aren't elsewhere. I'm getting great value for my money. OCS Solutions: Good prices, but you have to pay up front. Best customer service I've experienced from an ISP so far. I feel a lot more comfortable using them for anything mission critical. Dotan http://what-is-what.com/what_is/java.html http://lyricslist.com/lyrics/artist_albums/345/metallica.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
On Fri, October 27, 2006 7:18 am, Dotan Cohen wrote: On 25/10/06, Ed Lazor [EMAIL PROTECTED] wrote: When I signed up with Dreamhost, I discovered that you have to fill out a form and fax it to them, along with a rubbing of your credit card. Personally, I found that part rather annoying. They say it's They require that you fax them a rub or your credit card?!? I certainly wouldn't do that! I *think* they do this only when the credit card does not sail through automatically. Like if you give a shipping address different from your home, or your cell-phone instead of home phone, and then the ultra-stringent CC checks they have turned on kick back the transaction as suspect. Or so they explained it to me, when I had the same reaction. At that point, I suspect you'd be faster to start over and be more careful about matching up your CC input with what the bank has on file PS A Sharpie does not make a good rubbing tool, no matter how gently you try to press. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
Hi, I wanted to give some feedback on PHP 5 hosting in case it helps someone. I signed up with DreamHost last Thursday. I also signed up with OCS Solutions to compare the two services. I also maintain a server with CalPop. When I signed up with Dreamhost, I discovered that you have to fill out a form and fax it to them, along with a rubbing of your credit card. Personally, I found that part rather annoying. They say it's for added security, but I've never had to do that with any other online transactions that I've done. OCS Solutions had me pay for a year up front, which always makes me nervous when checking out a new provider, but they do offer a money back guarantee. Actually, both providers offered a money back guarantee. DreamHost's is 97 days. That's pretty good. Cost-wise, both companies were fairly inexpensive. I ran a Google search for DreamHost Coupon and found a coupon that eliminated a majority of the up front cost. Actually, I was pretty surprised. They give you a free domain registration that includes private whois for free. After the coupon, I paid $9.90 and covered the start-up fee (normally $45), the first month of service, and the domain registration. It feels like I paid for a domain registration and got free hosting for a month. My account with DreamHost was created on Monday. Technically, it took 5 days to get my account set up. That's the longest set up delay I've ever experienced with any host provider. OCS Solutions called me an hour after signing up and had my account setup shortly thereafter. I also registered a domain when signing up with OCS Solutions. The whois was wrong. Somehow it ended up showing as registered to one of their employees, but I called and they quickly fixed it. The account was set up under the wrong username, but they fixed that quickly, along with problems with cpanel when it doesn't handle the name change correctly. Mistakes were made, but I was really pleased with how easy it was to get help and I was really happy with how much people obviously cared about helping out. After signing up with DreamHost, the domain that I'd registered with them wasn't working. I was exploring their control panel to figure out the problem when I came upon a DNS management page. The page automatically identified and fixed the problem. That was impressive. Also, I started exploring the DreamHost forums after signing up, something I almost wish I'd done beforehand. I found a lot of posts from very disgruntled customers. It sounds as if they've been running into problems lately on their servers. People complain A LOT about the lack of phone support from DreamHost... you have to submit a trouble ticket for everything. If your account subscription is high enough, they offer a limited number of call backs. The worst part was reading debates between the really happy and the really unhappy DreamHost clients. A lot of the discussions boiled down to verbal attacks between customers. I'm honestly surprised DreamHost didn't intervene. One last thing with OCS, the plan I started on turned out to be insufficient for my needs. I talked with them and they came up with a new plan that does everything I want and just charged me a little more to cover the difference. End result so far... CalPop: I've always had problems with the initial set up of servers at CalPop. Talking with their tech support on the phone is a nightmare; there's something wrong with their phone lines (seems like a really bad voice over IP solution). It usually takes way too many emails to resolve problems. I've also experienced a lot of hardware failures, which makes me wonder about the quality of parts they purchase. Once the server works though, everything seems to settle down until the next problem shows up. DreamHost: Best prices, low service. It seems like DreamHost is run by and tailored toward experienced techies. That's fine, I can work with that. I'm willing to try working with limited phone support. I'm really only concerned with delays I might experience when a problem shows up in something that's mission critical. Beyond that, there are a lot of features available here that aren't elsewhere. I'm getting great value for my money. OCS Solutions: Good prices, but you have to pay up front. Best customer service I've experienced from an ISP so far. I feel a lot more comfortable using them for anything mission critical. On Oct 11, 2006, at 10:12 PM, Kyle wrote: Hello, I would suggest dreamhost at www.dreamhost.com. Their prices look a bit hefty at first but there are referral codes all over the internet and you can end up saving $97. Their plans have tons of bandwidth and space and I haven't had any trouble with it. But I would suggest them highly, their service is quite impressive. And if you don't like the PHP features
Re: [PHP] PHP 5 Hosting
take look www.site5.com On Thursday 12 October 2006 00:59, Ed Lazor wrote: Anyone ever use A2Hosting.com? Or better yet, any recommendations on a PHP 5 web hosting company that you're happy with - measured in terms of quality support, they know what they're doing, and they have good prices? Bonus points for good drive space, bandwidth, and SSH access. I ran a Google search and came up with several options. A2Hosting.com seems the best so far. My only reservation is that they offer 24/7 support through a message service who will page a tech who in turn will call you back - seems sketchy and I can imagine trying to talk someone into going to the server room at 2am. I also checked out many of the other options, but some of them seemed even more sketchy... like VisualWebHosting.com... you click on their link for a BBB review and it brings up another company entirely... and you call their number and all the greeting says is Please leave a message... bep... pretty scary if you ask me. Anyway, thanks in advance for any recommendations you have. -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
Thanks for the feedback Kyle, much appreciated. DreamHost does look pretty good price-wise. Two others I was referred to are HostBaby.com and OCSSolutions.com. Have a good one :) -Ed On Oct 11, 2006, at 10:12 PM, Kyle wrote: Hello, I would suggest dreamhost at www.dreamhost.com. Their prices look a bit hefty at first but there are referral codes all over the internet and you can end up saving $97. Their plans have tons of bandwidth and space and I haven't had any trouble with it. But I would suggest them highly, their service is quite impressive. And if you don't like the PHP features they let you compile you own! Good Luck with it! Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
Hello, I would suggest dreamhost at www.dreamhost.com. Their prices look a bit hefty at first but there are referral codes all over the internet and you can end up saving $97. Their plans have tons of bandwidth and space and I haven't had any trouble with it. But I would suggest them highly, their service is quite impressive. And if you don't like the PHP features they let you compile you own! Good Luck with it! Kyle Ed Lazor wrote: Anyone ever use A2Hosting.com? Or better yet, any recommendations on a PHP 5 web hosting company that you're happy with - measured in terms of quality support, they know what they're doing, and they have good prices? Bonus points for good drive space, bandwidth, and SSH access. I ran a Google search and came up with several options. A2Hosting.com seems the best so far. My only reservation is that they offer 24/7 support through a message service who will page a tech who in turn will call you back - seems sketchy and I can imagine trying to talk someone into going to the server room at 2am. I also checked out many of the other options, but some of them seemed even more sketchy... like VisualWebHosting.com... you click on their link for a BBB review and it brings up another company entirely... and you call their number and all the greeting says is Please leave a message... bep... pretty scary if you ask me. Anyway, thanks in advance for any recommendations you have. -Ed --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, PDO in debian
Martin Marques wrote: Does anyone have an idea on when PDO is going to be available in Debian? not a clue... http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348882 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, PDO in debian
On Mon, 2 Oct 2006, David Tulloh wrote: Martin Marques wrote: Does anyone have an idea on when PDO is going to be available in Debian? not a clue... http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348882 Saw that already yesterday, but it's from the begining of this year. It's so frustrating. -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 - Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática| '@' || 'unl.edu.ar'; Universidad Nacional| DBA, Programador, del Litoral | Administrador - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, PDO in debian
On Mon, 2006-10-02 at 10:33 -0300, Martin Marques wrote: On Mon, 2 Oct 2006, David Tulloh wrote: Martin Marques wrote: Does anyone have an idea on when PDO is going to be available in Debian? use www.dotdeb.org sources list. Its bleeding edge, but works OK. --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5....
Thanks guys, Will contact the admin and see what can be done, your replies really helped me and I appreciate it. Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5....
Ryan A wrote: Hi, Something strange and dont really know what to expect so was hoping you more experienced PHP 5 people can help me out. btw which minor version of php5 your running is important ... plenty of things have changed in [semi] breaking ways between minor php5 versions. We have been given a development server thats running php5 with MySql Client API version 5.0.22 (didnt know there was one that high) the problem is, we have to develop on this and then when its done the app will be moved to a php 4 final server... I have been reading and i see that there are some php4 functions that act strange on php5 (like strpos) what's wrong with strpos() in php5? are you perchance using multibyte strings without using the mb_string function overloading stuff? are there any other things I should be aware of? the fact that objects are always references in php5 and in php4 you have to use '' everwhere to make sure your always talking to the same object (using the '' notation in php5 will give you NOTICEs or WARNINGS depending on the minor version) that and a million other little things like certain functions not being available :-) If you think it would be too much of a hassle, do you think i should request the admin to install php 4 instead and scrap this installation? YES. *at the very least* it will be a pain to dev on php5 and go to production on a php4. I have also seen many sites having php4 and 5 on the same machine, this is a windows server, is there any easy way to do that here? sorry I'm clueless regardless IIS. Thanks! Ryan --- The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP 5...
It's silly to have two different environments like that. Either code the thing in PHP4. or upgrade the production environment to PHP5. DÆVID -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 6:08 AM To: php php Subject: [PHP] PHP 5... Hi, Something strange and dont really know what to expect so was hoping you more experienced PHP 5 people can help me out. We have been given a development server thats running php5 with MySql Client API version 5.0.22 (didnt know there was one that high) the problem is, we have to develop on this and then when its done the app will be moved to a php 4 final server... I have been reading and i see that there are some php4 functions that act strange on php5 (like strpos) are there any other things I should be aware of? If you think it would be too much of a hassle, do you think i should request the admin to install php 4 instead and scrap this installation? I have also seen many sites having php4 and 5 on the same machine, this is a windows server, is there any easy way to do that here? Thanks! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5...
Unless there is some specific reason that you need this code to run on both php4 and php5, then inform your boss/admin that the idea of developing on php5, to deploy on php4 is nuts. If they disagree inform them that they are personally nuts( tell them some guy on the internet said so ). It may be possible to develop php5 code in a php5 env, if you are intimately familiar with the differences between php4 and php5, but if you're that familiar with PHP, then you're worth more than a half-ass software creation enviornment. Basicly it's a catch22 if you're good enough to be able to cope with this enviornment, you shouldn't have to.
RE: [PHP] PHP 5, Windows, and MySQL
I have done everything that everyone has suggested here, and 1000 other variations that I have found along the way. So if I'm doing something wrong - please let me know, 'cause I don't see it. MySQL 4.1 has been working great for 4 years and PHP4.4 gives me no problems. Anything 5 and above won't work. Windows is 2000 SP4. PHP is installed as an ISAPI module. ;cgi.force_redirect = 1 libmysql.dll is in /winnt, /system, /sytem32, /php and php is in my path. If it can't find it it ain't looking hard enough. I've also tried many variations of this. The error below is similar to what I got. I was also getting memory errors, but don't have that one to post. Results: Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 Content-type: text/html X-Powered-By: PHP/5.0.0 php running Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\CAFGPHP\test.php on line 4 PHP Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 Thanks -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED] Sent: June 26, 2006 7:43 PM To: Beauford Subject: Re: [PHP] PHP 5, Windows, and MySQL Well, I don't know what you mean by a known issue. All your message says is that PHP 5 does not support MySQL. Yes, it does. It has no problem. I have installed it and used it a million times. So, you are doing something wrong. Did you test PHP 5 by itself, to make sure that it works without accessing MySQL? Did you test MySQL by itself, to be sure the server is running correctly when it is accessed outside of PHP 5. Did you install MysQL using its installer? That's the best way. What version of MySQL? What Windows? Did you turn cgi.force_redirect off in the php.ini file? You have to do that if you are using IIS. What error do you get? Janet Beauford wrote: From what I have been reading this is a known issue with PHP5. There is something in the php_mysql.dll which is not compatible. I wasted 3 hours today trying all the tips and tricks I could find, but the bottom line is that it won't work. This was my reason for posting to this group to see if anyone has any ideas. Here is one of the many links I was looking at to try and solve this. http://codewalkers.com/forum/index.php?action=displaythreadforum=php elpid =370realm=default Thanks -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED] Sent: June 26, 2006 4:08 PM To: Beauford Subject: Re: [PHP] PHP 5, Windows, and MySQL Activating MySQL in PHP 5 is pretty simple. Open the php.ini file and uncomment the line for the extension that you want to use--php_mysql.dll or php_mysqli.dll. Restart the web server. Using the mysql functions is described in the php documentation. http://us3.php.net/manual/en/ref.mysql.php or http://us3.php.net/manual/en/ref.mysqli.php Janet Beauford wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- Janet Valade
Re: [PHP] PHP 5, Windows, and MySQL
Beauford wrote: I have done everything that everyone has suggested here, and 1000 other variations that I have found along the way. So if I'm doing something wrong - please let me know, 'cause I don't see it. MySQL 4.1 has been working great for 4 years and PHP4.4 gives me no problems. Anything 5 and above won't work. Windows is 2000 SP4. PHP is installed as an ISAPI module. ;cgi.force_redirect = 1 libmysql.dll is in /winnt, /system, /sytem32, /php and php is in my path. If it can't find it it ain't looking hard enough. I've also tried many variations of this. The error below is similar to what I got. I was also getting memory errors, but don't have that one to post. Results: Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 It's not that the file can't be found, it's something inside the file breaking. Otherwise it would just say unable to find php_mysql.dll. I'd say it's finding the mysql4 version of the dll and trying to include it which ain't going to work if you want to talk to a mysql5 server. http://bugs.php.net/bug.php?id=24621 -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, Windows, and MySQL
Chris wrote: Beauford wrote: I have done everything that everyone has suggested here, and 1000 other variations that I have found along the way. So if I'm doing something wrong - please let me know, 'cause I don't see it. MySQL 4.1 has been working great for 4 years and PHP4.4 gives me no problems. Anything 5 and above won't work. Windows is 2000 SP4. PHP is installed as an ISAPI module. ;cgi.force_redirect = 1 libmysql.dll is in /winnt, /system, /sytem32, /php and php is in my path. If it can't find it it ain't looking hard enough. I've also tried many variations of this. The error below is similar to what I got. I was also getting memory errors, but don't have that one to post. Results: Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 It's not that the file can't be found, it's something inside the file breaking. Otherwise it would just say unable to find php_mysql.dll. I'd say it's finding the mysql4 version of the dll and trying to include it which ain't going to work if you want to talk to a mysql5 server. http://bugs.php.net/bug.php?id=24621 There is a nice tool called dependencywalker which can help you resolve problems with loading dlls http://www.dependencywalker.com Cheers -- David Robley It's okay to be ugly...but aren't you overdoing it? Today is Prickle-Prickle, the 33rd day of Confusion in the YOLD 3172. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, Windows, and MySQL
On Mon, 2006-06-26 at 13:50, Beauford wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 The fact that you get an invalid resource error from a mysql_xxx() function indicates that you do indeed have a working MySQL lib. Looking at the error further indicates that you are not passing a valid mysql result handle to the function. Please show us the rest of the code where you perform the query and attempt to retrieve the result. Since I see no errors about connecting to the MySQL database, I assume that you have that part working. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, Windows, and MySQL
I use apache2triad (http://apache2triad.net/) which is an AMP package with PHP 5. I vaguely remember the first time I installed it (on Win XP Pro though) I got similar problems with MySQL. I uninstalled it and reinstalled as I wasn't sure if I accidentally clicked a dialog box without reading what it said then it worked ok. HTH... PS - I had GD working ok on a simple thumbnail generation script. On 26/06/06, Beauford [EMAIL PROTECTED] wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tom Chubb [EMAIL PROTECTED] 07915 053312
RE: [PHP] PHP 5, Windows, and MySQL
From what I have been reading this is a known issue with PHP5. There is something in the php_mysql.dll which is not compatible. I wasted 3 hours today trying all the tips and tricks I could find, but the bottom line is that it won't work. This was my reason for posting to this group to see if anyone has any ideas. Here is one of the many links I was looking at to try and solve this. http://codewalkers.com/forum/index.php?action=displaythreadforum=phphelpid =370realm=default Thanks -Original Message- From: Janet Valade [mailto:[EMAIL PROTECTED] Sent: June 26, 2006 4:08 PM To: Beauford Subject: Re: [PHP] PHP 5, Windows, and MySQL Activating MySQL in PHP 5 is pretty simple. Open the php.ini file and uncomment the line for the extension that you want to use--php_mysql.dll or php_mysqli.dll. Restart the web server. Using the mysql functions is described in the php documentation. http://us3.php.net/manual/en/ref.mysql.php or http://us3.php.net/manual/en/ref.mysqli.php Janet Beauford wrote: Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- Janet Valade -- janet.valade.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 + Apache 2 on Windows: ms sql extension problem
This setup nagged me for a bit too, until I found the solution... The DLL files in C:\php need to be put into system32 directory. Once that happens they work like a charm, but until then, you are plagued with issues. I have my path set for C:\php and everything as well, but it was not until copying the DLLs into the C:\Windows\System32 that everything started working. Thankfully Google held the answer. Wolf I checked phpinfo() and it tells that my php.ini file is at the correct location (C:\winnt\php.ini.) I can load other extensions. Another example: if I add php_curl.dll then I get a libsleay32.dll not found error message when I try to restart apache. But I do not get any error message about the php_mssql.dll. It is just not loaded. I'm sure that all the ms sql client libs are installed, because this is the same machine where the ms sql server is running. What can be the problem? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP 5 + Apache 2 on Windows: ms sql extension problem
Try changing your direcive extension_dir: extension_dir=C:/PHP/ext instead of extension_dir=C:\PHP\ext -Mensaje original- De: Laszlo Nagy [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 26 de Abril de 2006 04:01 a.m. Para: php-general@lists.php.net Asunto: [PHP] PHP 5 + Apache 2 on Windows: ms sql extension problem Hello All, I had a problem with a Win2003 server, IIS6 and PHP 5.1.2. The MS SQL extension was not working. I did not get an answer, but some people suggested me to use Apache. Now I installed Win 2000 server, Apache 2.0.55 and PHP 5.1.2. The same computer has Microsoft SQL Server installed. I have only these lines in my php.ini file: extension_dir=C:\PHP\ext extension=php_mssql.dll I checked phpinfo() and it tells that my php.ini file is at the correct location (C:\winnt\php.ini.) I can load other extensions. Another example: if I add php_curl.dll then I get a libsleay32.dll not found error message when I try to restart apache. But I do not get any error message about the php_mssql.dll. It is just not loaded. I'm sure that all the ms sql client libs are installed, because this is the same machine where the ms sql server is running. What can be the problem? Please help me. My bosses are killing me because I could not solve this problem for weeks. :-( Thanks, Laszlo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
At 01:39 AM 3/17/2006, - Edwin - wrote: Hi! On Thu, 16 Mar 2006 20:45:29 -0400 Miles Thompson [EMAIL PROTECTED] wrote: At 06:23 PM 3/16/2006, Anthony Ettinger wrote: [...] Is there a drawback to running php5 as CGI? Anthony, I really don't know, because computers are much faster, so there may not be the time lags there were 10 years ago. As I understand CGI, the web server sees that the page is of type .php, starts up PHP, PHP processes the page, the web server shuts down PHP and sends out the results. The overhead of starting and stopping PHP (or Perl, etc.) was the complaint. When PHP is loaded as an Apache module there is not startup / shutdown overhead. If I have this wrong, or if PHP5 as a CGI stays resident and there is no penalty, will someone please correct me. No, nothing wrong there, I think. But there are other differences. (Like some functions not working, etc.) Pros and cons, one might say. Anyway, here are some results of a quick google search: http://www.google.com/search?q=php+CGI+module+difference Hmm.. I just couldn't find it but there should be a page about it on www.php.net ... (^_-) Regards - Miles HTH, - Edwin - Thanks Edwin. I guess it was too late and I couldn't formulate a proper search expression. I'd like to hear Chris Shiflet's opinion on the security advantages of running PHP5 as CGI. Why, after years of running PHP as an Apache module, the sudden conversion to CGI operation? I've noticed occasional references of PHP5 having issues with CPanel. Is it simply easier for ISPs, given the intense competitive cost pressures they are under, to not wrestle with these issues, but to say Here it is as a CGI if you want it. Regards - Miles Thompson -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
Is there a drawback to running php5 as CGI? Anthony, I really don't know, because computers are much faster, so there may not be the time lags there were 10 years ago. As I understand CGI, the web server sees that the page is of type .php, starts up PHP, PHP processes the page, the web server shuts down PHP and sends out the results. The overhead of starting and stopping PHP (or Perl, etc.) was the complaint. When PHP is loaded as an Apache module there is not startup / shutdown overhead. If I have this wrong, or if PHP5 as a CGI stays resident and there is no penalty, will someone please correct me. No, nothing wrong there, I think. But there are other differences. (Like some functions not working, etc.) Pros and cons, one might say. Anyway, here are some results of a quick google search: http://www.google.com/search?q=php+CGI+module+difference Hmm.. I just couldn't find it but there should be a page about it on www.php.net ... (^_-) Regards - Miles HTH, - Edwin - Thanks Edwin. I guess it was too late and I couldn't formulate a proper search expression. I'd like to hear Chris Shiflet's opinion on the security advantages of running PHP5 as CGI. Why, after years of running PHP as an Apache module, the sudden conversion to CGI operation? I've noticed occasional references of PHP5 having issues with CPanel. Is it simply easier for ISPs, given the intense competitive cost pressures they are under, to not wrestle with these issues, but to say Here it is as a CGI if you want it. One major difference is the CGI runs as your user - whereas the apache module runs as the apache user which can cause problems with permissions etc (hence safe-mode and open-basedir to try and restrict what you can do). -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CPanel, PHP5 as CGI (was Re: [PHP] php 5 installation problem)
Hi! On Fri, 17 Mar 2006 08:24:51 -0400 Miles Thompson wrote: Thanks Edwin. I guess it was too late and I couldn't formulate a proper search expression. I'd like to hear Chris Shiflet's opinion on the security advantages of running PHP5 as CGI. That'd be nice. But as somebody pointed out earlier, one of the advantages is that PHP can run as another user instead of as the apache user. (Of course, it's still considered rather slooow though.) Anyway, there are some more info here: http://www.php.net/manual/en/security.cgi-bin.php Why, after years of running PHP as an Apache module, the sudden conversion to CGI operation? Remember, Miles, *your* $Web_Hosting_Company decides (or better yet, *you* decide) whether PHP5 should run as CGI or as an apache module. ;-) I've noticed occasional references of PHP5 having issues with CPanel. I think it was also pointed earlier (somewhere) that it's the other way around. :-) Is it simply easier for ISPs, given the intense competitive cost pressures they are under, to not wrestle with these issues, but to say Here it is as a CGI if you want it. I really have no idea (read: lazy to check now ;-) ) what CPanel is. If it is a program written in PHP (4?), they could just fix it to work with PHP5 -- CGI mode or not. Regards - Miles Thompson Regards, - Edwin - -- The showing of partiality is not good, nor that an able-bodied man should transgress over a mere piece of bread. - Proverbs 28:21 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CPanel, PHP5 as CGI (was Re: [PHP] php 5 installation problem)
Edwin wrote: I really have no idea (read: lazy to check now ;-) ) what CPanel is. If it is a program written in PHP (4?), they could just fix it to work with PHP5 -- CGI mode or not. I sure would like to know because two of my host can't install PHP 5 due to problems they have with CPanel and PHP 5 working together. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CPanel, PHP5 as CGI (was Re: [PHP] php 5 installation problem)
Ask them to install PHP5 to work with only .php5 extensioned files. They have no interoperability issues - you have access to PHP 5. PHP4 and PHP5 can safely coexist on the same server like this, as they aren't serving up the same files... -Myk OLeary [EMAIL PROTECTED] BLOG: http://www.blueneedle.com/wordpress/?bnphplists On Mar 17, 2006, at 7:17 AM, tedd wrote: Edwin wrote: I really have no idea (read: lazy to check now ;-) ) what CPanel is. If it is a program written in PHP (4?), they could just fix it to work with PHP5 -- CGI mode or not. I sure would like to know because two of my host can't install PHP 5 due to problems they have with CPanel and PHP 5 working together. tedd -- -- -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
tedd wrote: Hi gang: I asked my host to install the current versions of php 5 and the following was his answer: Sorry but php has some issues with cpanel. cpanel has issues with php5 not the other way around :-) Anyone heard of any problems or a work-around? get a different hosting provider. ;-) in the mean time why not install a cpoy of apache/php5/mysql/etc on your local PC and play with that? Thanks. tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
dreamhost let's you choose php4 or 5, as I'm sure others do as well. On 3/16/06, Jochem Maas [EMAIL PROTECTED] wrote: tedd wrote: Hi gang: I asked my host to install the current versions of php 5 and the following was his answer: Sorry but php has some issues with cpanel. cpanel has issues with php5 not the other way around :-) Anyone heard of any problems or a work-around? get a different hosting provider. ;-) in the mean time why not install a cpoy of apache/php5/mysql/etc on your local PC and play with that? Thanks. tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
At 05:40 PM 3/16/2006, Anthony Ettinger wrote: dreamhost let's you choose php4 or 5, as I'm sure others do as well. snipped all 'dat stuff A little more on dreamhost. PHP5 is installed as CGI, not Apache module. Does anyone have any experience with Nexcess.net -- advertisers on back page of PHP | Architect? At hub.org you can install anything - virtual server. Cheers - Miles -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
On 3/16/06, Miles Thompson [EMAIL PROTECTED] wrote: At 05:40 PM 3/16/2006, Anthony Ettinger wrote: dreamhost let's you choose php4 or 5, as I'm sure others do as well. snipped all 'dat stuff A little more on dreamhost. PHP5 is installed as CGI, not Apache module. Is there a drawback to running php5 as CGI? -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
At 06:23 PM 3/16/2006, Anthony Ettinger wrote: On 3/16/06, Miles Thompson [EMAIL PROTECTED] wrote: At 05:40 PM 3/16/2006, Anthony Ettinger wrote: dreamhost let's you choose php4 or 5, as I'm sure others do as well. snipped all 'dat stuff A little more on dreamhost. PHP5 is installed as CGI, not Apache module. Is there a drawback to running php5 as CGI? -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html Anthony, I really don't know, because computers are much faster, so there may not be the time lags there were 10 years ago. As I understand CGI, the web server sees that the page is of type .php, starts up PHP, PHP processes the page, the web server shuts down PHP and sends out the results. The overhead of starting and stopping PHP (or Perl, etc.) was the complaint. When PHP is loaded as an Apache module there is not startup / shutdown overhead. If I have this wrong, or if PHP5 as a CGI stays resident and there is no penalty, will someone please correct me. Regards - Miles -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 5 installation problem
Hi! On Thu, 16 Mar 2006 20:45:29 -0400 Miles Thompson [EMAIL PROTECTED] wrote: At 06:23 PM 3/16/2006, Anthony Ettinger wrote: [...] Is there a drawback to running php5 as CGI? Anthony, I really don't know, because computers are much faster, so there may not be the time lags there were 10 years ago. As I understand CGI, the web server sees that the page is of type .php, starts up PHP, PHP processes the page, the web server shuts down PHP and sends out the results. The overhead of starting and stopping PHP (or Perl, etc.) was the complaint. When PHP is loaded as an Apache module there is not startup / shutdown overhead. If I have this wrong, or if PHP5 as a CGI stays resident and there is no penalty, will someone please correct me. No, nothing wrong there, I think. But there are other differences. (Like some functions not working, etc.) Pros and cons, one might say. Anyway, here are some results of a quick google search: http://www.google.com/search?q=php+CGI+module+difference Hmm.. I just couldn't find it but there should be a page about it on www.php.net ... (^_-) Regards - Miles HTH, - Edwin - -- Give to a wise person and he will become still wiser. Impart knowledge to someone righteous and he will increase in learning. - Proverbs 9:9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Backwards Compatability
Tod Thomas wrote: Is their a list of portability problems to be aware of when switching from v4 to v5? Maybe a table that compares the two? Thanks. You can start here: http://www.zend.com/php5/migration.php Silvio -- tradeOver | http://www.tradeover.net ...ready to become the King of the World? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Backwards Compatability
Tod Thomas wrote: Is their a list of portability problems to be aware of when switching from v4 to v5? Maybe a table that compares the two? other than the stuff on php.net (no comparison tables exactly) not really - plenty of people on this list that will help you if you run into problems. sidenote: the reference related fixes introduced into php4.4 (and php5+) can be a PITA, avoid using references unless you.. a, really know what you are doing. b, you really need a reference. ...objects in php5 don't need to be passed around by reference - in fact I suggest the first thing you do when updating your code is to remove reference syntax related to passing around objects :-) Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 OO performance exceptions
Some more thought. To solve this problem would be necessary to create some utility class like System in java and that way should be possible to do a System::echo($string) based on type, i guess this can be accomplished using overloading. Am I making any sense? - Original Message - From: [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, November 10, 2005 6:47 PM Subject: Re: [PHP] PHP 5 OO performance exceptions I was not considering that, I was using $obj_string-getValue(), the __toString method and type casting could save me some keystrokes :) Anyway, did you abandon the development with the basic types class? Angelo - Original Message - From: Jake Gardner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 1:37 PM Subject: Re: [PHP] PHP 5 OO performance exceptions I myself was considering creating classes such as String, but I ran into more basic problems before performance, for example: class String { protected $Value; function __construct($Value) { $this-Value = $Value; } } $SomeString = new String(Hello World!); Print($SomeString); // Does not print Hello World! The way around this was still unsatisfactory: class String { protected $Value; function __construct($Value) { $this- Value = $Value; } function __toString() { return $this-Value; } } $SomeString = new String(Hello World!); Print($SomeString); // Prints Hello World! Because this has obvious limitations, and is only a fix for strings; this doesnt work for functions that expect integer values. In reality, there really is no way to use PHP to rewrite a type in PHP without using the PHP omni-type. However, you can use type casting as it is: http://us2.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting http://us2.php.net/manual/en/function.settype.php On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, Currently I'm make some utilities classes and I took the idea from java to make some wrappers class like String, Integer and so on. This allows me to use the type hint for basic types in php. Anyone have a clue if replacing the all in one type in php for objects types will degrade the performance? Also for every controller class that I'm making I'm also making exceptions class of every error that it can generate. Same questions: It will degrade performance to throw an exception instead of lest say a pear error or return false? Just for know, I'm doing this because I believe that it will eliminate some o problems o development and will eliminate some basic validations. Any tips appreciate Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 OO performance exceptions
read the internals@ archive - there is a chap there who is developing an php module that makes objects wrappers for basic types available. but imho: $str = new String(W T F !!); echo $str-getValue(), $str, $str-__toString(); is just a bit OTT. also creating and rolling out (to a group of developers) a set of classes to use in place of basic types on the basis of a _belief_ that it may eliminate some development errors seems to be not an unsound basis for such as decision. chances are that half the time developers will 'forget' the 'basetype' classes, your dealing with egos you know :-). but then again maybe in a couple of years we will only have objects to represent types - although so long as at least Rasmus is 'on the bridge' of starship NCC-17-PHP I imagine that won't be happening - IFAIR the creator is a fan of straigtforward procedural code in most cases - apologies to Rasmus if I misread him. [EMAIL PROTECTED] wrote: Some more thought. To solve this problem would be necessary to create some utility class like System in java and that way should be possible to do a System::echo($string) based on type, i guess this can be accomplished using overloading. Am I making any sense? - Original Message - From: [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, November 10, 2005 6:47 PM Subject: Re: [PHP] PHP 5 OO performance exceptions I was not considering that, I was using $obj_string-getValue(), the __toString method and type casting could save me some keystrokes :) Anyway, did you abandon the development with the basic types class? Angelo - Original Message - From: Jake Gardner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 1:37 PM Subject: Re: [PHP] PHP 5 OO performance exceptions I myself was considering creating classes such as String, but I ran into more basic problems before performance, for example: class String { protected $Value; function __construct($Value) { $this-Value = $Value; } } $SomeString = new String(Hello World!); Print($SomeString); // Does not print Hello World! The way around this was still unsatisfactory: class String { protected $Value; function __construct($Value) { $this- Value = $Value; } function __toString() { return $this-Value; } } $SomeString = new String(Hello World!); Print($SomeString); // Prints Hello World! Because this has obvious limitations, and is only a fix for strings; this doesnt work for functions that expect integer values. In reality, there really is no way to use PHP to rewrite a type in PHP without using the PHP omni-type. However, you can use type casting as it is: http://us2.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting http://us2.php.net/manual/en/function.settype.php On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, Currently I'm make some utilities classes and I took the idea from java to make some wrappers class like String, Integer and so on. This allows me to use the type hint for basic types in php. Anyone have a clue if replacing the all in one type in php for objects types will degrade the performance? Also for every controller class that I'm making I'm also making exceptions class of every error that it can generate. Same questions: It will degrade performance to throw an exception instead of lest say a pear error or return false? Just for know, I'm doing this because I believe that it will eliminate some o problems o development and will eliminate some basic validations. Any tips appreciate Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 OO performance exceptions
I was not considering that, I was using $obj_string-getValue(), the __toString method and type casting could save me some keystrokes :) Anyway, did you abandon the development with the basic types class? Angelo - Original Message - From: Jake Gardner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 1:37 PM Subject: Re: [PHP] PHP 5 OO performance exceptions I myself was considering creating classes such as String, but I ran into more basic problems before performance, for example: class String { protected $Value; function __construct($Value) { $this-Value = $Value; } } $SomeString = new String(Hello World!); Print($SomeString); // Does not print Hello World! The way around this was still unsatisfactory: class String { protected $Value; function __construct($Value) { $this- Value = $Value; } function __toString() { return $this-Value; } } $SomeString = new String(Hello World!); Print($SomeString); // Prints Hello World! Because this has obvious limitations, and is only a fix for strings; this doesnt work for functions that expect integer values. In reality, there really is no way to use PHP to rewrite a type in PHP without using the PHP omni-type. However, you can use type casting as it is: http://us2.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting http://us2.php.net/manual/en/function.settype.php On 11/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, Currently I'm make some utilities classes and I took the idea from java to make some wrappers class like String, Integer and so on. This allows me to use the type hint for basic types in php. Anyone have a clue if replacing the all in one type in php for objects types will degrade the performance? Also for every controller class that I'm making I'm also making exceptions class of every error that it can generate. Same questions: It will degrade performance to throw an exception instead of lest say a pear error or return false? Just for know, I'm doing this because I believe that it will eliminate some o problems o development and will eliminate some basic validations. Any tips appreciate Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
On 9/30/05, Tom Chubb [EMAIL PROTECTED] wrote: This is an interesting one. As someone learning PHP, I am still confused which route I should be going down? Especially as I am looking to take on a dedicated server soon, I don't know if PHP5 will become standard soon or are we going to see PHP6 first??!? It is a really serious problem, PHP 5 have so much good things specially in terms of XML that I just want to use them in my programmes but whenever I decide to do programming in PHP 5, I stuck on the choice of a good server. Most of the Hosting service providers are still providing hosting in PHP 4. I think PHP is going through a very tough phase. It has got the capabilities but we can not use them, thats why we can SAY that PHP is good programming language But we can not PROVE that in practically. Well the original posting was about hosting service provider, somewhere I read about HOSTWAY. they are in PHP 5 hosting. Zareef Aahmed Please can some more experienced people let me have their views on this? Many thanks,# Tom On 30/09/05, Joe Wollard [EMAIL PROTECTED] wrote: The first two results both seem pretty good at a glance: http://www.google.com/search?hl=enq=php5+ssh+hostingbtnG=Google+Search On Sep 29, 2005, at 8:29 PM, Ed Lazor wrote: Any recommendations on good host providers for PHP 5? Bonus points if they support SSH access and a PHP compiler like Zend. Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tom Chubb [EMAIL PROTECTED] 07915 053312 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Zareef Ahmed :: A PHP Developer in India ( Delhi ) Homepage :: http://www.zareef.net
Re: [PHP] PHP 5 Hosting
Sheesh! No week passing by without people complaining about hosters missiong out on PHP5. This is one point where we in Germany seem to be lucky. The two biggest german hosters 11 (about 4 million domains) and Strato (about 2.5 million domains) both offer SSH and the possibility to chosse the PHP version on a per directory basis (via .htaccess). Strato offers PHP 3.x, 4.0.x, 4.3.x and 5.0.x in parallel. Perhaps you should think about outsourcing your hosting *g*. For about 13 EUR per month you get PHP3, 4, 5 and even Ruby, SSH access, MySQL access, 4 Domains, 600MB space and 30 GB free traffic. AllOLLi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
Oliver Grätz wrote: Sheesh! No week passing by without people complaining about hosters missiong out on PHP5. This is one point where we in Germany seem to be lucky. The two biggest german hosters 11 (about 4 million domains) and Strato (about 2.5 million domains) both offer SSH and the possibility to chosse the PHP version on a per directory basis (via .htaccess). Strato offers PHP 3.x, 4.0.x, 4.3.x and 5.0.x in parallel. Perhaps you should think about outsourcing your hosting *g*. I am assuming they're running PHP through CGI in this case, am I correct, or are they hosting on Windows to achieve the multiple PHP versions? If CGI, that rather affects performance of larger applications, it especially impact render time of more complex templates and forms. During my own testing we gained lots of time by just running it as a compiled Apache module instead of through CGI and in .htaccess. On our hosting servers we solved it by running a compiled PHP 5 Apache module on one server, and regular on the others. This way, if someone requests PHP 5, they can be put on the server that supports it, and if somebody wants to switch server from PHP 4 to PHP 5, it's an easy enough task. Or, of course, we have the CGI option to fall back on. Regards, Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
Torgny Bjers schrieb: I am assuming they're running PHP through CGI in this case, am I correct, or are they hosting on Windows to achieve the multiple PHP versions? If CGI, that rather affects performance of larger applications, it especially impact render time of more complex templates and forms. During my own testing we gained lots of time by just running it as a compiled Apache module instead of through CGI and in .htaccess. Well, I guess you are right. One can compile multiple versions of PHP to run as Apache module in parallel by changing the sources (one has to change some symbol names) but I think Strato didn't do that since most shared hosting services run PHP as CGI anway for security reasons. Also, I think writing applications with high performance requirements somewhat contradicts deploying them on shared hosts. If you need performance: Get a dedicated server and - if you want - even compile yer own hand-optimized PHP. And: Clever development circumvents the CGI bottleneck. Developing is absolutely no problem under CGI since it's done by just a few users and here the flexibility of multiple version kicks in: You can freely choose! For the production version you simply use a good userland cache that minimizes the work done by PHP. AllOLLi Bree: Do you know, I’ve finally convinced Rex to buy his first orchid. George: Make sure you study up. I hate people who own precious flowers and don’t know how to take proper care of them. Rex: You know what I hate? Weeds. They just pop up out of nowhere and you have to work so hard to get rid of them. George: I find that with the right chemicals you can get rid of anything. [DH 120, earns the price for most subtext per sentence.] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
This is an interesting one. As someone learning PHP, I am still confused which route I should be going down? Especially as I am looking to take on a dedicated server soon, I don't know if PHP5 will become standard soon or are we going to see PHP6 first??!? Please can some more experienced people let me have their views on this? Many thanks,# Tom On 30/09/05, Joe Wollard [EMAIL PROTECTED] wrote: The first two results both seem pretty good at a glance: http://www.google.com/search?hl=enq=php5+ssh+hostingbtnG=Google+Search On Sep 29, 2005, at 8:29 PM, Ed Lazor wrote: Any recommendations on good host providers for PHP 5? Bonus points if they support SSH access and a PHP compiler like Zend. Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tom Chubb [EMAIL PROTECTED] 07915 053312 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Hosting
The first two results both seem pretty good at a glance: http://www.google.com/search?hl=enq=php5+ssh+hostingbtnG=Google+Search On Sep 29, 2005, at 8:29 PM, Ed Lazor wrote: Any recommendations on good host providers for PHP 5? Bonus points if they support SSH access and a PHP compiler like Zend. Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Object Inheritance
Chris wrote: Jochem Maas wrote: Chris wrote: Hi, I've got a collection of Element classes (about 8 different ones). They are all subclasses of a single parent element. I'm trying to extend their functionality (both the individual classes, and the parent class they inherit). I can extend each Element subclass with it's new specific functionality, but I would also like to add specific functionality to all of the subclasses. Extending the parent element with the new functionality would *seem* to be the way to go, but I can't make it work None of the Subclasses inherit from the extended superclass. Any thoughts? I'd appreciate any ideas. BaseElement |- SubElement1 | \- ExtendedSubElement |- SubElement2 |- SubElement3 |- SubElement4 |- SubElement5 |- SubElement6 |- SubElement7 |- SubElement8 \- ExtendedBaseElement ExtendedSubElement will never be able to inherit from ExtendedBaseElement. there is no multiple inheritance in php. Yeah, I understand... Is multiple inheritance something that true OOP languages can do? many of them, may be all? although I'm not sure multiple inheritance is a pre-requist, and I have read plenty of articles that say that MI is plain evil and should be scrapped - at any rate MI gives you functionality which is sometimes very handy but can also be the proverbial rope with which you hang your self (imagine a class hierarchy 4 layers deep where each leaf class inherits from 2-3 base classes in someway, add a few interfaces, etc, etc ... and now you need to make radical changes to one of your base classes ... have fun :-/ ). So either change your 'tree': BaseElement \- ExtendedBaseElement |- SubElement1 | \- ExtendedSubElement |- SubElement2 |- SubElement3 |- SubElement4 |- SubElement5 |- SubElement6 |- SubElement7 |- SubElement8 ... stick the functionality of ExtendedBaseElement into BaseElement and get rid of the ExtendedBaseElement I can't change the tree, because the non-extended elements still need to be able to function independantly. ... or figure out a neat way to use the 'Decorator Pattern' (http://www.google.com/search?q=Decorator+Pattern) in order to conditionally make extended functionality available in specific descendant classes? That seems like it would work, but itdoesn't feel very clean. I'll look into some more. otherwise post some code (cutdown :-) for people to look at. Well, here is my actual tree with all the internals pulled out: ?php abstract class CForm_Element {} class CForm_Datetime extends CForm_Element {} class CForm_File extends CForm_Element {} abstract class CForm_StandardElement extends CForm_Element {} class CForm_Hidden extends CForm_StandardElement {} class CForm_Checkbox extends CForm_StandardElement {} class CForm_Radio extends CForm_StandardElement {} class CForm_Select extends CForm_StandardElement {} class CForm_Textarea extends CForm_StandardElement {} class CForm_Text extends CForm_StandardElement {} class CForm_Password extends CForm_Text {} class CForm_Email extends CForm_Text {} class CForm_Timestamp extends CForm_Text {} abstract class CForm_Number extends CForm_Text {} class CForm_Float extends CForm_Number {} class CForm_Integer extends CForm_Number {} ? They are the elements of a Form Object, to create the form and validate the input. The extended classes I'm working on now associate a database table with the Form object, and will Create, Delete, and Update rows in a database. maybe the Form object (some kind of controller) should be the only object that is aware of the DB connection and let it handle the binding/logic/etc - let the Element classes just worry about what they have to display and how (i.e. build them do they don't care This is my currently anticpated Structure. ?php abstract CAdminForm_Element {} CAdminForm_Boolean {} CAdminForm_Email {} CAdminForm_File {} CAdminForm_Float {} CAdminForm_Integer {} CAdminForm_Password {} CAdminForm_Select {} CAdminForm_String {} ? When I was typing out this structure I realized that some of those have 2 possible objects they'll need to inherit from, which further classes not objects. given the way php works if your objects _need_ to inherit from two or more classes (or one of many, to be decided at run time) then you design is wrong (atleast wrong is so far as your chosen language is not capable of implementing the design!). complicates things. maybe you should be looking at Interfaces? An example: I'll want the CAdminForm_Boolean to optionally be Yes/No Radio buttons, or a Checkbox. Which is handled with two separate Form Elements. how you display something shouldn't really affect its definition (whether you show a checkbox or radiobutton is irrelevant - the underlying 'field' is still a 'boolean'). so maybe the instance of
Re: [PHP] PHP 5 Object Inheritance
Chris wrote: Hi, I've got a collection of Element classes (about 8 different ones). They are all subclasses of a single parent element. I'm trying to extend their functionality (both the individual classes, and the parent class they inherit). I can extend each Element subclass with it's new specific functionality, but I would also like to add specific functionality to all of the subclasses. Extending the parent element with the new functionality would *seem* to be the way to go, but I can't make it work None of the Subclasses inherit from the extended superclass. Any thoughts? I'd appreciate any ideas. BaseElement |- SubElement1 | \- ExtendedSubElement |- SubElement2 |- SubElement3 |- SubElement4 |- SubElement5 |- SubElement6 |- SubElement7 |- SubElement8 \- ExtendedBaseElement ExtendedSubElement will never be able to inherit from ExtendedBaseElement. there is no multiple inheritance in php. So either change your 'tree': BaseElement \- ExtendedBaseElement |- SubElement1 | \- ExtendedSubElement |- SubElement2 |- SubElement3 |- SubElement4 |- SubElement5 |- SubElement6 |- SubElement7 |- SubElement8 ... stick the functionality of ExtendedBaseElement into BaseElement and get rid of the ExtendedBaseElement ... or figure out a neat way to use the 'Decorator Pattern' (http://www.google.com/search?q=Decorator+Pattern) in order to conditionally make extended functionality available in specific descendant classes? otherwise post some code (cutdown :-) for people to look at. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Object Inheritance
Jochem Maas wrote: Chris wrote: Hi, I've got a collection of Element classes (about 8 different ones). They are all subclasses of a single parent element. I'm trying to extend their functionality (both the individual classes, and the parent class they inherit). I can extend each Element subclass with it's new specific functionality, but I would also like to add specific functionality to all of the subclasses. Extending the parent element with the new functionality would *seem* to be the way to go, but I can't make it work None of the Subclasses inherit from the extended superclass. Any thoughts? I'd appreciate any ideas. BaseElement |- SubElement1 | \- ExtendedSubElement |- SubElement2 |- SubElement3 |- SubElement4 |- SubElement5 |- SubElement6 |- SubElement7 |- SubElement8 \- ExtendedBaseElement ExtendedSubElement will never be able to inherit from ExtendedBaseElement. there is no multiple inheritance in php. Yeah, I understand... Is multiple inheritance something that true OOP languages can do? So either change your 'tree': BaseElement \- ExtendedBaseElement |- SubElement1 | \- ExtendedSubElement |- SubElement2 |- SubElement3 |- SubElement4 |- SubElement5 |- SubElement6 |- SubElement7 |- SubElement8 ... stick the functionality of ExtendedBaseElement into BaseElement and get rid of the ExtendedBaseElement I can't change the tree, because the non-extended elements still need to be able to function independantly. ... or figure out a neat way to use the 'Decorator Pattern' (http://www.google.com/search?q=Decorator+Pattern) in order to conditionally make extended functionality available in specific descendant classes? That seems like it would work, but itdoesn't feel very clean. I'll look into some more. otherwise post some code (cutdown :-) for people to look at. Well, here is my actual tree with all the internals pulled out: ?php abstract class CForm_Element {} class CForm_Datetime extends CForm_Element {} class CForm_File extends CForm_Element {} abstract class CForm_StandardElement extends CForm_Element {} class CForm_Hidden extends CForm_StandardElement {} class CForm_Checkbox extends CForm_StandardElement {} class CForm_Radio extends CForm_StandardElement {} class CForm_Select extends CForm_StandardElement {} class CForm_Textarea extends CForm_StandardElement {} class CForm_Text extends CForm_StandardElement {} class CForm_Password extends CForm_Text {} class CForm_Email extends CForm_Text {} class CForm_Timestamp extends CForm_Text {} abstract class CForm_Number extends CForm_Text {} class CForm_Float extends CForm_Number {} class CForm_Integer extends CForm_Number {} ? They are the elements of a Form Object, to create the form and validate the input. The extended classes I'm working on now associate a database table with the Form object, and will Create, Delete, and Update rows in a database. This is my currently anticpated Structure. ?php abstract CAdminForm_Element {} CAdminForm_Boolean {} CAdminForm_Email {} CAdminForm_File {} CAdminForm_Float {} CAdminForm_Integer {} CAdminForm_Password {} CAdminForm_Select {} CAdminForm_String {} ? When I was typing out this structure I realized that some of those have 2 possible objects they'll need to inherit from, which further complicates things. An example: I'll want the CAdminForm_Boolean to optionally be Yes/No Radio buttons, or a Checkbox. Which is handled with two separate Form Elements. I'm *this* close to concluding that it would be better to not extend any of the new AdminForm classes from any of the old, but rather instantiate a Form Element class for each AdminForm Element, then use __call() to pass methods through to the instantied, while overriding the necessary methods in almost the normal way. Thanks for your time, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Object Inheritance
On Fri, 2005-07-15 at 17:53, Chris wrote: Yeah, I understand... Is multiple inheritance something that true OOP languages can do? Yes. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Object Inheritance
Brian V Bonini wrote: On Fri, 2005-07-15 at 17:53, Chris wrote: Yeah, I understand... Is multiple inheritance something that true OOP languages can do? Yes. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
On 2 Jun 2005, at 03:00, Richard Lynch wrote: Maybe I'm being dumb, but how can an object's __autoload function get called when the object class definition hasn't been loaded, and that's why you're calling __autoload in the first place... It wouldn't solve everything, but it would help. It solves the case where you have a class library that's quite heavily interconnected, and member functions instantiate other classes in that library (a common arrangement in my experience). By having an __autoload method, you get to at least partly avoid global handler clashes by having one that is specific to that library (it would work well in PEAR). If it is in a base class, then you are safe in the knowledge that any class can find any other in the same library, without tripping over anyone else's arrangements. You would still have to deal with the problem of finding the first class (which a global handler may help, subject to the issues that you've already raised), but once that's done, the problem is over. I don't see why they named it __autoload - the __ prefix is usually reserved for special purpose methods, not global functions. Just plain 'autoload' in a global context is not really anything wildly different in style to say ini_set or error_reporting. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
On 2 Jun 2005, at 11:56, Colin Ross wrote: The way I see it, you are gonna be spending quite a bit of time writing all those lines of code for the class, what is bad about another requiring the file each time? Huh? Writing a 1-line function in a base class means that I would never have to write another require anywhere in my library (other to include the base class of course, which could conceivably be picked up by a global autoload anyway). Each of my 50-odd classes probably talks to 5 other classes in the library, giving a net saving of 250 lines. How is that bad? (I am talking hypothetically anyway as we don't have autoload methods at present). This thread is meant to be about how to improve automatic include file location - saying not to try to do it at all is not very helpful. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Richard Lynch wrote: On Wed, June 1, 2005 3:53 am, Marcus Bointon said: On 1 Jun 2005, at 11:38, Jochem Maas wrote: all true, now imagine that you install a couple of 3rdparty php5 'packages' and they all define __autoload() - ain't gonna work! which is why there has been discussion on internals regarding the possibility of use a handler- function stack for autoloading (in the same way that you can register a stack of input/output filter-function)... something to keep an eye on in case things change :-) I've run into this one. One way that would work for me (and initially it's how I assumed it worked) is for __autoload to be a standard class method like __construct, so that a class would attempt to run its own autoloader before breaking out to the global function namespace. Maybe I'm being dumb, but how can an object's __autoload function get called when the object class definition hasn't been loaded, and that's why you're calling __autoload in the first place... That seems like classic chicken/egg situation to me... that was my first reaction, but then I thought what if the __autoload() function was called when 'any' class needed to be included while running code inside said class... that _might_ actually be useful at any rate the __autoload() issue is still very much undecided :-) It's also incredibly likely that __autoload's being stacked won't work out too well. Consider this: foo software defines an __autoload Some foo_* classes get defined, autoloaded, everybody's happy. bar software defines an __autoload Some bar_* classes get defined, autoloaded, everybody's happy. Now some foo_* classes try to get instantiated, for whateve reason. bar's __autoload function is gonna kick, and that ain't good for foo_* Seems to me you'd need an array of regular expressions and the function to call: array('foo_*'='foo__autoload', 'bar_*'='bar__autoload') if you wanted to allow multiple __autoload functions to exist... I'm sure there are other ideas/solutions floating around, but that's A possibility. For performance, maybe just use stristr and 'foo_' instead of RegEx and 'foo_*' [shrug] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Jochem Maas wrote: Richard Lynch wrote: On Wed, June 1, 2005 3:53 am, Marcus Bointon said: On 1 Jun 2005, at 11:38, Jochem Maas wrote: all true, now imagine that you install a couple of 3rdparty php5 'packages' and they all define __autoload() - ain't gonna work! which is why there has been discussion on internals regarding the possibility of use a handler- function stack for autoloading (in the same way that you can register a stack of input/output filter-function)... something to keep an eye on in case things change :-) I've run into this one. One way that would work for me (and initially it's how I assumed it worked) is for __autoload to be a standard class method like __construct, so that a class would attempt to run its own autoloader before breaking out to the global function namespace. Maybe I'm being dumb, but how can an object's __autoload function get called when the object class definition hasn't been loaded, and that's why you're calling __autoload in the first place... That seems like classic chicken/egg situation to me... that was my first reaction, but then I thought what if the __autoload() function was called when 'any' class needed to be included while running code inside said class... that _might_ actually be useful at any rate the __autoload() issue is still very much undecided :-) I opened up a feature request for this very topic a while back. The __autoload function should just register user-defined functions and store those func names in a stack so that (in turn) each function can require the appropriate file. If the first registered function fails to load the class then __autoload tries the next registered fucntion and so on until all of the registered functions have been tried. At this point if __autoload fails then we E_ERROR out explaining that __autoload could not load the class definition. As far as I can tell this is the cleanest solution that has been provided, but there is some disagreement over some of the details on this approach. just_kiddingLife would be so much easier if everyone just did things like the PEAR coders do/just_kidding -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Jason Barnett wrote: Jochem Maas wrote: Richard Lynch wrote: On Wed, June 1, 2005 3:53 am, Marcus Bointon said: On 1 Jun 2005, at 11:38, Jochem Maas wrote: ... I opened up a feature request for this very topic a while back. The __autoload function should just register user-defined functions and store those func names in a stack so that (in turn) each function can require the appropriate file. If the first registered function fails to load the class then __autoload tries the next registered fucntion and so on until all of the registered functions have been tried. At this point if __autoload fails then we E_ERROR out explaining that __autoload could not load the class definition. As far as I can tell this is the cleanest solution that has been provided, but there is some disagreement over some of the details on this approach. agreed, but as you point out - the devil is in the details. :-) just_kiddingLife would be so much easier if everyone just did things like the PEAR coders do/just_kidding say-it-like-a-piratethat be fightin' talk m'friend ;-)/say-it-like-a-pirate -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Maybe it's just me, but the core concept of __autoload() seems to be broken to me. Moreover, every proposed solution I've heard about is totally inside the box. I would do it like this: 1) Define $_AUTOLOAD superglobal. 2) If I need SomeClass to be autoloaded I write this: $_AUTOLOAD['SomeClass'] = 'some/dir/some_classs.php'; 3) If I care, I could check whether $_AUTOLOAD['SomeClass'] is already set and generate an error. This would mimic Java behaviour (it's about competing with Java, is it?) without creating artificial headache for programmers. But wait! What do I know? This will cbreak BC; moreover, BC will be broken by this. Forget I said something. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
On 6/2/05, GamblerZG [EMAIL PROTECTED] wrote: Maybe it's just me, but the core concept of __autoload() seems to be broken to me. Moreover, every proposed solution I've heard about is totally inside the box. I would do it like this: 1) Define $_AUTOLOAD superglobal. When forced to do OO, I use it like this: function __autoload( $class ) { require_once( $GLOBALS[LIB_PATH]/$class.class.php ); } -- Greg Donald Zend Certified Engineer http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
On 1 Jun 2005, at 09:01, janbro wrote: require (Class2.php); class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. PHP doesn't have this luxury - people can call files whatever they like. However, PHP5 does have a nice feature to deal with this. In your class1 class, create a function called __autoload like this: function __autoload($class_name) { require_once $class_name . '.php'; } In this case when you ask for a new class2 and you've not required it before, it will automatically call __autoload with $class_name set to 'Class2', which then requires the class file according to the pattern used in the function, in this case 'Class2.php'. Note that while PHP is not case sensitive to class names, the file system you're on probably is, so keep your case consistent throughout. Docs are here: http://www.php.net/manual/en/language.oop5.autoload.php Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Hello janbro, Wednesday, June 1, 2005, 9:01:57 AM, you wrote: j Now my question, is it possible to skip that require/ include part? j In Java you don't need that, as class and file names are identical. Personally I'd __autoload them, but this might not be ideal for your file structure. Worth a look anyway perhaps? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I do not fear computers. I fear the lack of them. - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
maybe have a look at extends class Class1 extends Class2 {... janbro wrote: Hi List, I'm using the oo orientation of PHP5 for a while now. All Classes I've got have a require on top them, if I try to reference to other classes. something like require (Class2.php); class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. thx janbro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Marcus Bointon wrote: On 1 Jun 2005, at 09:01, janbro wrote: require (Class2.php); I bet you didn't cut'n'paste that from a working file :-) class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. PHP doesn't have this luxury - people can call files whatever they like. However, PHP5 does have a nice feature to deal with this. In your class1 class, create a function called __autoload like this: function __autoload($class_name) { require_once $class_name . '.php'; } In this case when you ask for a new class2 and you've not required it before, it will automatically call __autoload with $class_name set to 'Class2', which then requires the class file according to the pattern used in the function, in this case 'Class2.php'. Note that while PHP is not case sensitive to class names, the file system you're on probably is, so keep your case consistent throughout. all true, now imagine that you install a couple of 3rdparty php5 'packages' and they all define __autoload() - ain't gonna work! which is why there has been discussion on internals regarding the possibility of use a handler-function stack for autoloading (in the same way that you can register a stack of input/output filter-function)... something to keep an eye on in case things change :-) you may also consider that placing suitable require statements (I would use require_once for class files) before a class definition will probably/possibly (I don't know but it may be important to your project) be a minor performance boost over letting php call _autoload() whenever it needs. Docs are here: http://www.php.net/manual/en/language.oop5.autoload.php Marcus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
eoghan wrote: maybe have a look at extends class Class1 extends Class2 {... he will still have to make sure that Class2 is loaded. besides wrapping 1 object inside another is perfectly acceptable, if my GOF terminology serves me well then this is usually termed a Delegation pattern (not that the name is that important, then again it helps to be talking about the same thing :-/). janbro wrote: Hi List, I'm using the oo orientation of PHP5 for a while now. All Classes I've got have a require on top them, if I try to reference to other classes. something like require (Class2.php); class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. thx janbro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
On 1 Jun 2005, at 11:38, Jochem Maas wrote: all true, now imagine that you install a couple of 3rdparty php5 'packages' and they all define __autoload() - ain't gonna work! which is why there has been discussion on internals regarding the possibility of use a handler- function stack for autoloading (in the same way that you can register a stack of input/output filter-function)... something to keep an eye on in case things change :-) I've run into this one. One way that would work for me (and initially it's how I assumed it worked) is for __autoload to be a standard class method like __construct, so that a class would attempt to run its own autoloader before breaking out to the global function namespace. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Okay, I see there is a workaround but nothing realy satisfying, but I'm not hoing to complain, I'm hapy to have oo in PHP at all. I never worked with __autoload so far, but I will give it a try and check it out thx janbro Marcus Bointon schrieb: On 1 Jun 2005, at 09:01, janbro wrote: require (Class2.php); class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. PHP doesn't have this luxury - people can call files whatever they like. However, PHP5 does have a nice feature to deal with this. In your class1 class, create a function called __autoload like this: function __autoload($class_name) { require_once $class_name . '.php'; } In this case when you ask for a new class2 and you've not required it before, it will automatically call __autoload with $class_name set to 'Class2', which then requires the class file according to the pattern used in the function, in this case 'Class2.php'. Note that while PHP is not case sensitive to class names, the file system you're on probably is, so keep your case consistent throughout. Docs are here: http://www.php.net/manual/en/language.oop5.autoload.php Marcus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
Alright thanks, I see there is a workaround to cope with that. I've never worked with __autoload, but will sure give it a look. I don't realy feel this satisfying, but hey I'm thankful to have oo at all. janbro Marcus Bointon schrieb: On 1 Jun 2005, at 09:01, janbro wrote: require (Class2.php); class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. PHP doesn't have this luxury - people can call files whatever they like. However, PHP5 does have a nice feature to deal with this. In your class1 class, create a function called __autoload like this: function __autoload($class_name) { require_once $class_name . '.php'; } In this case when you ask for a new class2 and you've not required it before, it will automatically call __autoload with $class_name set to 'Class2', which then requires the class file according to the pattern used in the function, in this case 'Class2.php'. Note that while PHP is not case sensitive to class names, the file system you're on probably is, so keep your case consistent throughout. Docs are here: http://www.php.net/manual/en/language.oop5.autoload.php Marcus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
* janbro [EMAIL PROTECTED] : Okay, I see there is a workaround but nothing realy satisfying, but I'm not hoing to complain, I'm hapy to have oo in PHP at all. I never worked with __autoload so far, but I will give it a try and check it out The best way to use autoload is with the auto_prepend_file configuration directive. By adding the __autoload() function to a file that is automatically prepended, you don't even have to think about it in your scripts. This kind of flexibility is nice -- you can have different prepend files for different sites or different areas of the same site -- so that you only have the funcationality accessible that you need right there. You can also define your own naming schema -- which, admittedly is a dubious advantage, but an advantage nonetheless. Marcus Bointon schrieb: On 1 Jun 2005, at 09:01, janbro wrote: require (Class2.php); class Class1{ private function ... { $refClass2 = new Class2; } } Now my question, is it possible to skip that require/ include part? In Java you don't need that, as class and file names are identical. PHP doesn't have this luxury - people can call files whatever they like. However, PHP5 does have a nice feature to deal with this. In your class1 class, create a function called __autoload like this: function __autoload($class_name) { require_once $class_name . '.php'; } In this case when you ask for a new class2 and you've not required it before, it will automatically call __autoload with $class_name set to 'Class2', which then requires the class file according to the pattern used in the function, in this case 'Class2.php'. Note that while PHP is not case sensitive to class names, the file system you're on probably is, so keep your case consistent throughout. Docs are here: http://www.php.net/manual/en/language.oop5.autoload.php -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Question about OO
On Wed, June 1, 2005 3:53 am, Marcus Bointon said: On 1 Jun 2005, at 11:38, Jochem Maas wrote: all true, now imagine that you install a couple of 3rdparty php5 'packages' and they all define __autoload() - ain't gonna work! which is why there has been discussion on internals regarding the possibility of use a handler- function stack for autoloading (in the same way that you can register a stack of input/output filter-function)... something to keep an eye on in case things change :-) I've run into this one. One way that would work for me (and initially it's how I assumed it worked) is for __autoload to be a standard class method like __construct, so that a class would attempt to run its own autoloader before breaking out to the global function namespace. Maybe I'm being dumb, but how can an object's __autoload function get called when the object class definition hasn't been loaded, and that's why you're calling __autoload in the first place... That seems like classic chicken/egg situation to me... It's also incredibly likely that __autoload's being stacked won't work out too well. Consider this: foo software defines an __autoload Some foo_* classes get defined, autoloaded, everybody's happy. bar software defines an __autoload Some bar_* classes get defined, autoloaded, everybody's happy. Now some foo_* classes try to get instantiated, for whateve reason. bar's __autoload function is gonna kick, and that ain't good for foo_* Seems to me you'd need an array of regular expressions and the function to call: array('foo_*'='foo__autoload', 'bar_*'='bar__autoload') if you wanted to allow multiple __autoload functions to exist... I'm sure there are other ideas/solutions floating around, but that's A possibility. For performance, maybe just use stristr and 'foo_' instead of RegEx and 'foo_*' [shrug] -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, mySQL and Win XP. I NEED HELP
On Sat, May 7, 2005 4:56 am, Deep said: Hi, If you are using localhost, i dont think u need to specify the port number. Localhost would be enough. Also pls check the user privileges and all in the database. ..Deep.. --- Oscar Andersson [EMAIL PROTECTED] wrote: I have made a instal of the latest mySQL and PHP 5 on my computer. I have made the following changes to my php.ini file extension=php_mysql.dll extension_dir = c:\php\ and i have put the php_mysql. and libmysql.dll in c:\php\ and in c:\windows to Now i try this in my php-file $con = mysql_connect(localhost:3306, buddy, bestbuddy); I cant connect to mySQL. I dont know what is wrong. mySQL listen to port 3306. I have tried with my IP to. I get this warning Warning: mysql_connect() [function.mysql-connect]: Too many open links (0) in myfilename.php. Too many open links sounds to me like you've set up MySQL to only allow X connections, and you are trying to open up X+1 connection. The 0 would make me guess that X is 0. So I'd *GUESS* you have a setting in my.cnf that says to limit number of connections to 0, and that means you can't have any connections at all... Just a GUESS. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, mySQL and Win XP. I NEED HELP
Hi, If you are using localhost, i dont think u need to specify the port number. Localhost would be enough. Also pls check the user privileges and all in the database. ..Deep.. --- Oscar Andersson [EMAIL PROTECTED] wrote: I have made a instal of the latest mySQL and PHP 5 on my computer. I have made the following changes to my php.ini file extension=php_mysql.dll extension_dir = c:\php\ and i have put the php_mysql. and libmysql.dll in c:\php\ and in c:\windows to Now i try this in my php-file $con = mysql_connect(localhost:3306, buddy, bestbuddy); I cant connect to mySQL. I dont know what is wrong. mySQL listen to port 3306. I have tried with my IP to. I get this warning Warning: mysql_connect() [function.mysql-connect]: Too many open links (0) in myfilename.php. I hope for help Oscar Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5, mySQL and Win XP. I NEED HELP
hey On 5/5/05, Oscar Andersson [EMAIL PROTECTED] wrote: I have made a instal of the latest mySQL and PHP 5 on my computer. I have made the following changes to my php.ini file extension=php_mysql.dll extension_dir = c:\php\ and i have put the php_mysql. and libmysql.dll in c:\php\ and in c:\windows to Now i try this in my php-file $con = mysql_connect(localhost:3306, buddy, bestbuddy); stop the mysql server and restart and again run your php script. there might be some disk space constraint all be there I cant connect to mySQL. I dont know what is wrong. mySQL listen to port 3306. I have tried with my IP to. I get this warning Warning: mysql_connect() [function.mysql-connect]: Too many open links (0) in myfilename.php. I hope for help Oscar Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- bala balachandar muruganantham blog lynx http://chandar.blogspot.com web http://www.chennaishopping.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Strings are References?!
On Wed, March 30, 2005 6:48 am, Jochem Maas said: I don't really think that's relevant, however, as PHP is storing $name back *IN* to my $_SESSION data, just because I did: $name = $_SESSION['name']; $name = Fooey; $name is a STRING. It's not an object. It should *NOT* be a Reference! But it is a Reference, so changing $name alters $_SESSION['name'] Perhaps I'm being overly paranoid... Consider the following, however. Fact: One should not trust $_GET data, and should scrub it. Fact: I'm on a shared server. Fact: By definition, if *my* PHP script can read my session data, so can *another* user's script on that server. Thus, I had intended to 'scrub' session data with things like: ?php session_start(); $name = $_SESSION['name']; $name = preg_replace('/[^A-Za-z \',\\.-]/', $name); if ($name != $_SESSION['name']){ // assume they are Bad People. } ? Needless to say, this isn't gonna do crap with this bug in PHP 5.0.3 making strings into references. For the short term, I'm trusting session data (but not GET/POST, duh). I suspect I could do: $name = '' . $_SESSION['name']; or somesuch to force the string to not be a reference. But PHP doesn't *HAVE* strings as references. I filed a bug report, but sniper's response was pretty much the same auto-response register_globals OTOH, he said it was fixed in CVS, so I guess it was only in 5.0.3??? Am I over-reacting? I don't think so. It's a nasty little bug that will completely bypass security measures to scrub SESSION data, as described above. I haven't really probed into this, to see how far / long the reference nature of the string extends. Perhaps the preg_replace would create a copy of the string... Or not. Or maybe it would depend on if anything got replaced or not. Or... Sorry to reply so late, but I've been a tad busy lately, and just caught up on PHP-General tonight. [looks at watch] Errr, make that this morning, I guess. :-v -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 Status
Colin Ross wrote: Now, as far as I know though, there are still issues with Apache 2 and PHP-libraries, correct? Yes, there are potential threading problems unless you use the pre-fork version of Apache2. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-generalw=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins signature.asc Description: OpenPGP digital signature