During the install process for php4-gd2, I was prompted to modify php.ini with "extension=gd.so". I answered "Yes". I then verified that the line was added to php.ini.
And if I create a test PHP script utilizing a GD function, I get the following:
Fatal error: Call to undefined function: imagecreatefrompng() in /var/www/cparker15/test.php on line 3
Anybody know what I might be doing wrong? I've Googled and have come up with nothing. I'm thinking of asking on debian-user, but the last time I posted there, I didn't get any answers.
Has anyone ever used this? And, if so, with any success?
http://www.aquafold.com/ Aqua Data Studio is a database query and administration tool that allows developers to easily create, edit, and execute SQL scripts, as well as browse and visually modify database structures. Aqua Data Studio provides an integrated database environment with a single consistent interface to all major relational databases. This allows the database administrator or developer to tackle multiple tasks simultaneously from one application.
I upgraded my primary mail server to SpamAssassin 3.0.0 last night. So far so good, it has a full updated ruleset to catch more spam. I noticed 2.5.x was starting to let a lot slip through the cracks. It also has modules to store auto white listing and bayes in an sql database now which is sweet. So i have awl, bayes, and custom user preferences all stored in the sql database. So far its catching WAY more spam than the old version.
Just curious on what you guys use to host your sites. Pros/cons? Specs? Like myself:
Site: Frankly Jason Host: Cyberpixels.com Specs: 9.95/mo for 400 MBs, 15 GBs bandwidth, and uber amount of pop 3 emails, ftp accounts, sub-domains and mysql databases Server OS: RedHat Linux Control Panel: cPanel
Pros/cons: Everything runs pretty smoothly except the lag time on uploading to the FTP. Uploading is fast, just the connection with the ftp as each file goes onto the space.
I have this really obnoxious scenario where I need to take the table structure from one of my SQL Server 2000 databases, and copy all of the tables down to a new MS Access database. There's a LARGE NUMBER of tables, so recreating each table in Access manually should be a last resort.
I've looked into using the DTS wizard, but when Exporting Data, I cannot simply execute the "CREATE TABLE" statements without copying the data it seems? That, or if I modify the DTS package by hand afterwards, DTS sets up each table as a separate command stream, so I have to manually modify each to rip out the data transfer portion. This is extremely irksome.
Then I speculated on generating the "CREATE TABLE" T-SQL via SQL Server and running that against the Access db. Not being terribly familiar with Access, I'm unaware of any actual SQL front-end. But from my 'net application dev days, I have an old ASP page which I'd use on remote servers to modify client Access dbs that I otherwise didn't have access to. So thought of using that as my front-end, but then realized that the T-SQL generated code would NOT be Access friendly due to differing datatypes!
So I'm growing rather irritated with this situation and thought I'd ask folks out here for advice on this? Any ideas would be greatly appreciated!
My boss called me over and asked me to write a T-SQL function on behalf of our web guy, that would arbitrarily strip out all HTML tags from a VARCHAR. In any other language like PHP, Perl, etc., I'd employ Regular Expressions to do this globally. However, T-SQL only really has PATINDEX and CHARINDEX, those aren't all that powerful.
I did wind up coming up with an iterative solution, which I thought I'd share with everyone to get suggestions and feedback.
CREATE TABLE #tmpText ( id INT IDENTITY(1, 1), data varchar(4000) )
INSERT INTO #tmpText (data) VALUES ('this is some html')
INSERT #tmpText VALUES ( '
Some Name
SOME HTML text after the body' )
INSERT #tmpText VALUES ( 'Another Name
Another HTML text after the body' )
-- WHILE a '<' and '>' pair are present and the former's position is less than the latter's position value -- Find a '<' then the next '>' positions, and run a stuff to remove whatever's in between!
BEGIN TRANSACTION WHILE EXISTS (SELECT 1 FROM #tmpText WHERE PATINDEX('%<%>%', data) > 0 ) BEGIN UPDATE #tmpText SET data = STUFF(data, PATINDEX('%<%>%', data), CHARINDEX('>', data) - PATINDEX('%<%>%', data) + 1, '') WHERE PATINDEX('%<%>%', data) > 0 END
SELECT * FROM #tmpText
ROLLBACK
I'm going to keep trying to dissect this in order to come up with a cleaner, non-iterative solution. If anyone else already has a function that does this in one fell-swoop, rather than via looping, PLEASE share it! :-)
UPDATE: I've made further code changes to handle a few odd circumstances and have finished the function. Thought I'd share it with everyone for a "peer review." Please comment away!
ALTER FUNCTION uf_stripHTML ( @strHTML varchar(8000), @flgFormat int = 1 ) RETURNS varchar(8000) AS BEGIN
-------------------------------------------------------------------------------------------------- -- Date Written: 02-10-2005 -- Purpose: Arbitrarily strip all text between all pairs of < > tags. This SHOULD be -- HTML but theoretically could be other data? ---------------------------------------------------------------------------------------------------- -- Input Parameters: @strHTML = The string that we are stripping HTML from. -- @flgFormat = If set to 1 (DEFAULT), then the function will attempt to -- preserve basic formatting by detecting non-breaking spaces, start and end -- paragraph tags, and break-return tags, and replacing them with their -- ASCII equivalents. ---------------------------------------------------------------------------------------------------- -- Comments: This solution employs an iterative algorithm to repeatedly sweep through -- the variable's text, removing HTML tags one at a time. ----------------------------------------------------------------------------------------------------
DECLARE @ltPosition int
-- If flgFormat is 1, then replace pre-determined list of tags and characters with -- corresponding values! IF @flgFormat = 1 BEGIN SET @strHTML = REPLACE(@strHTML, '
', CHAR(10) + CHAR(13)) SET @strHTML = REPLACE(@strHTML, '
', CHAR(10) + CHAR(13)) SET @strHTML = REPLACE(@strHTML, ' ', CHAR(10)) END
-- STRIP OUT HTML HERE WHILE (SELECT PATINDEX('%<[^ ]%>%', @strHTML)) > 0 BEGIN -- Must search for the correct '>' because any unmatched ones will cause errors! SET @ltPosition = 0 WHILE (PATINDEX('%<[^ ]%>%', @strHTML) > @ltPosition) SET @ltPosition = CHARINDEX('>', @strHTML, @ltPosition + 1)
SET @strHTML = STUFF(@strHTML, PATINDEX('%<[^ ]%>%', @strHTML), @ltPosition - PATINDEX('%<[^ ]%>%', @strHTML) + 1, '') END
This is awesome! Do any of you know about/understand the new XML datatype in SQL Server? I'm at VSLIVE! in San Francisco at a session and I'm super excited about it. I didn't understand it before but this presenter is great and I now understand it. I'm going to post more once I have time but yeah..anyone else excited about this?
Hey, does anyone know how to set up a SQL Profiler Trace to log reads/writes to a specific database object? I tried reporting on object name, but so far all I can get to show up is Locks on ObjectName and the object name shows up blank. Any ideas?
I'm getting some weird behavior in a function I wrote.
Private Function GetServerStatus() As Integer Dim strDataSource As String Dim myConnection As SqlConnection Dim myCommand As SqlCommand Dim intStatus As Integer strDataSource = ConfigurationSettings.AppSettings("DSN") myConnection = New SqlConnection(strDataSource) myCommand = New SqlCommand("GetSystemStatus", myConnection) myCommand.CommandType = CommandType.StoredProcedure myConnection.Open() intStatus = myCommand.ExecuteNonQuery() myConnection.Close() Return intStatus End Function
It uses the stored procedure "GetSystemStatus": CREATE PROCEDURE dbo.GetSystemStatus AS DECLARE @SystemStatus int SELECT @SystemStatus=MAX(systemstatus) FROM Config RETURN @SystemStatus GO
The weird behavior is that GetServerStatus() returns -1, but when I run GetSystemStatus in Query Analyzer, it returns 0 (or whatever the value is).
i've converted over 150 access queries today that didn't autoconvert during upsizing to sql because of sql language difference. These are the only 2 left i am stuck on. they are cross tab queries with a pivot.
Can you help?
[1] query1:
TRANSFORM Min(statusall_sub1.makesymb) AS MinOfmakesymb SELECT statusall_sub1.site, statusall_sub1.opsoffice FROM statusall_sub1 GROUP BY statusall_sub1.site, statusall_sub1.opsoffice ORDER BY statusall_sub1.site, statusall_sub1.opsoffice, statusall_sub1.sectionid PIVOT statusall_sub1.sectionid
[2] query2:
TRANSFORM First(sites.transferto) AS FirstOftransferto SELECT sites.closuretype FROM sites WHERE (((sites.closuretype) Is Not Null)) GROUP BY sites.closuretype PIVOT sites.site;
i had to convert a complicated multicondition access iif statement to a working sql statement -sql does not allow iif. i've been working on this for days, when suddenly, just now, in the midst of exhaustion i discovered the answer..take a look..
before[access]:
IIf([keyms]=1,"-C") & IIf([pmp]=1,"-P") & IIf([regulatory]=1,"-R") & IIf([ipabs]=1,"-I") & IIf([perfobj]=1,"-PO") & " (" & [cdlevel] & ")" AS mstype FROM milestones;
after [sql]:
CREATE VIEW dbo.milestonesq AS SELECT milestones.*, CASE WHEN mscomplete IS NULL THEN 0 ELSE 1 END AS cmplt, replace(replace(cast(replace(keyms,'1','-C') as varchar)+ cast(replace(pmp,'1','-P') as varchar)+cast(replace(regulatory,'1','-R')as varchar)+cast(replace(ipabs,'1','-I')as varchar)+cast(replace(perfobj,'1','-PO')as varchar)+'('+cast(cdlevel as varchar)+')','0',''),'()','(0)') AS mstype FROM milestones
Does anyone know of a quick reference I could provide to the it security folks at my work that outlines what file extensions, ports, and dll's sql server uses? They've gone hog wild with 'security' software here to the point that they invariably end up shutting down one behavior or another within SQL each time they do a 'security upgrade'. Grrrr.
For privacy protection within an application, I hash email addresses into MD5. MySQL, PostgreSQL, and Oracle all have a scalar function that allows you to hash a column/string -- for example MD5(emailaddr).
I have yet to find such a function, or a handy library/package for creating such a function in SQL Server 2000. Did I miss something? recommendations?
Generic question, because you really don't want to read all the code. It's a lot of code. Really. A lot of code.
I've got a bunch of small pieces of T-SQL code in SQL Server 2000 that all go together to make one big procedure. (Actually, part of one big procedure-- it's not quite done yet.) When I run the first thirty parts together, they take about seventeen minutes, and I collectively think of them as part one. The second part takes five and a half minutes. The third part takes thirty seconds. The tables involved run from about 400k to one million records, so I'm not dealing with massive tables or anything. Everything's indexed well, etc. And when I run them separately, they all run quite quickly, and everyone's happy.
When I try to put them all together in one procedure, be it in a stored procedure, a Query Analyzer window, or a "SQL Command" DTS package step, they start running... and never stop. Well, they may stop at one point, but I stopped it running after twnty-five hours and forty-eight minutes.
Are there any leading candidates for not-obscenely-expensive CMSs for those stuck in a Microsoft shop (ASP and SQL server)? We have a fair amount of dynamic content, require some sort of approval chain for updates and complete control over the layout. We were looking at RedDot, but the price is busting that deal. My eyes are bleeding from looking at all of the little one off shops that offer, well, not much. Does anyone have any experience with any products that they would recommend?
I have noticed that despite closing all connections and exiting a standalone HSQLDB database, at least one connection still remains open.
The defect is manifested in HSQLDB 1.7.3 and HSQLDB 1.8.0 RC 8.
If you compile and run the sample code below, it will run fine for the first time. Second time (if it is run [...]
so, my quest for the perfect gallery continues. my question to you all is this: what gallery applications do you use and what do you think of them? I prefer php and no need for mysql, but I'm open to other options. the only thing I'm adamant about is not using javascript. ;)